OpenAPIDeserializer produces message with location that omits the mediaType
See original GitHub issueThe OpenAPIDeserializer is generally good at indicating where an error was encountered. However, in the case below, it produces a message
attribute paths.'/myPath'(get).responses.200.content.bar is unexpected
It should instead read
attribute paths.'/myPath'(get).responses.200.content.'application/json'.bar is unexpected
How to reproduce:
- Store this file as input.yaml.
- Store this file as ParseOpenAPI3File.java.
Compile it with a classpath that contains slf4j-api-1.5.8.jar slf4j-jdk14-1.5.8.jar jackson-core-2.9.9.jar jackson-dataformat-yaml-2.9.9.jar jackson-databind-2.9.9.jar jackson-annotations-2.9.9.jar commons-io-1.4.jar commons-lang3-3.1.jar swagger-models-2.0.8.jar swagger-parser-v3-2.0.12.jar swagger-core-2.0.8.jar swagger-parser-core-2.0.12.jar snakeyaml.jar
- Run it with one argument, namely the absolute file name from step 1.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Media Types - Swagger
Each media type includes a schema , defining the data type of the message body, and, optionally, one or several examples. For more...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The following patch fixes it:
issue1274-fix.diff.gz
closed by #1295