94 lines
2.6 KiB
JSON
94 lines
2.6 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "这个模块负责显示hade的接口",
|
|
"title": "hade",
|
|
"termsOfService": "https://github.com/swaggo/swag",
|
|
"contact": {
|
|
"name": "yejianfeng1",
|
|
"email": "yejianfeng"
|
|
},
|
|
"license": {
|
|
"name": "Apache 2.0",
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
},
|
|
"version": "1.1"
|
|
},
|
|
"basePath": "/",
|
|
"paths": {
|
|
"/demo/demo": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"demo"
|
|
],
|
|
"summary": "获取所有用户",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/demo.UserDTO"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/demo/demo2": {
|
|
"get": {
|
|
"description": "获取所有学生,不进行分页",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"demo"
|
|
],
|
|
"summary": "获取所有学生",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/demo.UserDTO"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"demo.UserDTO": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"ApiKeyAuth": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
"BasicAuth": {
|
|
"type": "basic"
|
|
}
|
|
},
|
|
"x-extension-openapi": {
|
|
"example": "value on a json format"
|
|
}
|
|
} |