From 4a4c9515f64b82f9dab176674bf543872d2212a9 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 20 Mar 2026 00:59:08 +0100 Subject: [PATCH] feat: add NSwag config and commit generated openapi.json --- src/AccountTracking.Api/nswag.json | 15 ++ src/AccountTracking.Api/openapi.json | 366 +++++++++++++++++++++++++++ 2 files changed, 381 insertions(+) create mode 100644 src/AccountTracking.Api/nswag.json create mode 100644 src/AccountTracking.Api/openapi.json diff --git a/src/AccountTracking.Api/nswag.json b/src/AccountTracking.Api/nswag.json new file mode 100644 index 0000000..2e90140 --- /dev/null +++ b/src/AccountTracking.Api/nswag.json @@ -0,0 +1,15 @@ +{ + "runtime": "Net80", + "documentGenerator": { + "aspNetCoreToOpenApi": { + "project": "AccountTracking.Api.csproj", + "msBuildProjectExtensionsPath": null, + "configuration": "Debug", + "noBuild": true, + "verbose": false, + "outputType": "OpenApi3", + "output": "openapi.json" + } + }, + "codeGenerators": {} +} diff --git a/src/AccountTracking.Api/openapi.json b/src/AccountTracking.Api/openapi.json new file mode 100644 index 0000000..cf2aa3d --- /dev/null +++ b/src/AccountTracking.Api/openapi.json @@ -0,0 +1,366 @@ +{ + "x-generator": "NSwag v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))", + "openapi": "3.0.0", + "info": { + "title": "AccountTracking API", + "version": "v1" + }, + "servers": [ + { + "url": "http://localhost:5099" + } + ], + "paths": { + "/api/auth/login": { + "post": { + "tags": [ + "Auth" + ], + "operationId": "Auth_Login", + "requestBody": { + "x-name": "request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + }, + "required": true, + "x-position": 1 + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/api/dashboard/summary": { + "get": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboard_Summary", + "parameters": [ + { + "name": "year", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + }, + { + "name": "month", + "in": "query", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/api/dashboard/spending-by-category": { + "get": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboard_SpendingByCategory", + "parameters": [ + { + "name": "year", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + }, + { + "name": "month", + "in": "query", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/api/dashboard/monthly-balances": { + "get": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboard_MonthlyBalances", + "parameters": [ + { + "name": "year", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/api/dashboard/cumulative-spending": { + "get": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboard_CumulativeSpending", + "parameters": [ + { + "name": "year", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + }, + { + "name": "month", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/api/transactions/import": { + "post": { + "tags": [ + "Transactions" + ], + "operationId": "Transactions_Import", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "nullable": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/api/transactions": { + "get": { + "tags": [ + "Transactions" + ], + "operationId": "Transactions_List", + "parameters": [ + { + "name": "year", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "x-position": 1 + }, + { + "name": "month", + "in": "query", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "x-position": 2 + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 3 + }, + { + "name": "search", + "in": "query", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 4 + }, + { + "name": "page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + }, + "x-position": 5 + }, + { + "name": "pageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + }, + "x-position": 6 + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/api/transactions/categories": { + "get": { + "tags": [ + "Transactions" + ], + "operationId": "Transactions_Categories", + "responses": { + "200": { + "description": "", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "LoginRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + } + }, + "securitySchemes": { + "Bearer": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + } + } +} \ No newline at end of file