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

Optional query parameters #82

Closed
Krzysztof-Cieslak opened this issue Aug 3, 2017 · 2 comments
Closed

Optional query parameters #82

Krzysztof-Cieslak opened this issue Aug 3, 2017 · 2 comments
Assignees

Comments

@Krzysztof-Cieslak
Copy link
Member

Krzysztof-Cieslak commented Aug 3, 2017

Description

Optional query parameters generates are not respected - generated functions require providing all query parameters

Repro steps

https://github.com/Krzysztof-Cieslak/SwaggerProviderOptionalQuery

Expected behavior

Using optional query parameters should generate functions using optional parameters, or options.

Schema

{
  "swagger": "2.0",
  "info": {
    "title": "test",
    "version": "0.0"
  },
  "security": [
    {
      "api_key": []
    },
    {
      "seymour_oauth": []
    }
  ],
  "consumes": [
    "application/json",
    "application/x-www-form-urlencoded",
    "application/jwt"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/accounts/": {
      "get": {
        "summary": "List accounts",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful"
          }
        }
      }
    }
  }
}
@sergey-tihon
Copy link
Member

Fix released in v0.8.0

@Krzysztof-Cieslak
Copy link
Member Author

Thanks a lot! 😍

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