本文介绍了OpenAPI或swagger.json自动发现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

URL上是否应该放置swagger.json(或约定的任何名称)的规范或约定,以便可以自动发现我网站的公共API?

Is there any spec or convention on URL where one should place swagger.json (or whatever name it is agreed) so that public API of my site can be automatically discovered?

推荐答案

2017年4月19日更新:我之前给的OpenAPI Wiki答案是">对于非常非常旧的规范版本.相同的消息来源指出,对于2.0,标准为swagger.json,对于3.0,标准更改为openapi.json.

Updated 19 April 2017: The OpenAPI Wiki answer I gave previously is "for a very very very old version of the spec". The same source states that for 2.0 the standard is swagger.json, for 3.0 it changes to openapi.json.

原始答案:

希望有帮助.

这篇关于OpenAPI或swagger.json自动发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 05:19