OpenAPI 3中是否有自定义属性?
我们有php-swagger,以开放API 3.0格式生成开发人员文档。
有一个任务 - 用于基于生成的API -DOCS.JSON的其他文档,对于静态数量有限的客户端(无需发送请求的能力)。只需删除新的OpenAPI 3.0格式JSON文件,
您就需要以某种方式标记代码中的注释,这些注释是其他文档的注释。并创建一个新的JSON文件。
问题是我不知道如何在PHP代码中的注释级别上标记路线,以便在路由的描述中会有一些功能,这要归功于我可以对此进行解析和提取。与此功能的路线。
We have php-swagger which generates developer documentation in open api 3.0 format.
There was a task - to make OTHER documentation based on the generated api-docs.json, for clients with a limited number of routes, static (without the ability to send requests). Just make a stripped down new openapi 3.0 format json file
It turns out that you need to somehow mark the annotations in the code that these are annotations for OTHER documentation. And create a new json file.
The problem is that I don’t know how to mark the routes at the annotation level in the php code, so that there would be some FEATURE in the description of the route, thanks to which I could parse api-docs.json and extract routes with this feature from it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用供应商扩展名 https://zircote.github.io/swagger-php/guide/common-techniques.html#vendor-extensions
这些都是标准的一部分,但可以忽略,以便您可以以任何自己喜欢的方式使用它们。
You could use vendor extensions https://zircote.github.io/swagger-php/guide/common-techniques.html#vendor-extensions
These are part of the standard but ignored so you can use them in whatever way you like.