json R的示例Swagger输出
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json R的示例Swagger输出相关的知识,希望对你有一定的参考价值。
{
"swagger": "2.0",
"info": {
"description": "API Description",
"title": "API Title",
"version": "1.0.0"
},
"host": "localhost:8000",
"schemes": [
"http"
],
"produces": [
"application\/json"
],
"paths": {
"\/score": {
"get": {
"summary": " Score a basic model to predict admit staths",
"responses": {
"default": {
"description": "Default response."
}
},
"parameters": [
{
"name": "gre",
"description": "the applicants gre",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "gpa",
"description": "the applicants gpa",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "rank",
"description": "The admissions rank",
"in": "query",
"required": false,
"type": "string"
}
]
}
}
},
"basePath": "\/"
}
以上是关于json R的示例Swagger输出的主要内容,如果未能解决你的问题,请参考以下文章
FastAPI学习-9. Swagger文档输出请求示例example
swagger怎么根据java生成json
如何将 swagger 2.0 JSON 文件分解为多个模块
在 Swagger 中为请求参数提供示例值
Swagger UI 传入对象类型参数
Swagger @ApiModelProperty示例值为null为Long