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

Unexpected behavior? - OpenAPIParser #303

Open
angoglez opened this issue Jun 29, 2020 · 0 comments
Open

Unexpected behavior? - OpenAPIParser #303

angoglez opened this issue Jun 29, 2020 · 0 comments
Labels
bug Something isn't working question Further information is requested

Comments

@angoglez
Copy link
Contributor

angoglez commented Jun 29, 2020

Description

I think I found that and unexpected behavior working with ParseOpenApi and using the parseYamlOpenApi object.

Can be reproduced like that:

  1. Create a file which content is a raw string containing a valid JSON OpenAPI schema
  2. Wrap it inside a YamlSource
  3. Use it inside parseYamlOpenApi.parse function to obtain the proper parser.
  4. Result: everything goes OK

🔗 This gist can help.

It doesn't happen the other way round. That is, if you wrap a correct YAML inside a JsonSource and try to use the parseJsonOpenApi method.

I guess, if two different parsers are provided, each one for different formats (modeled in two different case classes), should be this the expected behavior? or it should trigger the error from the first moment saying it's not a proper YAML source?

@angoglez angoglez added bug Something isn't working question Further information is requested labels Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant