{ "openapi": "3.1.1", "info": { "title": "Creuser.Web | v1", "version": "1.0.0" }, "paths": { "/api/auth/login": { "post": { "tags": [ "Auth" ], "operationId": "Login", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfUserResult" } } } } } } }, "/api/auth/logout": { "post": { "tags": [ "Auth" ], "operationId": "Logout", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfboolean" } } } } } } }, "/api/auth/me": { "get": { "tags": [ "Auth" ], "operationId": "GetCurrentUser", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfUserResult" } } } } } } }, "/api/auth/change-password": { "post": { "tags": [ "Auth" ], "operationId": "ChangePassword", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfboolean" } } } } } } }, "/api/admin/users": { "post": { "tags": [ "Admin" ], "operationId": "CreateUser", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfCreateUserResult" } } } } } }, "get": { "tags": [ "Admin" ], "operationId": "ListUsers", "parameters": [ { "name": "skip", "in": "query", "schema": { "pattern": "^-?(?:0|[1-9]\\d*)$", "type": [ "integer", "string" ], "format": "int32" } }, { "name": "take", "in": "query", "schema": { "pattern": "^-?(?:0|[1-9]\\d*)$", "type": [ "integer", "string" ], "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfIReadOnlyListOfUserResult" } } } } } } }, "/api/admin/users/{id}/reset-password": { "post": { "tags": [ "Admin" ], "operationId": "ResetUserPassword", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfCreateUserResult" } } } } } } }, "/api/admin/users/{id}/active": { "post": { "tags": [ "Admin" ], "operationId": "SetUserActive", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetActiveRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfboolean" } } } } } } }, "/api/ping": { "get": { "tags": [ "Diagnostics" ], "summary": "Liveness probe", "description": "Returns a small payload echoing the server's wall-clock time. Used by the SPA and external monitors to confirm the API is reachable through the dev proxy and reverse proxies.", "operationId": "Ping", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfPingResponse" } } } } } } }, "/api/echo": { "post": { "tags": [ "Diagnostics" ], "summary": "Echo a message back, optionally repeated", "description": "Demonstrates the full request/validation/envelope/ProblemDetails chain. Provided as a smoke-test endpoint for the dev proxy and the generated TypeScript client.", "operationId": "Echo", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EchoRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResultOfEchoResponse" } } } } } } } }, "components": { "schemas": { "ApiResultOfboolean": { "required": [ "result" ], "type": "object", "properties": { "result": { "type": "boolean" } } }, "ApiResultOfCreateUserResult": { "required": [ "result" ], "type": "object", "properties": { "result": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/CreateUserResult" } ] } } }, "ApiResultOfEchoResponse": { "required": [ "result" ], "type": "object", "properties": { "result": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/EchoResponse" } ] } } }, "ApiResultOfIReadOnlyListOfUserResult": { "required": [ "result" ], "type": "object", "properties": { "result": { "type": [ "null", "array" ], "items": { "$ref": "#/components/schemas/UserResult" } } } }, "ApiResultOfPingResponse": { "required": [ "result" ], "type": "object", "properties": { "result": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/PingResponse" } ] } } }, "ApiResultOfUserResult": { "required": [ "result" ], "type": "object", "properties": { "result": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserResult" } ] } } }, "ChangePasswordRequest": { "required": [ "currentPassword", "newPassword", "confirmPassword" ], "type": "object", "properties": { "currentPassword": { "type": "string" }, "newPassword": { "type": "string" }, "confirmPassword": { "type": "string" } } }, "CreateUserRequest": { "required": [ "email", "displayName", "role", "temporaryPassword" ], "type": "object", "properties": { "email": { "type": "string" }, "displayName": { "type": "string" }, "role": { "type": "string" }, "temporaryPassword": { "type": [ "null", "string" ] } } }, "CreateUserResult": { "required": [ "userId", "email", "displayName", "role", "temporaryPassword" ], "type": "object", "properties": { "userId": { "type": "string", "format": "uuid" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "role": { "type": "string" }, "temporaryPassword": { "type": "string" } } }, "EchoRequest": { "required": [ "message", "repeat" ], "type": "object", "properties": { "message": { "type": "string" }, "repeat": { "pattern": "^-?(?:0|[1-9]\\d*)$", "type": [ "null", "integer", "string" ], "format": "int32" } } }, "EchoResponse": { "required": [ "message" ], "type": "object", "properties": { "message": { "type": "string" } } }, "LoginRequest": { "required": [ "email", "password" ], "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "PingResponse": { "required": [ "message", "serverTime" ], "type": "object", "properties": { "message": { "type": "string" }, "serverTime": { "type": "string", "format": "date-time" } } }, "SetActiveRequest": { "required": [ "isActive" ], "type": "object", "properties": { "isActive": { "type": "boolean" } } }, "UserResult": { "required": [ "userId", "email", "displayName", "role", "mustChangePassword" ], "type": "object", "properties": { "userId": { "type": "string", "format": "uuid" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "role": { "type": "string" }, "mustChangePassword": { "type": "boolean" } } } } }, "tags": [ { "name": "Auth" }, { "name": "Admin" }, { "name": "Diagnostics" } ] }