{ "openapi": "3.0.2", "info": { "title": "openapi-python-generator test api", "description": "API Schema for openapi-python-generator test api", "version": "1.0.0", "x-logo": { "url": "https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" } }, "paths": { "/": { "get": { "tags": [ "general" ], "summary": "Root", "operationId": "root__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RootResponse" } } } } } } }, "/users": { "get": { "tags": [ "general" ], "summary": "Get Users", "operationId": "get_users_users_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "title": "Response Get Users Users Get", "type": "array", "items": { "$ref": "#/components/schemas/User" } } } } } } }, "post": { "tags": [ "general" ], "summary": "Create User", "operationId": "create_user_users_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/users/{user_id}": { "get": { "tags": [ "general" ], "summary": "Get User", "operationId": "get_user_users__user_id__get", "parameters": [ { "required": true, "schema": { "title": "User Id", "type": "integer" }, "name": "user_id", "in": "path" }, { "required": true, "schema": { "title": "Api-Key", "type": "string" }, "name": "api-key", "in": "header" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "general" ], "summary": "Delete User", "operationId": "delete_user_users__user_id__delete", "parameters": [ { "required": true, "schema": { "title": "User Id", "type": "integer" }, "name": "user_id", "in": "path" } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "general" ], "summary": "Update User", "operationId": "update_user_users__user_id__patch", "parameters": [ { "required": true, "schema": { "title": "User Id", "type": "integer" }, "name": "user_id", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/teams": { "get": { "tags": [ "general" ], "summary": "Get Teams", "operationId": "get_teams_teams_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "title": "Response Get Teams Teams Get", "type": "array", "items": { "$ref": "#/components/schemas/Team" } } } } } } }, "post": { "tags": [ "general" ], "summary": "Create Team", "operationId": "create_team_teams_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/teams/{team_id}": { "get": { "tags": [ "general" ], "summary": "Get Team", "operationId": "get_team_teams__team_id__get", "parameters": [ { "required": true, "schema": { "title": "Team Id", "type": "integer" }, "name": "team_id", "in": "path" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "general" ], "summary": "Delete Team", "operationId": "delete_team_teams__team_id__delete", "parameters": [ { "required": true, "schema": { "title": "Team Id", "type": "integer" }, "name": "team_id", "in": "path" } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "general" ], "summary": "Update Team", "operationId": "update_team_teams__team_id__patch", "parameters": [ { "required": true, "schema": { "title": "Team Id", "type": "integer" }, "name": "team_id", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Team" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "HTTPValidationError": { "title": "HTTPValidationError", "type": "object", "properties": { "detail": { "title": "Detail", "type": "array", "items": { "$ref": "#/components/schemas/ValidationError" } } } }, "RootResponse": { "title": "RootResponse", "required": [ "message" ], "type": "object", "properties": { "message": { "title": "Message", "type": "string" } } }, "Team": { "title": "Team", "required": [ "id", "name", "description" ], "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "is_active": { "title": "Is Active", "type": "boolean" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "users": { "title": "Users", "type": "array", "items": { "$ref": "#/components/schemas/User" } }, "captain": { "$ref": "#/components/schemas/User" } } }, "User": { "title": "User", "required": [ "id", "username", "email", "password" ], "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "username": { "title": "Username", "type": "string" }, "email": { "title": "Email", "type": "string" }, "password": { "title": "Password", "type": "string" }, "is_active": { "title": "Is Active", "type": "boolean" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" } } }, "UserWithUuid": { "title": "User", "required": [ "id", "username", "email", "password" ], "type": "object", "properties": { "id": { "title": "Id", "type": "string", "format": "uuid" }, "username": { "title": "Username", "type": "string" }, "email": { "title": "Email", "type": "string" }, "password": { "title": "Password", "type": "string" }, "is_active": { "title": "Is Active", "type": "boolean" }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "some_foreign_key": { "title": "Some Foreign Key", "type": "string", "format": "uuid4" } } }, "EnumComponent": { "title": "EnumComponent", "enum": [ "EnumValue1", "EnumValue2", "EnumValue3" ], "description": "An enumeration." }, "ValidationError": { "title": "ValidationError", "required": [ "loc", "msg", "type" ], "type": "object", "properties": { "loc": { "title": "Location", "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] } }, "msg": { "title": "Message", "type": "string" }, "type": { "title": "Error Type", "type": "string" } } } } }, "servers": [ { "url": "http://localhost:8080" } ] }