krakenjs / swaggerize-routes

Swagger document driven route builder.
Other
58 stars 57 forks source link

Use parameters property of path items for validation #38

Closed MugeSo closed 9 years ago

MugeSo commented 9 years ago

Parameters property of Path Item Object should also be used for validation. And it can be overridden by parameters property of operation object.

https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#pathItemObject

tlivings commented 9 years ago

Why do you need to capture the input type (parameter.in) in the key? Wouldn't parameters existing under the same path require unique names anyway?

MugeSo commented 9 years ago

Because the swagger spec says:

The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location.