generated from Patagia/template-nix
144 lines
3 KiB
JSON
144 lines
3 KiB
JSON
{
|
|
"openapi": "3.0.3",
|
|
"info": {
|
|
"title": "Patagia Controller",
|
|
"version": "1.0.0"
|
|
},
|
|
"paths": {
|
|
"/users/{userId}": {
|
|
"get": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Fetch user info.",
|
|
"operationId": "get_user_by_id",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "userId",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"$ref": "#/components/responses/Error"
|
|
},
|
|
"5XX": {
|
|
"$ref": "#/components/responses/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/version": {
|
|
"get": {
|
|
"summary": "Fetch version info.",
|
|
"operationId": "version",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/VersionInfo"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"4XX": {
|
|
"$ref": "#/components/responses/Error"
|
|
},
|
|
"5XX": {
|
|
"$ref": "#/components/responses/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"Error": {
|
|
"description": "Error information from a response.",
|
|
"type": "object",
|
|
"properties": {
|
|
"error_code": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"request_id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"message",
|
|
"request_id"
|
|
]
|
|
},
|
|
"User": {
|
|
"description": "User",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name"
|
|
]
|
|
},
|
|
"VersionInfo": {
|
|
"description": "Version and build information",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"version"
|
|
]
|
|
}
|
|
},
|
|
"responses": {
|
|
"Error": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "user"
|
|
}
|
|
]
|
|
}
|