-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta schema 3.1 is wrong for path / pathItem #3513
Comments
Thanks, @LasneF. This is a dup of #3298 and is addressed by PR #3355, which (like all not-yet-deployed schema PRs — technically only the Schema Object portion is a metaschema) is awaiting proper resolution to #151 (comment). Which we expect to actually have fairly soon as it's part of the big clean-up we're doing on the issue/PR/process backlog as discussed in the TDC calls this month. |
not 100 % sure read the PR correctly path-item-or-reference: is removed
or
should the docuementation https://spec.openapis.org/oas/latest.html#fixed-fields-6 being updated ? |
@LasneF PathItem is a special case for referencing which uses a different syntax/semantics for adjacent properties. So PR #3355 deletes |
Schemathesis uses static version of the current published version of the OpenApi 3.1 spec metaschema (https://spec.openapis.org/oas/3.1/schema/2022-10-07) to validate openapi 3.1 spec documents. Unfortunately, the published version has at least one known bug in which the schema for `paths` references the definition of a concrete `path-item` instead of `path-item-or-reference`, which might still be technically incorrect when it comes handling the case of ref and sibling fields, but is correct according to the documented definition of a pathItemObject. This oversight has been noticed multiple times OAI/OpenAPI-Specification#3298 OAI/OpenAPI-Specification#2635 (comment) OAI/OpenAPI-Specification#2635 (comment) OAI/OpenAPI-Specification#3513 OAI/OpenAPI-Specification#2657 (comment) And finally fixed in Feb 2024 OAI/OpenAPI-Specification#3355 with a slightly bigger rework of the pathItem schema. Sadly, due to confusion about how to release fixes in schemas OAI/OpenAPI-Specification#151 (comment) this change has not been published anywhere except schema.yaml in the git repo, not even in schema.json, which appearantly only gets refreshed once per release of the metaschema OAI/OpenAPI-Specification#3355 (comment) This commit updates the stored schema from the most up-to-date 3.1.0 schema.yaml from 0035208 to close the bug and make spec-valid openapi spec files that use $ref under path finally validate correctly in schemathesis. It also adds a corresponding regression test
Accordinf to https://spec.openapis.org/oas/latest.html#fixed-fields-6
Path item Object should support $ref as in the snippet below
it looks not supported in the meta schema
https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.1/schema.yaml#L211
to me the line 209 is wrong
but should be
this has been found here : daveshanley/vacuum#422
The text was updated successfully, but these errors were encountered: