1
0
api/ent/openapi.json

858 lines
20 KiB
JSON
Raw Normal View History

2022-08-31 06:18:14 +00:00
{
"openapi": "3.0.3",
"info": {
"title": "Ent Schema API",
"description": "This is an auto generated API description made out of an Ent schema definition",
"version": "0.1.0"
},
"paths": {
"/users": {
"get": {
"tags": [
"Users"
],
"summary": "List Users",
"description": "List Users.",
"operationId": "listUsers",
"parameters": [
{
"name": "page",
"in": "query",
"description": "what page to render",
"schema": {
"type": "integer"
}
},
{
"name": "itemsPerPage",
"in": "query",
"description": "item count to render per page",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "result Users list",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UsersList"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"$ref": "#/components/responses/404"
},
"409": {
"$ref": "#/components/responses/409"
},
"500": {
"$ref": "#/components/responses/500"
}
}
},
"post": {
"tags": [
"Users"
],
"summary": "Create a new Users",
"description": "Creates a new Users and persists it to storage.",
"operationId": "createUsers",
"requestBody": {
"description": "Users to create",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"type": "string"
},
"chara": {
"type": "string"
},
"skill": {
"type": "integer"
},
"hp": {
"type": "integer"
},
"attack": {
"type": "integer"
},
"defense": {
"type": "integer"
},
"critical": {
"type": "integer"
},
"battle": {
"type": "integer"
},
"win": {
"type": "integer"
},
"day": {
"type": "integer"
},
"percentage": {
"type": "number",
"format": "double"
},
"limit": {
"type": "boolean"
},
"status": {
"type": "string"
},
"comment": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"next": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"url": {
"type": "string"
}
},
"required": [
"user"
]
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Users created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UsersCreate"
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"409": {
"$ref": "#/components/responses/409"
},
"500": {
"$ref": "#/components/responses/500"
}
}
}
},
"/users/{id}": {
"get": {
"tags": [
"Users"
],
"summary": "Find a Users by ID",
"description": "Finds the Users with the requested ID and returns it.",
"operationId": "readUsers",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the Users",
"schema": {
"type": "integer"
},
"required": true
}
],
"responses": {
"200": {
"description": "Users with requested ID was found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UsersRead"
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"$ref": "#/components/responses/404"
},
"409": {
"$ref": "#/components/responses/409"
},
"500": {
"$ref": "#/components/responses/500"
}
}
},
"delete": {
"tags": [
"Users"
],
"summary": "Deletes a Users by ID",
"description": "Deletes the Users with the requested ID.",
"operationId": "deleteUsers",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the Users",
"schema": {
"type": "integer"
},
"required": true
}
],
"responses": {
"204": {
"description": "Users with requested ID was deleted"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"$ref": "#/components/responses/404"
},
"409": {
"$ref": "#/components/responses/409"
},
"500": {
"$ref": "#/components/responses/500"
}
}
},
"patch": {
"tags": [
"Users"
],
"summary": "Updates a Users",
"description": "Updates a Users and persists changes to storage.",
"operationId": "updateUsers",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the Users",
"schema": {
"type": "integer"
},
"required": true
}
],
"requestBody": {
"description": "Users properties to update",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"hp": {
"type": "integer"
},
"attack": {
"type": "integer"
},
"defense": {
"type": "integer"
},
"critical": {
"type": "integer"
},
"battle": {
"type": "integer"
},
"win": {
"type": "integer"
},
"day": {
"type": "integer"
},
"percentage": {
"type": "number",
"format": "double"
},
"limit": {
"type": "boolean"
},
"comment": {
"type": "string"
},
"next": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Users updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UsersUpdate"
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"$ref": "#/components/responses/404"
},
"409": {
"$ref": "#/components/responses/409"
},
"500": {
"$ref": "#/components/responses/500"
}
}
}
},
"/users/{id}/d": {
"description": "Start an draw as done",
"put": {
"tags": [
"Users"
],
"summary": "Draws a card item as done.",
"operationId": "drawDone",
"responses": {
"204": {
"description": "Item marked as done"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"schema": {
"type": "integer"
},
"required": true
}
]
},
"/users/{id}/start": {
"description": "Start an draw as done",
"patch": {
"tags": [
"Users"
],
"summary": "Draws a card item as done.",
"operationId": "drawStart",
"responses": {
"204": {
"description": "Item marked as done"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"schema": {
"type": "integer"
},
"required": true
}
]
}
},
"components": {
"schemas": {
"Users": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"user": {
"type": "string"
},
"chara": {
"type": "string"
},
"skill": {
"type": "integer"
},
"hp": {
"type": "integer"
},
"attack": {
"type": "integer"
},
"defense": {
"type": "integer"
},
"critical": {
"type": "integer"
},
"battle": {
"type": "integer"
},
"win": {
"type": "integer"
},
"day": {
"type": "integer"
},
"percentage": {
"type": "number",
"format": "double"
},
"limit": {
"type": "boolean"
},
"status": {
"type": "string"
},
"comment": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"next": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"user"
]
},
"UsersCreate": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"user": {
"type": "string"
},
"chara": {
"type": "string"
},
"skill": {
"type": "integer"
},
"hp": {
"type": "integer"
},
"attack": {
"type": "integer"
},
"defense": {
"type": "integer"
},
"critical": {
"type": "integer"
},
"battle": {
"type": "integer"
},
"win": {
"type": "integer"
},
"day": {
"type": "integer"
},
"percentage": {
"type": "number",
"format": "double"
},
"limit": {
"type": "boolean"
},
"status": {
"type": "string"
},
"comment": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"next": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"user"
]
},
"UsersList": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"user": {
"type": "string"
},
"chara": {
"type": "string"
},
"skill": {
"type": "integer"
},
"hp": {
"type": "integer"
},
"attack": {
"type": "integer"
},
"defense": {
"type": "integer"
},
"critical": {
"type": "integer"
},
"battle": {
"type": "integer"
},
"win": {
"type": "integer"
},
"day": {
"type": "integer"
},
"percentage": {
"type": "number",
"format": "double"
},
"limit": {
"type": "boolean"
},
"status": {
"type": "string"
},
"comment": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"next": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"user"
]
},
"UsersRead": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"user": {
"type": "string"
},
"chara": {
"type": "string"
},
"skill": {
"type": "integer"
},
"hp": {
"type": "integer"
},
"attack": {
"type": "integer"
},
"defense": {
"type": "integer"
},
"critical": {
"type": "integer"
},
"battle": {
"type": "integer"
},
"win": {
"type": "integer"
},
"day": {
"type": "integer"
},
"percentage": {
"type": "number",
"format": "double"
},
"limit": {
"type": "boolean"
},
"status": {
"type": "string"
},
"comment": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"next": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"user"
]
},
"UsersUpdate": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"user": {
"type": "string"
},
"chara": {
"type": "string"
},
"skill": {
"type": "integer"
},
"hp": {
"type": "integer"
},
"attack": {
"type": "integer"
},
"defense": {
"type": "integer"
},
"critical": {
"type": "integer"
},
"battle": {
"type": "integer"
},
"win": {
"type": "integer"
},
"day": {
"type": "integer"
},
"percentage": {
"type": "number",
"format": "double"
},
"limit": {
"type": "boolean"
},
"status": {
"type": "string"
},
"comment": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"next": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"user"
]
}
},
"responses": {
"400": {
"description": "invalid input, data invalid",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"status": {
"type": "string"
},
"errors": {}
},
"required": [
"code",
"status"
]
}
}
}
},
"403": {
"description": "insufficient permissions",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"status": {
"type": "string"
},
"errors": {}
},
"required": [
"code",
"status"
]
}
}
}
},
"404": {
"description": "resource not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"status": {
"type": "string"
},
"errors": {}
},
"required": [
"code",
"status"
]
}
}
}
},
"409": {
"description": "conflicting resources",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"status": {
"type": "string"
},
"errors": {}
},
"required": [
"code",
"status"
]
}
}
}
},
"500": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"status": {
"type": "string"
},
"errors": {}
},
"required": [
"code",
"status"
]
}
}
}
}
}
}
}