-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Parameters in swagger:route produce validation warnings #1785
Comments
the syntax in the doc comments is wrong. |
The docs don't even mention a way to do this, I went by the tests, still, that's a separate issue, no? |
You link parameters through parameter structs, not by defining them in the location where you did. If you want to define things like this, there is swagger:operation which allows you to put the yaml for the operation instead |
I'm aware of
Basically similar to how responses are defined (though params should accept n definitions, not just one) |
you can use swagger:operation for that |
Right, but that uses raw yaml, I'd rather have stronger consistency guarantees. |
Problem statement
When generating a spec from source, specifying parameter types in swagger:route can produce warnings during validation.
Steps to reproduce
The above definition produces:
Few issues in the generated spec:
type: object
is invalid outside of the schema objectschema: { type: string }
is invalidEnvironment
swagger version: 0.17.2
go version: 1.11
OS: linux
The text was updated successfully, but these errors were encountered: