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

Add optional reporting of results in json to allow scripting the tool #43

Closed
aspear opened this issue May 30, 2019 · 2 comments · Fixed by #45
Closed

Add optional reporting of results in json to allow scripting the tool #43

aspear opened this issue May 30, 2019 · 2 comments · Fixed by #45
Labels

Comments

@aspear
Copy link
Contributor

aspear commented May 30, 2019

Adding a new option to the command line tool that allows printing the results directly in json would be nice for use cases where someone wants to script calling lint-open api from another tool. Something like "lint-openapi --json ./path/to/swagger.json"

I have this implemented already and will submit a PR for it.

@dpopp07
Copy link
Member

dpopp07 commented May 30, 2019

Love this idea. Just this morning, I was just watching a demo of another CLI tool that did this and I noted that we should put it in here at some point. Thanks for these contributions!

aspear added a commit to aspear/openapi-validator that referenced this issue May 30, 2019
This revision adds a new --json option to the cli-validator that prints the internal
result data in json format to stdout.  It does additionally include the line number
as a 'line' field in the JSON (this is not in the internal json data).  Automated
test validates that json is received.

Closes IBM#43
dpopp07 pushed a commit that referenced this issue May 31, 2019
# [0.8.0](v0.7.0...v0.8.0) (2019-05-31)

### Features

* Added -j/--json output option to cli-validator ([759856f](759856f)), closes [#43](#43)
@dpopp07
Copy link
Member

dpopp07 commented May 31, 2019

🎉 This issue has been resolved in version 0.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants