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

Read spec version from swagger spec via codegen tools #23

Merged

Conversation

macisamuele
Copy link
Collaborator

The idea of this PR is to ensure that version extraction from swagger specs supports YAML format too.

In order to avoid adding a new dependency (org.yaml.snakeyaml) and manually reading the file I've opted to delegate the parsing process to SwaggerParser provided by swagger-codegen.

NOTE: The check in readVersionFromSpecfile is not needed in case the specs are valid as #/info/version is required. As we don't revalidate the specs adding the check gives us the flexibility of supporting slightly invalid specs as well

Copy link
Collaborator

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cortinico cortinico merged commit 2bb871d into Yelp:master Mar 21, 2019
@macisamuele macisamuele deleted the maci-read-spec-version-with-codegen-tools branch March 21, 2019 18:20
@cortinico cortinico added this to the 1.1.0 milestone Jun 13, 2019
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