swaggerhub

How to set the Accept header globally in OpenAPI 3.0?

会有一股神秘感。 提交于 2020-03-16 05:40:06
问题 I have a new OpenAPI setup via SwaggerHub. Is there an option to force a certain Accept header globally? I have set up the Content-Type on the response: openapi: 3.0.0 paths: /test-path: get: responses: '200': description: OK content: application/vnd.company.v1.0.0+json: When inserting a different Accept header via cURL request, the following out is made: {"message":"Missing matching response for specified Accept header"} That makes sense, since we aren't providing any response for that. 回答1:

How to set the Accept header globally in OpenAPI 3.0?

谁说胖子不能爱 提交于 2020-03-16 05:39:11
问题 I have a new OpenAPI setup via SwaggerHub. Is there an option to force a certain Accept header globally? I have set up the Content-Type on the response: openapi: 3.0.0 paths: /test-path: get: responses: '200': description: OK content: application/vnd.company.v1.0.0+json: When inserting a different Accept header via cURL request, the following out is made: {"message":"Missing matching response for specified Accept header"} That makes sense, since we aren't providing any response for that. 回答1:

How to set the Accept header globally in OpenAPI 3.0?

本小妞迷上赌 提交于 2020-03-16 05:39:08
问题 I have a new OpenAPI setup via SwaggerHub. Is there an option to force a certain Accept header globally? I have set up the Content-Type on the response: openapi: 3.0.0 paths: /test-path: get: responses: '200': description: OK content: application/vnd.company.v1.0.0+json: When inserting a different Accept header via cURL request, the following out is made: {"message":"Missing matching response for specified Accept header"} That makes sense, since we aren't providing any response for that. 回答1:

Is there an API in SwaggerHub to update the file definition?

百般思念 提交于 2019-11-29 15:47:34
Is there an API to update the file definition? I am looking for a way to keep my project in Git and SwaggerHub in sync automatically, so I would like to update the file definition at every merge. Is it possible? How do you manage keeping your project and SwaggerHub definition in sync automatically? Yes, SwaggerHub has an API: https://api.swaggerhub.com Integrating with the SwaggerHub API You can update your API definitions in SwaggerHub like this: POST https://api.swaggerhub.com/apis/OWNER/API_NAME Authorization: YOUR_API_KEY Content-Type: application/yaml # Request body is your complete YAML

Is there an API in SwaggerHub to update the file definition?

北城余情 提交于 2019-11-26 22:07:40
问题 Is there an API to update the file definition? I am looking for a way to keep my project in Git and SwaggerHub in sync automatically, so I would like to update the file definition at every merge. Is it possible? How do you manage keeping your project and SwaggerHub definition in sync automatically? 回答1: Yes, SwaggerHub has an API: https://api.swaggerhub.com Integrating with the SwaggerHub API You can update your API definitions in SwaggerHub like this: POST https://api.swaggerhub.com/apis