{ "components": { "schemas": { "Error": { "properties": { "message": { "type": "string" }, "statusCode": { "type": "integer" } }, "required": [ "message", "statusCode" ], "type": "object" }, "portfolio_api_types_LoginUser": { "properties": { "email": { "type": "string" }, "password": { "type": "string" } }, "type": "object" }, "portfolio_api_types_Project": { "properties": { "description": { "type": "string" }, "doc_url": { "type": "string" }, "id": { "type": "integer" }, "image_url": { "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "portfolio_api_types_User": { "properties": { "-": { "type": "string" }, "email": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "role": { "type": "string" } }, "required": [ "-" ], "type": "object" } } }, "info": { "title": "portfolio", "version": "0.0.0" }, "openapi": "3.0.0", "paths": { "/check": { "get": { "description": "check for user jwt cookie", "responses": { "200": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "default": { "description": "" } } } }, "/htmx/canEdit": { "get": { "description": "check if user is allowed to edit", "responses": { "200": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "default": { "description": "" } } } }, "/login": { "post": { "description": "Login.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/portfolio_api_types_LoginUser" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "401": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "default": { "description": "" } } } }, "/project": { "post": { "description": "Create project", "responses": { "200": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "401": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "default": { "description": "" } } } }, "/project/{id}": { "get": { "description": "Get project by id", "parameters": [ { "description": "id of the project", "in": "path", "name": "id", "required": true, "schema": { "pattern": "\\d+", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/portfolio_api_types_Project" } } }, "description": "" }, "400": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "default": { "description": "" } } }, "patch": { "description": "Update project by id", "parameters": [ { "description": "id of the project", "in": "path", "name": "id", "required": true, "schema": { "pattern": "\\d+", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/portfolio_api_types_Project" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "400": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "401": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "default": { "description": "" } } } }, "/projects": { "get": { "description": "Get projects", "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/portfolio_api_types_Project" }, "nullable": true, "type": "array" } } }, "description": "" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "default": { "description": "" } } }, "patch": { "description": "Update projects WIP", "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/portfolio_api_types_Project" }, "nullable": true, "type": "array" } } }, "description": "" }, "401": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "default": { "description": "" } } } }, "/register": { "post": { "description": "Register.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/portfolio_api_types_User" } } } }, "responses": { "201": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "400": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "default": { "description": "" } } } }, "/user/{uid}": { "get": { "description": "Get user by uid.", "parameters": [ { "description": "id of the user", "in": "path", "name": "id", "required": true, "schema": { "pattern": "\\d+", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/portfolio_api_types_User" } } }, "description": "" }, "400": { "content": { "application/json": { "schema": { "type": "string" } } }, "description": "" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }, "description": "" }, "default": { "description": "" } } } } } } : { "description": "" } } } } } }