Skip to content

Unexpected behavior? - OpenAPIParserย #303

@angoglez

Description

@angoglez

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions