{ "swagger": "2.0", "info": { "description": "This is a sample server celler server.", "title": "ApiDoc", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "UserName", "url": "http://www.swagger.io/support", "email": "support@swagger.io" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0" }, "host": "localhost:8080", "basePath": "/api/v1", "paths": { "/v1/medias/{id}": { "post": { "description": "Test", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Test" ], "summary": "Test", "parameters": [ { "type": "integer", "description": "ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "年龄", "name": "age", "in": "query" }, { "type": "string", "description": "名称", "name": "name", "in": "query" }, { "type": "integer", "name": "limit", "in": "query" }, { "type": "integer", "name": "page", "in": "query" } ], "responses": { "200": { "description": "成功", "schema": { "allOf": [ { "$ref": "#/definitions/requests.Pager" }, { "type": "object", "properties": { "list": { "$ref": "#/definitions/v1.ResponseItem" } } } ] } } } } } }, "definitions": { "requests.Pager": { "type": "object", "properties": { "items": {}, "limit": { "type": "integer" }, "page": { "type": "integer" }, "total": { "type": "integer" } } }, "v1.ResponseItem": { "type": "object" } }, "securityDefinitions": { "BasicAuth": { "type": "basic" } }, "externalDocs": { "description": "OpenAPI", "url": "https://swagger.io/resources/open-api/" } }