Skip to content

Conversation

@vdusek
Copy link
Contributor

@vdusek vdusek commented Jan 19, 2026


Note

Migrates the OpenAPI spec to 3.1.0 and updates schemas for JSON Schema compatibility, replacing deprecated constructs.

  • Sets root openapi to 3.1.0
  • Replaces nullable: true with union type (e.g., [string, 'null']), and allOf with anyOf for ref-or-null patterns
  • Converts single example to array examples across schemas
  • Minor schema tidy-ups (e.g., actors/BuildTag to type: [object, 'null'], refined oneOf/anyOf usage in actors/ActorDefinition, consistent examples in path components)

Written by Cursor Bugbot for commit 95d8a2c. Configure here.

@vdusek vdusek added this to the 132nd sprint - Tooling team milestone Jan 19, 2026
@vdusek vdusek self-assigned this Jan 19, 2026
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Jan 19, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit 95d8a2c and is ready at https://pr-2188.preview.docs.apify.com!

@vdusek
Copy link
Contributor Author

vdusek commented Jan 19, 2026

Ah, the Go generator doesn't support OpenAPI 3.1 even after almost five years (oapi-codegen/oapi-codegen#373).

Do we want to block this just because of Go - do we have a apify-client-go somewhere?

Of course, before deciding on next steps, we should investigate how other tooling (especially for Python and JavaScript) is compatible with 3.1. The https://github.com/koxudaxi/datamodel-code-generator is OK, but let's inspect others.

@janbuchar
Copy link
Contributor

Ah, the Go generator doesn't support OpenAPI 3.1 even after almost five years (oapi-codegen/oapi-codegen#373).

Do we want to block this just because of Go - do we have a apify-client-go somewhere?

The codegen step is just a smoke test - #2078. We can definitely replace it with something less stale and more robust.

Of course, before deciding on next steps, we should investigate how other tooling (especially for Python and JavaScript) is compatible with 3.1. The koxudaxi/datamodel-code-generator is OK, but let's inspect others.

As you said, it's been five years. Also, spec 3.2 is out since 09/25, we'll want to update to that at some point, too.

@vdusek
Copy link
Contributor Author

vdusek commented Jan 20, 2026

@janbuchar Alright, I'll prepare a separate PR that removes the Go client generation step and replaces it with better checks.

@vdusek vdusek mentioned this pull request Jan 20, 2026
1 task
vdusek added a commit that referenced this pull request Jan 21, 2026
### Issue

- Relates: #2182

### Description

- Add Redocly and Spectral for OpenAPI lint checks.
  - **Maybe using only Redocly is enough? Let me know your opinion.**
- Fixed 62 Spectral validation errors (missing required fields,
incorrect types, nullable issues).
- In Redocly, we have the errors set as warnings, I will resolve them in
#2188.
- Add YAML style lint check.
  - Only for the OpenAPI definitions.
  - Unify and enforce style.
- **Double quotes as in JSON or single quotes as we prefer in Py and
AFAIK in JS as well, any opinion?** 🙂
- Remove Go API client generation job, as discussed in
#2188.
- It is replaced with the `validate` step, where we validate the bundled
specification with the Redocly and check its size.
- The new OpenAPI CI is: `lint-check -> build ->  validate`.

### Testing

- CI passes
@vdusek vdusek force-pushed the update-to-openapi-31 branch from 95d8a2c to c76e297 Compare January 21, 2026 09:50
@apify-service-account
Copy link

Preview for this PR was built for commit c76e297 and is ready at https://pr-2188.preview.docs.apify.com!

Copy link
Contributor

@janbuchar janbuchar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vdusek vdusek changed the title chore(openapi): Update to Open API v3.1 chore(openapi): Update to Open API v3.1.2 Jan 21, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit d851fed and is ready at https://pr-2188.preview.docs.apify.com!

@vdusek vdusek merged commit 8851313 into master Jan 21, 2026
13 checks passed
@vdusek vdusek deleted the update-to-openapi-31 branch January 21, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants