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 JSON Schema validation #884

Closed
chris-rock opened this issue Aug 8, 2016 · 3 comments
Closed

Add JSON Schema validation #884

chris-rock opened this issue Aug 8, 2016 · 3 comments
Assignees
Labels
Type: Chore How can you have any pudding if you don't eat your meat?
Milestone

Comments

@chris-rock
Copy link
Contributor

Description

It is critical that the inspec exec /path/to/profile returns stable output, since its a API that is consumed in other applications. The current test coverage can be improved.

InSpec and Platform Version

0.28.0

Possible Solutions

Develop a JSON Schema for each operation and validate output against it

@chris-rock chris-rock modified the milestones: 0.29.0, 1.0.0 Aug 8, 2016
@chris-rock
Copy link
Contributor Author

This should be added, once we update the API with #811

@chris-rock chris-rock modified the milestones: 1.0.0, 0.31.0 Aug 8, 2016
@chris-rock
Copy link
Contributor Author

It is quite difficult to verify hash values with JSON Schema, see http://stackoverflow.com/questions/22229250/how-to-create-json-schema-for-name-value-structure

We should stick to http://json-schema.org/documentation.html v4. We could use https://github.com/ruby-json-schema/json-schema in our tests

@chris-rock chris-rock modified the milestones: 0.31.0, 0.32.0 Aug 18, 2016
@arlimus arlimus added the Type: Chore How can you have any pudding if you don't eat your meat? label Aug 22, 2016
@arlimus arlimus modified the milestones: 1.0.0, 0.32.0 Aug 22, 2016
@chris-rock chris-rock modified the milestones: 1.0.0, 1.1.0 Sep 21, 2016
@arlimus
Copy link
Contributor

arlimus commented Feb 28, 2017

This would have prevented a mistaken exposure in the --format json I merged, fail 🤕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Chore How can you have any pudding if you don't eat your meat?
Projects
None yet
Development

No branches or pull requests

2 participants