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

JSON Schema validator? #10

Closed
silas opened this issue Mar 16, 2014 · 4 comments
Closed

JSON Schema validator? #10

silas opened this issue Mar 16, 2014 · 4 comments

Comments

@silas
Copy link
Contributor

silas commented Mar 16, 2014

I took a rough first stab (definitely not complete) at creating a JSON Schema validator (like api-declaration-schema.json) for the new spec, is there any interest in having an official JSON schema, or do you want to keep swagger-spec primarily a textual reference?

https://github.com/silas/swagger-schema/tree/master/spec

The current format probably isn't acceptable for a published document.

@quasipedia
Copy link

👍 for me, this would greatly simplify third parties implementations of the specification.

@webron
Copy link
Member

webron commented Mar 17, 2014

I believe the goal is to be able to provide a JSON Schema as well
(definitely not instead as it doesn't contain explanations) and it's one of
those things down the list. Obviously, anything to start off with would be
great, so thanks for the effort Silas!

On Mon, Mar 17, 2014 at 2:11 AM, Mac Ryan notifications@github.com wrote:

[image: 👍] for me, this would greatly simplify third parties
implementations of the specification.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-37776485
.

@vlcinsky
Copy link

Great.
We shall have two schemas, one for resource listing and one for resource spec.
Try to be as explicit - this will allow detecting subtle errors quickly by test suites - schema working as sort of automated Swagger consultant :-)

I would skip adding validator (as piece of code) into spec, this is task for users to find some.

As soon as you will have the schema ready for comments, let me know, I can propose or even do few modifications to make it more explicit. Typically reviewing all places, where "string" is required, very often it can be much more restrictive and still following what is intended to be used.

@silas
Copy link
Contributor Author

silas commented May 25, 2014

Looks like this was fixed in 3174724

@silas silas closed this as completed May 25, 2014
fehguy added a commit that referenced this issue Sep 8, 2014
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

No branches or pull requests

4 participants