83 lines
2.5 KiB
JSON
83 lines
2.5 KiB
JSON
{
|
|
"schemes": ["http","https"],
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "API documentation",
|
|
"title": "Service API",
|
|
"contact": {
|
|
"name": "API Support",
|
|
"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": {
|
|
"/user/create": {
|
|
"post": {
|
|
"description": "Create user for service",
|
|
"consumes": [
|
|
"application/x-www-form-urlencoded"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Create user",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "user01",
|
|
"description": "User name",
|
|
"name": "username",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "array",
|
|
"format": "[]byte",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "multi",
|
|
"description": "Grants list",
|
|
"name": "grants",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/webserv_internal_logic.CreateUserResult"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"webserv_internal_logic.CreateUserResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"grants": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |