{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/5306","repository_url":"https://api.github.com/repos/swagger-api/swagger-ui","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/5306/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/5306/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/5306/events","html_url":"https://github.com/swagger-api/swagger-ui/issues/5306","id":433737226,"node_id":"MDU6SXNzdWU0MzM3MzcyMjY=","number":5306,"title":"x-http-method-override header support not present creating issues","user":{"login":"sinsharat","id":20169156,"node_id":"MDQ6VXNlcjIwMTY5MTU2","avatar_url":"https://avatars3.githubusercontent.com/u/20169156?v=4","gravatar_id":"","url":"https://api.github.com/users/sinsharat","html_url":"https://github.com/sinsharat","followers_url":"https://api.github.com/users/sinsharat/followers","following_url":"https://api.github.com/users/sinsharat/following{/other_user}","gists_url":"https://api.github.com/users/sinsharat/gists{/gist_id}","starred_url":"https://api.github.com/users/sinsharat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinsharat/subscriptions","organizations_url":"https://api.github.com/users/sinsharat/orgs","repos_url":"https://api.github.com/users/sinsharat/repos","events_url":"https://api.github.com/users/sinsharat/events{/privacy}","received_events_url":"https://api.github.com/users/sinsharat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2019-04-16T11:50:58Z","updated_at":"2019-06-14T12:21:25Z","closed_at":null,"author_association":"NONE","body":" ### Content & configuration\r\n\r\nSwagger/OpenAPI definition:\r\n ```yaml\r\n '/toneprovide/catalogs':\r\n    post:\r\n      summary: browse a catalog/category (post method made get via override header)\r\n      description: API interaction for browsing a category\r\n      operationId: browseCatalogs\r\n      tags:\r\n        - catalog-management\r\n      consumes:\r\n        - application/json\r\n      produces:\r\n        - application/json\r\n      parameters:\r\n        - in: header\r\n          name: X-HTTP-Method-Override\r\n          type: string\r\n          required: true\r\n        - in: query\r\n          name: startRecord\r\n          description: start record of the category\r\n          required: true\r\n          type: string\r\n          pattern: '\\d{1,8}'\r\n        - in: query\r\n          name: total\r\n          description: Total numbers of categories to be fetched\r\n          required: true\r\n          type: string\r\n          pattern: '\\d{1,5}'\r\n        - in: body\r\n          name: browseCatalog\r\n          description: browse catalog information\r\n          required: true\r\n          schema:\r\n            $ref: '#/definitions/BrowseCatalog'\r\n      responses:\r\n        '200':\r\n          description: Success\r\n          headers:\r\n            x-huawei-rbt-total-count:\r\n              type: string\r\n              description: Total cont available for the requested resource.\r\n          schema:\r\n            type: object\r\n            required:\r\n              - status\r\n              - count\r\n              - type\r\n              - results\r\n            properties:\r\n              status:\r\n                type: string\r\n              count:\r\n                type: integer\r\n                format: int64\r\n              type:\r\n                type: string\r\n              results:\r\n                type: array\r\n                items:\r\n                  $ref: '#/definitions/CatalogInfo'\r\n        '400':\r\n          description: Bad Request\r\n          schema:\r\n            $ref: '#/definitions/ErrorResponse'\r\n        '401':\r\n          description: Unauthorized\r\n          schema:\r\n            $ref: '#/definitions/ErrorResponse'\r\n        '403':\r\n          description: Forbidden\r\n          schema:\r\n            $ref: '#/definitions/ErrorResponse'\r\n        '500':\r\n          description: Internal Server Error\r\n      externalDocs:\r\n        url: 'http://api.example.com/docs/user-operations/categories'\r\n        description: Learn more about Video operations provided by this API.\r\n    post:\r\n      summary: Add a catalog/category\r\n      description: API interaction for operator adding a category\r\n      operationId: addCatalog\r\n      tags:\r\n        - catalog-management\r\n      consumes:\r\n        - application/json\r\n      produces:\r\n        - application/json\r\n      parameters:\r\n        - in: body\r\n          name: catalog\r\n          description: catalogInformation\r\n          required: true\r\n          schema:\r\n            $ref: '#/definitions/Catalog'\r\n      responses:\r\n        '200':\r\n          description: Success\r\n          schema:\r\n            type: object\r\n            required:\r\n              - status\r\n              - count\r\n              - type\r\n              - results\r\n            properties:\r\n              status:\r\n                type: string\r\n              count:\r\n                type: integer\r\n                format: int64\r\n              type:\r\n                type: string\r\n              results:\r\n                type: array\r\n                items:\r\n                  type: string\r\n        '400':\r\n          description: Bad Request\r\n          schema:\r\n            $ref: '#/definitions/ErrorResponse'\r\n        '401':\r\n          description: Unauthorized\r\n          schema:\r\n            $ref: '#/definitions/ErrorResponse'\r\n        '403':\r\n          description: Forbidden\r\n          schema:\r\n            $ref: '#/definitions/ErrorResponse'\r\n        '500':\r\n          description: Internal Server Error\r\n      externalDocs:\r\n        url: 'http://api.example.com/docs/user-operations/categories'\r\n        description: Learn more about Video operations provided by this API.\r\n\r\n### Is your feature request related to a problem?\r\nGenerally PUT, DELETE and PATCH methods are not supported at the production servers. To handle this we use POST with x-http-method-override in server code to handle PUT, POST and DELETE methods. Sometimes GET request as POST as well for request which required passing too many filter requests.\r\n### Describe the solution you'd like\r\n<!-- A clear and concise description of what you want to happen. -->\r\nSwagger as of now does not allow multiple POST requests for a single Url even though header difference is there.\r\nSo the only option stays here to specify them as POST, PUT, DELETE and GET only.\r\n\r\nThe issue this creates is while generating client code using swagger-codegen-cli as it create sending request for the specified methods as per the document.\r\n### Describe alternatives you've considered\r\n<!--\r\n  A clear and concise description of any alternative solutions or features\r\n  you've considered.\r\n-->\r\nRequest you to provide how the problem can be solved.\r\nCan such feature support be expected in future. As such issues are making using swagger un-usable.\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/comments/502088045","html_url":"https://github.com/swagger-api/swagger-ui/issues/5306#issuecomment-502088045","issue_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/5306","id":502088045,"node_id":"MDEyOklzc3VlQ29tbWVudDUwMjA4ODA0NQ==","user":{"login":"slst19","id":51824171,"node_id":"MDQ6VXNlcjUxODI0MTcx","avatar_url":"https://avatars0.githubusercontent.com/u/51824171?v=4","gravatar_id":"","url":"https://api.github.com/users/slst19","html_url":"https://github.com/slst19","followers_url":"https://api.github.com/users/slst19/followers","following_url":"https://api.github.com/users/slst19/following{/other_user}","gists_url":"https://api.github.com/users/slst19/gists{/gist_id}","starred_url":"https://api.github.com/users/slst19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slst19/subscriptions","organizations_url":"https://api.github.com/users/slst19/orgs","repos_url":"https://api.github.com/users/slst19/repos","events_url":"https://api.github.com/users/slst19/events{/privacy}","received_events_url":"https://api.github.com/users/slst19/received_events","type":"User","site_admin":false},"created_at":"2019-06-14T12:21:25Z","updated_at":"2019-06-14T12:21:25Z","author_association":"NONE","body":"@leggsimon @sinsharat Is there any workaround to make this work."}}
{"actor":{"display_login":"slst19"}}