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

百般思念 提交于 2019-11-29 15:47:34

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/JSON file
swagger: '2.0'
info:
  title: My API
  version: 1.0.0
paths:
  ...

Use Content-Type: application/yaml if uploading YAML and Content-Type: application/json if uploading JSON.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!