简体   繁体   English

如何共享 Swagger 文档

[英]How to share Swagger documentation

I recently started using Swagger for my documentation but there are few things that are still unclear to me.我最近开始在我的文档中使用 Swagger,但我仍然不清楚一些事情。 I created my YAML document and now I would like to be able to share my documentation in a .pdf or HTML/Javascript page with the rest of my team.我创建了我的 YAML 文档,现在我希望能够以 .pdf 或 HTML/Javascript 页面与团队的其他成员共享我的文档。 I can't use SwaggerHub because they don't have private repositories and Swagger Editor doesn't appear to allow to share the panel on the right.我不能使用 SwaggerHub,因为他们没有私有存储库,而且 Swagger Editor 似乎不允许共享右侧的面板。

Just to be clear, I would like to be able to get something like:为了清楚起见,我希望能够得到类似的东西:

在此处输入图像描述

What am I missing?我错过了什么?

I'm biased as I work on swaggerhub, but that's what the project is for:我在 swaggerhub 上工作时有偏见,但这就是该项目的目的:

https://swaggerhub.com https://swaggerhub.com

From there, you can push your swagger specs automatically to github and also make other users collaborators on the API (or just read-only).从那里,您可以将您的 swagger 规范自动推送到 github,并让其他用户成为 API 上的协作者(或只读)。

DynamicApis.com is a new API portal that is up-and-coming and they have an awesome integration guide you can build for free using your Swagger JSON. DynamicApis.com 是一个新兴的 API 门户,它有一个很棒的集成指南,您可以使用 Swagger JSON 免费构建。 Check out https://www.dynamicapis.com/app/quickguide .查看https://www.dynamicapis.com/app/quickguide Here is an example of one that a friend of mine generated.这是我的一个朋友生成的一个例子。 http://bit.ly/1RIVvGN . http://bit.ly/1RIVvGN

They also allow you to create your API portal like GitHub and let you upload your Swagger 2.0 documents to generate an awesome UI for your APIs.它们还允许您创建像 GitHub 一样的 API 门户,并让您上传 Swagger 2.0 文档,为您的 API 生成一个很棒的 UI。 You can go to their site and check out some example portals to see the UI too.您也可以访问他们的站点并查看一些示例门户以查看 UI。

They generate bit.ly links for your integration guides so you can share with people.它们为您的集成指南生成 bit.ly 链接,以便您可以与人分享。

Hope this helps!希望这可以帮助!

We are trying to collaborate with another company but only have the basic four licence Team arrangement.我们正在尝试与另一家公司合作,但只有基本的四个许可证团队安排。 It is a product we are developing so my API has to be private.这是我们正在开发的产品,所以我的 API 必须是私有的。 I am using SwaggerHub but was disappointed to see that users can only see my private APIs if they are "collaborators" and hence covered by a paid licence (you can easily share public APIs on SwaggerHub).我正在使用 SwaggerHub,但很失望地看到用户只能看到我的私有 API,如果他们是“合作者”并因此受到付费许可证的覆盖(您可以轻松地在 SwaggerHub 上共享公共 API)。 I guess this will mean hosting the HTML doco (which you can download from your SwaggerHub API) in my own Cloud-hosted instance of Swagger UI and securing it behind a logon...Open to suggestions!我想这将意味着在我自己的 Swagger UI 的云托管实例中托管 HTML doco(您可以从 SwaggerHub API 下载)并在登录后保护它……欢迎提出建议!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM