Skip to content
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

The paths property pattern is wrong in v3.1 #4124

Open
Gorniaky opened this issue Oct 3, 2024 · 6 comments
Open

The paths property pattern is wrong in v3.1 #4124

Gorniaky opened this issue Oct 3, 2024 · 6 comments

Comments

@Gorniaky
Copy link

Gorniaky commented Oct 3, 2024

The current pattern is considering any /path entry as an error, when it shouldn't.

image

@handrews
Copy link
Member

handrews commented Oct 4, 2024

@Gorniaky $schema is a JSON Schema keyword, not an OpenAPI Specification field. You cannot use it outside of the Schema Object. The JSON Schema for an OpenAPI Description is implied by the openapi field.

@Gorniaky
Copy link
Author

Gorniaky commented Oct 4, 2024

@Gorniaky $schema is a JSON Schema keyword, not an OpenAPI Specification field. You cannot use it outside of the Schema Object. The JSON Schema for an OpenAPI Description is implied by the openapi field.

I use $schema to have autocomplete, but that has nothing to do with the issue.

@handrews
Copy link
Member

handrews commented Oct 4, 2024

@Gorniaky regardless of how you are using $schema, what you have posted in this issue is not a valid OpenAPI document, so I don't know how else to address it. We also cannot provide tooling support, so if you expect a specific tool to work with what you have posted, you will need to take that up with your tooling provider.

@Gorniaky
Copy link
Author

Gorniaky commented Oct 4, 2024

@Gorniaky regardless of how you are using $schema, what you have posted in this issue is not a valid OpenAPI document, so I don't know how else to address it. We also cannot provide tooling support, so if you expect a specific tool to work with what you have posted, you will need to take that up with your tooling provider.

Is this serious? You didn't even analyze the problem, it's not an external problem, it's within the v3.1 standard that has a bug in the in the paths keyword.

@Gorniaky
Copy link
Author

Gorniaky commented Oct 4, 2024

I analyzed the problem, and I came to this conclusion:

If you write other specifications next to the $ref keyword, the $ref keyword overrides the other specifications, causing a bug in the schema.

The patternProperties keyword in #/$defs/specification-extensions overrides the patternProperties keyword in paths.

image

@Gorniaky
Copy link
Author

Gorniaky commented Oct 4, 2024

The most amazing thing is that they wrote this bug in other keywords in the scheme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants