Title: Automate PR creation when OpenAPI spec is updated · Issue #618 · apify/apify-client-python · GitHub
Open Graph Title: Automate PR creation when OpenAPI spec is updated · Issue #618 · apify/apify-client-python
X Title: Automate PR creation when OpenAPI spec is updated · Issue #618 · apify/apify-client-python
Description: Context As part of the effort to introduce fully typed & generated API clients (apify/apify-core#25186), the Python client will generate Pydantic models and type annotations from the OpenAPI specification (see #481). Once the generation ...
Open Graph Description: Context As part of the effort to introduce fully typed & generated API clients (apify/apify-core#25186), the Python client will generate Pydantic models and type annotations from the OpenAPI specif...
X Description: Context As part of the effort to introduce fully typed & generated API clients (apify/apify-core#25186), the Python client will generate Pydantic models and type annotations from the OpenAPI sp...
Opengraph URL: https://github.com/apify/apify-client-python/issues/618
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Automate PR creation when OpenAPI spec is updated","articleBody":"### Context\n\nAs part of the effort to introduce fully typed & generated API clients ([apify/apify-core#25186](https://github.com/apify/apify-core/issues/25186)), the Python client will generate Pydantic models and type annotations from the [OpenAPI specification](https://docs.apify.com/api/openapi.json) (see #481).\n\nOnce the generation pipeline is in place, we need a mechanism to keep the generated code in sync with the OpenAPI spec automatically, so that changes to the API are promptly reflected in the client without manual intervention.\n\n### Goal\n\nSet up a CI/CD automation (e.g. GitHub Actions workflow) that:\n\n1. **Detects changes** to the OpenAPI specification (e.g. via a scheduled check, a webhook/dispatch from `apify-docs`, or by polling `https://docs.apify.com/api/openapi.json`).\n2. **Re-runs the code generation** pipeline to produce updated models/types.\n3. **Opens a PR** automatically in `apify-client-python` with the regenerated code, so it can be reviewed and merged.\n\n### Considerations\n\n- The trigger mechanism needs to be decided — options include:\n - A **`repository_dispatch`** event sent from the `apify-docs` repo (or wherever the OpenAPI spec is maintained) whenever the spec changes.\n - A **scheduled workflow** (e.g. daily cron) that fetches the latest spec, compares it against the currently used version, and opens a PR if there are differences.\n - A **webhook** from the API deployment pipeline.\n- The PR should include a clear diff of generated changes and ideally reference which OpenAPI spec version/commit triggered the update.\n- Consider running linting, type checking, and tests as part of the PR to catch breaking changes early.\n- Similar automation should likely be set up for `apify-client-js` as well ([apify/apify-client-js#823](https://github.com/apify/apify-client-js/issues/823)).\n\n### Related\n\n- Parent epic: [apify/apify-core#25186](https://github.com/apify/apify-core/issues/25186)\n- Typed Python client: #481\n- OpenAPI sync mechanism: [apify/apify-core#22169](https://github.com/apify/apify-core/issues/22169)","author":{"url":"https://github.com/vdusek","@type":"Person","name":"vdusek"},"datePublished":"2026-02-17T05:22:37Z","url":"https://github.com/apify/apify-client-python/issues/618"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:db865e5d-1301-a8fd-facf-8c02e357f2c5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 96E8:B5253:23FE1C4:2FDB3CD:6B0058E4 |
| html-safe-nonce | 7cd7541782dfc286b3506e4179c335a609df3df531036119385e7aefe1fbff2b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkU4OkI1MjUzOjIzRkUxQzQ6MkZEQjNDRDo2QjAwNThFNCIsInZpc2l0b3JfaWQiOiI0OTc0NDg2ODc2OTkyODU0MjQ0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 06e7ff0162a14c9affd73744d357fc5d9068923a7c20eb885b02111679b29d73 |
| hovercard-subject-tag | issue:3950865393 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apify/apify-client-python/618/issue_layout |
| twitter:image | https://opengraph.githubassets.com/39140879cc67395af248a45ae3fa364b035f56e1ca7eadf7b477ec0d73198c9d/apify/apify-client-python/issues/618 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/39140879cc67395af248a45ae3fa364b035f56e1ca7eadf7b477ec0d73198c9d/apify/apify-client-python/issues/618 |
| og:image:alt | Context As part of the effort to introduce fully typed & generated API clients (apify/apify-core#25186), the Python client will generate Pydantic models and type annotations from the OpenAPI specif... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vdusek |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73 |
| turbo-cache-control | no-preview |
| go-import | github.com/apify/apify-client-python git https://github.com/apify/apify-client-python.git |
| octolytics-dimension-user_id | 24586296 |
| octolytics-dimension-user_login | apify |
| octolytics-dimension-repository_id | 164647835 |
| octolytics-dimension-repository_nwo | apify/apify-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 164647835 |
| octolytics-dimension-repository_network_root_nwo | apify/apify-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | eacd927ba6112e3b01ba99c762bd699a4a4f5df7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width