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

parameter "type" is not validated #10

Closed
emmasuzuki opened this issue Dec 18, 2017 · 2 comments
Closed

parameter "type" is not validated #10

emmasuzuki opened this issue Dec 18, 2017 · 2 comments

Comments

@emmasuzuki
Copy link

emmasuzuki commented Dec 18, 2017

I have a swagger spec like below:

{
  ...
  "/somepath": {
    "get": {
      "parameters: [{
        "in": "query",
        "name": "path",
        "required": true,
        "type":"string"
      }] 
     ...
}

and when I request with no path in query, validator does not return error.

Is it not supported yet?

I am using Swagger version 2.0.

@naz
Copy link
Owner

naz commented Dec 26, 2017

Hi @emmasuzuki there's no support for query parameters validation at this point. The only thing that gets validated is request body - https://github.com/gargol/swagger-express-validator/blob/master/index.js#L205 . That would be actually a cool feature to implement in the future

@emmasuzuki
Copy link
Author

I see, thanks. I agree it would be nice to have that feature.

@naz naz closed this as completed Apr 12, 2018
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

2 participants