docs(web-server-schema): call out OpenAPI 3.0.x requirement and add 3.1 to 3.0 migration page#2734
Draft
DaveHanns wants to merge 1 commit into
Draft
docs(web-server-schema): call out OpenAPI 3.0.x requirement and add 3.1 to 3.0 migration page#2734DaveHanns wants to merge 1 commit into
DaveHanns wants to merge 1 commit into
Conversation
….1 to 3.0 migration page The `webServerSchema` build validator rejects OpenAPI 3.1 documents, but the current docs say "OpenAPI 3.x" and link to the 3.0.3 spec without stating that 3.1 is unsupported. Users who copy a 3.1 spec (for example, one that uses `"type": ["string", "null"]` for nullable properties) hit an opaque build validation error with no pointer to the fix. This change: - Updates the web server schema landing page to say OpenAPI 3.0.x explicitly and link to the new compatibility page. - Adds a new page under the web server schema section that lists the common 3.1 constructs that break the build (`type` array with `"null"`, `const`, numeric `exclusiveMinimum`/`exclusiveMaximum`, top-level `webhooks`, `contentMediaType`) alongside the 3.0.x form to use instead, plus a full nullable example and two local validation commands. Surfaced during an evaluation of Apify surfaces for agent-driven Actor development. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
✅ Preview for this PR (commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
webServerSchemain.actor/actor.jsonis validated against OpenAPI 3.0.x at build time. The current docs describe the field as accepting "OpenAPI 3.x" and link out to the 3.0.3 spec, but never state that 3.1 is not accepted. Users who copy an existing spec generated by a tool that defaults to 3.1 - or hand-write one using the 3.1 nullable form"type": ["string", "null"]- see the build fail with a validation error that gives no hint about the version constraint or how to fix it.Evidence
Minimal reproducer - an
.actor/openapi.jsonthat is valid OpenAPI 3.1 but uses only 3.1-specific syntax:{ "openapi": "3.1.0", "info": { "title": "My API Actor", "version": "1.0.0" }, "paths": { "/items": { "get": { "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": ["string", "null"] } } } } } } } } } } }apify pushtriggers a build that fails validation ofwebServerSchemawith no indication that the root cause is the OpenAPI version. The existing docs at/platform/actors/development/actor-definition/web-server-schemado not mention the constraint, so there is no obvious next step for the user other than trial-and-error.Changes
sources/platform/actors/development/actor_definition/web_server_schema/index.md: replace two "OpenAPI 3.x" mentions with "OpenAPI 3.0.x", and link to the new compatibility page from both the intro and the "Define the web server schema" section.sources/platform/actors/development/actor_definition/web_server_schema/openapi_version.md(new): explains the version constraint, shows the correctnullable: trueform, includes a table of common 3.1 to 3.0 translations (nullable,exclusiveMinimum/exclusiveMaximum,const,examples,$schema,webhooks,contentMediaType), a full nullable example, and two local validation commands (@redocly/cliand@apidevtools/swagger-cli).Test plan
pnpm startrenders the new page under Web server schema in the sidebar.npx @redocly/cli lint.Surfaced during an evaluation of Apify surfaces for agent-driven Actor development.