{"action":"opened","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/684","labels_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/684/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/684/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/684/events","html_url":"https://github.com/swagger-api/swagger-editor/issues/684","id":110701092,"number":684,"title":"swagger editor does not handle optional query parameters","user":{"login":"wjblazek","id":15053115,"avatar_url":"https://avatars.githubusercontent.com/u/15053115?v=3","gravatar_id":"","url":"https://api.github.com/users/wjblazek","html_url":"https://github.com/wjblazek","followers_url":"https://api.github.com/users/wjblazek/followers","following_url":"https://api.github.com/users/wjblazek/following{/other_user}","gists_url":"https://api.github.com/users/wjblazek/gists{/gist_id}","starred_url":"https://api.github.com/users/wjblazek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjblazek/subscriptions","organizations_url":"https://api.github.com/users/wjblazek/orgs","repos_url":"https://api.github.com/users/wjblazek/repos","events_url":"https://api.github.com/users/wjblazek/events{/privacy}","received_events_url":"https://api.github.com/users/wjblazek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-09T17:15:49Z","updated_at":"2015-10-09T17:15:49Z","closed_at":null,"body":"I’ve searched all the posts here and elsewhere and don’t see this issue addressed anywhere.\r\nThe swagger editor does not appear to handle optional query parameters correctly.\r\nWhen parameters are listed as required: false in the parameter list, \r\nthe Try this operation UI always includes them in the send request with no values instead of leaving them out of the request.\r\nThere does not appear to be a way to send a request that does not include optional query parameters.\r\nIs this a known issue?\r\n\r\nI have an API to do these operations:\r\nGET http://somehost/v1/xyz                                                      # GETs all things\r\nGET http://somehost/v1/xyz?parm1=value1                             # GETs all things filtered by param1\r\nGET http://somehost/v1/xyz?parm2=value2                             # GETs all things filtered by param2\r\nGET http://somehost/v1/xyz?parm1=value1&parm2=value2    # GETs all things filtered by param1 and param2\r\n\r\nBut the Try this operation UI will only do the last operation, \r\nGET http://somehost/v1/xyz?parm1=value1&parm2=value2\r\neven though the 2 query parameters are optional.\r\nIt will not do the 1st 3 operations: without either optional parameter or with only one of them.\r\nI also tried the allowEmptyValue: true attribute without success.\r\n\r\n  /xyz:\r\n    get:\r\n      tags:\r\n        - xyz URL01 \r\n      summary: All xyz Messages \r\n      description: Provides All xyz Messages for the given Account ID.\r\n      parameters:\r\n        - name: AccountId\r\n          in: header\r\n          description: User Authorization\r\n          required: true\r\n          type: string\r\n          format: int10\r\n        - name: parm1\r\n          in: query\r\n          description: parm1\r\n          required: false\r\n          type: string\r\n          format: int10\r\n          allowEmptyValue: true\r\n        - name: parm2\r\n          in: query\r\n          description: parm2\r\n          required: false\r\n          type: string\r\n          format: int10\r\n          allowEmptyValue: true\r\n\r\n\r\nI also tried splitting out the URLs and it still does the same thing.\r\nThe Try this operation UI for URL01 below pulled in the parameters from the other URLs, 2,3,4.\r\n\r\n\r\n /xyz:\r\n    get:\r\n      tags:\r\n        - xyz URL01 \r\n      summary: All xyz Messages \r\n      description: Provides All xyz Messages for the given Account ID.\r\n      parameters:\r\n        - name: AccountId\r\n          in: header\r\n          description: User Authorization\r\n          required: true\r\n          type: string\r\n          format: int10\r\n\r\n /xyz:\r\n    get:\r\n      tags:\r\n        - xyz URL02 \r\n      summary: All xyz Messages \r\n      description: Provides All xyz Messages for the given Account ID.\r\n      parameters:\r\n        - name: AccountId\r\n          in: header\r\n          description: User Authorization\r\n          required: true\r\n          type: string\r\n          format: int10\r\n        - name: parm1\r\n          in: query\r\n          description: parm1\r\n          required: false\r\n          type: string\r\n          format: int10\r\n          allowEmptyValue: true\r\n \r\n/xyz:\r\n    get:\r\n      tags:\r\n        - xyz URL03 \r\n      summary: All xyz Messages \r\n      description: Provides All xyz Messages for the given Account ID.\r\n      parameters:\r\n        - name: AccountId\r\n          in: header\r\n          description: User Authorization\r\n          required: true\r\n          type: string\r\n          format: int10\r\n        - name: parm2\r\n          in: query\r\n          description: parm2\r\n          required: false\r\n          type: string\r\n          format: int10\r\n          allowEmptyValue: true\r\n\r\nxyz:\r\n    get:\r\n      tags:\r\n        - xyz URL04 \r\n      summary: All xyz Messages \r\n      description: Provides All xyz Messages for the given Account ID.\r\n      parameters:\r\n        - name: AccountId\r\n          in: header\r\n          description: User Authorization\r\n          required: true\r\n          type: string\r\n          format: int10\r\n        - name: parm1\r\n          in: query\r\n          description: parm1\r\n          required: false\r\n          type: string\r\n          format: int10\r\n          allowEmptyValue: true\r\n        - name: parm2\r\n          in: query\r\n          description: parm2\r\n          required: false\r\n          type: string\r\n          format: int10\r\n          allowEmptyValue: true\r\n\r\n\r\nIs this a known problem?\r\nThanks!\r\n"}}