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

openapi-request-validator: Fix componentSchemas type (fixes #820) #821

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aldex32
Copy link

@aldex32 aldex32 commented Jul 8, 2022

No description provided.

@jsdevel
Copy link
Contributor

jsdevel commented Jul 8, 2022

thanks @aldex32 . i believe this is technically a breaking change correct?

@aldex32
Copy link
Author

aldex32 commented Jul 8, 2022

Hey @jsdevel , yes it is a breaking change.
I can avoid it buy making it backward compatible like this:

  componentSchemas?: IJsonSchema[] | { [key: string]: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject; };

But I am not sure if the type IJsonSchema[] is/was correct. Also all the tests I see in this project are not assigning any array to this field. Unfortunately the tests are not type checking the arguments passed to the constructor of OpenAPIRequestValidator and this probably was the reason of not catching the wrong type.

@jsdevel
Copy link
Contributor

jsdevel commented Aug 1, 2022

@aldex32 breaking change doesn't scare me. is this in line with th OpenAPI schema?

@jsdevel
Copy link
Contributor

jsdevel commented Sep 15, 2022

@aldex32 ?

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