- 37
- 0
{
"info": {
"title": "API",
"version": "1.0.1",
"description": "api doc"
},
"host": "localhost:80",
"basePath": "/",
"swagger": "2.0",
"paths": {},
"definitions": {},
"responses": {},
"parameters": {},
"securityDefinitions": {},
"tags": []
}
swagger.json中 最外层的parameters有什么用 怎么写?
- 共 0 条
- 全部回答
-
看別人笑話_ 普通会员 1楼
Swagger parameters are a way to define the structure and behavior of a parameter in a Swagger document. They are used to describe the required, minimum, and maximum values for a parameter, as well as the type of the parameter (e.g. string, number, boolean). For example, you might define a parameter in your Swagger document with the following syntax:
yaml param: name: name in: path required: true type: stringIn this example, the
nameparameter is defined with anameattribute, ainattribute ofpath, arequiredattribute oftrue, and atypeattribute ofstring. This means that the parameter must be present in the path of the API document, and must be of typestring. You can also define complex parameters with multiple properties using attributes, as shown in the following example:yaml param: name: name in: path required: true type: string description: "A description of the parameter" enum: - value1 - value2In this example, the
nameparameter has multiple properties, including adescriptionattribute, anenumattribute, and atypeattribute. Theenumattribute specifies the possible values for the parameter, and thedescriptionattribute provides a brief description of the parameter.
- 扫一扫访问手机版
回答动态

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器更新之后。服务器里面有部分玩家要重新创建角色是怎么回事啊?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题函数计算不同地域的是不能用内网吧?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题ARMS可以创建多个应用嘛?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题在ARMS如何申请加入公测呀?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题前端小程序接入这个arms具体是如何接入监控的,这个init方法在哪里进行添加?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器刚到期,是不是就不能再导出存档了呢?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器的游戏版本不兼容 尝试更新怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器服务器升级以后 就链接不上了,怎么办?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器转移以后服务器进不去了,怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器修改参数后游戏进入不了,是什么情况?预计能赚取 0积分收益
- 回到顶部
- 回到顶部

