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

Validation:"swagger" field must validate against schema #53

Closed
itgirlalice opened this issue Sep 4, 2015 · 2 comments
Closed

Validation:"swagger" field must validate against schema #53

itgirlalice opened this issue Sep 4, 2015 · 2 comments
Labels

Comments

@itgirlalice
Copy link

When missing "swagger" field, the validation passed. But the "swagger" field is required in schema, so it should validate against schema.

BTY, there are three required filed "swagger", "info" and "paths", but the validation result is different.

  1. Missing "swagger" field, validation pass.
  2. Missing "info", validation failure failed, get error message ".info in body is required".
  3. Missing "paths", get "nil pointer dereference" error, the related issue Nil pointer dereference exception while validate an swagger without path #52.

So hope the 1 and 3 could be fixed.

@itgirlalice itgirlalice changed the title Validation:swagger field must validate against schema Validation:"swagger" field must validate against schema Sep 4, 2015
@casualjim casualjim added the bug label Sep 4, 2015
@itgirlalice
Copy link
Author

@casualjim
Hi casualjim, do we have any plan on this issue?

Thanks,
Alice

@casualjim
Copy link
Member

Yes I'll try to fix some this weekend.
The swagger version fix is relatively easy, haven't really looked into the other one yet

This is the cause for the first one: https://github.com/go-swagger/go-swagger/blob/master/spec/spec.go#L124-L126

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

No branches or pull requests

2 participants