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

WIP: Use santhosh-tekuri/jsonschema #487

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

lkm
Copy link

@lkm lkm commented Feb 11, 2022

This is based of this PR #318 to remove internal validation and originally replace with xeipuuv/gojsonschema and then in the newest commits replace with santhosh-tekuri/jsonschema

I'm using an extension (openapi3/components_extension.go to validate all components.schemas in one go as this seems to be the only way to keep internal document referencing working, e.g. #/components.schemas.ExampleObject.

This is very much still a work in progress and I'd need to resolve the fact the for this to work fully within the openapi3filter we'll need the complete openapi3.T document to resolve request and response references too. However, that very much seems to go against the grain of the current design.

I could use some input or opinions on direction. @fenollp

fenollp and others added 5 commits February 9, 2022 14:56
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
@lkm
Copy link
Author

lkm commented Feb 11, 2022

Another idea would be to use the OAS json schema to validate the entire document, see https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.1/schema.json - however, that may be too much tie-in and too big of a diversion as we'd have to write a few extensions to handle the different aspects.

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

Successfully merging this pull request may close these issues.

None yet

2 participants