{ "openapi": "3.1.0", "info": { "title": "FertiScan", "version": "0.1.0" }, "paths": { "/healthz": { "get": { "tags": ["health"], "summary": "Liveness", "description": "Liveness probe - is the application running?", "operationId": "health_liveness", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Health" } } } } } } }, "/readyz": { "get": { "tags": ["health"], "summary": "Readiness", "description": "Readiness probe - can the application handle requests?", "operationId": "health_readiness", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Readiness" } } } } } } }, "/api/v1/login/access-token": { "post": { "tags": ["login"], "summary": "Login Access Token", "description": "OAuth2 compatible token login, get an access token for future requests.", "operationId": "login_login_access_token", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/Body_login_login_access_token" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Token" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/login/test-token": { "post": { "tags": ["login"], "summary": "Test Token", "description": "Test access token.", "operationId": "login_test_token", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPublic" } } } } }, "security": [{ "OAuth2PasswordBearer": [] }] } }, "/api/v1/password-recovery/{email}": { "post": { "tags": ["login"], "summary": "Recover Password", "description": "Password Recovery.", "operationId": "login_recover_password", "parameters": [ { "name": "email", "in": "path", "required": true, "schema": { "type": "string", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/reset-password/": { "post": { "tags": ["login"], "summary": "Reset Password", "description": "Reset password.", "operationId": "login_reset_password", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewPassword" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/password-recovery-html-content/{email}": { "post": { "tags": ["login"], "summary": "Recover Password Html Content", "description": "HTML Content for Password Recovery (dev/testing only).", "operationId": "login_recover_password_html_content", "security": [{ "OAuth2PasswordBearer": [] }], "parameters": [ { "name": "email", "in": "path", "required": true, "schema": { "type": "string", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "text/html": { "schema": { "type": "string" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/users": { "get": { "tags": ["users"], "summary": "Read Users", "description": "List all users (superuser only).", "operationId": "users_read_users", "security": [{ "OAuth2PasswordBearer": [] }], "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsersPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["users"], "summary": "Create User", "description": "Create new user (superuser only).", "operationId": "users_create_user", "security": [{ "OAuth2PasswordBearer": [] }], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/users/me": { "get": { "tags": ["users"], "summary": "Read User Me", "description": "Get current user.", "operationId": "users_read_user_me", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPublic" } } } } }, "security": [{ "OAuth2PasswordBearer": [] }] }, "delete": { "tags": ["users"], "summary": "Delete User Me", "description": "Delete current user.", "operationId": "users_delete_user_me", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } } }, "security": [{ "OAuth2PasswordBearer": [] }] }, "patch": { "tags": ["users"], "summary": "Update User Me", "description": "Update current user.", "operationId": "users_update_user_me", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUpdateMe" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [{ "OAuth2PasswordBearer": [] }] } }, "/api/v1/users/me/password": { "patch": { "tags": ["users"], "summary": "Update Password Me", "description": "Update current user password.", "operationId": "users_update_password_me", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePassword" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [{ "OAuth2PasswordBearer": [] }] } }, "/api/v1/users/{user_id}": { "get": { "tags": ["users"], "summary": "Read User By Id", "description": "Get user by ID (superuser only).", "operationId": "users_read_user_by_id", "security": [{ "OAuth2PasswordBearer": [] }], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": ["users"], "summary": "Update User", "description": "Update user (superuser only).", "operationId": "users_update_user", "security": [{ "OAuth2PasswordBearer": [] }], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["users"], "summary": "Delete User", "description": "Delete user (superuser only).", "operationId": "users_delete_user", "security": [{ "OAuth2PasswordBearer": [] }], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/items": { "get": { "tags": ["items"], "summary": "Read Items", "operationId": "items_read_items", "security": [{ "OAuth2PasswordBearer": [] }], "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemsPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": ["items"], "summary": "Create Item", "operationId": "items_create_item", "security": [{ "OAuth2PasswordBearer": [] }], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/items/{item_id}": { "get": { "tags": ["items"], "summary": "Read Item", "operationId": "items_read_item", "security": [{ "OAuth2PasswordBearer": [] }], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Item Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": ["items"], "summary": "Update Item", "operationId": "items_update_item", "security": [{ "OAuth2PasswordBearer": [] }], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Item Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ItemPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": ["items"], "summary": "Delete Item", "operationId": "items_delete_item", "security": [{ "OAuth2PasswordBearer": [] }], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Item Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/private/users/": { "post": { "tags": ["private"], "summary": "Create User No Verification", "description": "Create user without email verification - for testing only.", "operationId": "private_create_user_no_verification", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivateUserCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPublic" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "Body_login_login_access_token": { "properties": { "grant_type": { "anyOf": [ { "type": "string", "pattern": "^password$" }, { "type": "null" } ], "title": "Grant Type" }, "username": { "type": "string", "title": "Username" }, "password": { "type": "string", "format": "password", "title": "Password" }, "scope": { "type": "string", "title": "Scope", "default": "" }, "client_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Client Id" }, "client_secret": { "anyOf": [{ "type": "string" }, { "type": "null" }], "format": "password", "title": "Client Secret" } }, "type": "object", "required": ["username", "password"], "title": "Body_login_login_access_token" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "Health": { "properties": { "status": { "type": "string", "title": "Status" } }, "type": "object", "required": ["status"], "title": "Health" }, "ItemCreate": { "properties": { "title": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Title" }, "description": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": ["title"], "title": "ItemCreate" }, "ItemPublic": { "properties": { "title": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Title" }, "description": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Description" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "owner_id": { "type": "string", "format": "uuid", "title": "Owner Id" } }, "type": "object", "required": ["title", "id", "owner_id"], "title": "ItemPublic" }, "ItemUpdate": { "properties": { "title": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Title" }, "description": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Description" } }, "type": "object", "title": "ItemUpdate" }, "ItemsPublic": { "properties": { "data": { "items": { "$ref": "#/components/schemas/ItemPublic" }, "type": "array", "title": "Data" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": ["data", "count"], "title": "ItemsPublic" }, "Message": { "properties": { "message": { "type": "string", "title": "Message" } }, "type": "object", "required": ["message"], "title": "Message" }, "NewPassword": { "properties": { "token": { "type": "string", "title": "Token" }, "new_password": { "type": "string", "title": "New Password" } }, "type": "object", "required": ["token", "new_password"], "title": "NewPassword" }, "PrivateUserCreate": { "properties": { "email": { "type": "string", "format": "email", "title": "Email" }, "password": { "type": "string", "title": "Password" }, "first_name": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "First Name" }, "last_name": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Last Name" } }, "type": "object", "required": ["email", "password"], "title": "PrivateUserCreate" }, "Readiness": { "properties": { "status": { "type": "string", "title": "Status" }, "database": { "type": "string", "title": "Database" } }, "type": "object", "required": ["status", "database"], "title": "Readiness" }, "Token": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "token_type": { "type": "string", "title": "Token Type", "default": "bearer" } }, "type": "object", "required": ["access_token"], "title": "Token" }, "UpdatePassword": { "properties": { "current_password": { "type": "string", "maxLength": 40, "minLength": 8, "format": "password", "title": "Current Password", "writeOnly": true }, "new_password": { "type": "string", "maxLength": 40, "minLength": 8, "format": "password", "title": "New Password", "writeOnly": true } }, "type": "object", "required": ["current_password", "new_password"], "title": "UpdatePassword" }, "UserCreate": { "properties": { "email": { "type": "string", "maxLength": 255, "format": "email", "title": "Email" }, "is_active": { "type": "boolean", "title": "Is Active", "default": true }, "is_superuser": { "type": "boolean", "title": "Is Superuser", "default": false }, "first_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "First Name" }, "last_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Last Name" }, "password": { "type": "string", "maxLength": 40, "minLength": 8, "format": "password", "title": "Password", "writeOnly": true } }, "type": "object", "required": ["email", "password"], "title": "UserCreate" }, "UserPublic": { "properties": { "email": { "type": "string", "maxLength": 255, "format": "email", "title": "Email" }, "is_active": { "type": "boolean", "title": "Is Active", "default": true }, "is_superuser": { "type": "boolean", "title": "Is Superuser", "default": false }, "first_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "First Name" }, "last_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Last Name" }, "id": { "type": "string", "format": "uuid", "title": "Id" } }, "type": "object", "required": ["email", "id"], "title": "UserPublic" }, "UserUpdate": { "properties": { "email": { "anyOf": [ { "type": "string", "maxLength": 255, "format": "email" }, { "type": "null" } ], "title": "Email" }, "password": { "anyOf": [ { "type": "string", "maxLength": 40, "minLength": 8, "format": "password", "writeOnly": true }, { "type": "null" } ], "title": "Password" }, "is_active": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Is Active" }, "is_superuser": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Is Superuser" }, "first_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "First Name" }, "last_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Last Name" } }, "type": "object", "title": "UserUpdate" }, "UserUpdateMe": { "properties": { "first_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "First Name" }, "last_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Last Name" }, "email": { "anyOf": [ { "type": "string", "maxLength": 255, "format": "email" }, { "type": "null" } ], "title": "Email" } }, "type": "object", "title": "UserUpdateMe" }, "UsersPublic": { "properties": { "data": { "items": { "$ref": "#/components/schemas/UserPublic" }, "type": "array", "title": "Data" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": ["data", "count"], "title": "UsersPublic" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError" } }, "securitySchemes": { "OAuth2PasswordBearer": { "type": "oauth2", "flows": { "password": { "scopes": {}, "tokenUrl": "/api/v1/login/access-token" } } } } } }