atc-net / atc-rest-api-generator

A REST API code generator from OpenAPI Specification in YAML or Json file format
https://atc-net.github.io/repository/atc-rest-api-generator
MIT License
19 stars 4 forks source link

Fix OpenApi yaml validation output #109

Closed rickykaare closed 3 years ago

rickykaare commented 3 years ago

This PR fixes an issue where parsing errors of the input OpenApi yaml causes the OpenApiSpecVersion to default to OpenApi2_0 and outputs the error as "OpenApi 2.x is not supported." instead of the actual error.

The suggested fix is to check for parsing errors first.