{ "x-generator": "NSwag v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))", "openapi": "3.0.0", "info": { "title": "AccidentMonitor API", "version": "1.0.0" }, "paths": { "/api/AccidentReport/report-accident": { "post": { "tags": [ "AccidentReport" ], "operationId": "ReportAccident", "requestBody": { "x-name": "command", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAccidentCommand" } } }, "required": true, "x-position": 1 }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "string", "format": "guid" } } } } } } }, "/api/AccidentReport/update-resolve": { "put": { "tags": [ "AccidentReport" ], "operationId": "UpdateAccidentStatus", "parameters": [ { "name": "accidentId", "in": "query", "required": true, "schema": { "type": "string", "format": "guid" }, "x-position": 1 } ], "requestBody": { "x-name": "command", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAccidentResolvedStatusCommand" } } }, "required": true, "x-position": 2 }, "responses": { "204": { "description": "" }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } } } } }, "/api/BlockedPolygon/blocked-polygon": { "get": { "tags": [ "BlockedPolygon" ], "operationId": "GetBlockedPolygon", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BlockedPolygonDto" } } } } }, "404": { "description": "" } }, "security": [ { "JWT": [] } ] } }, "/api/BlockedPolygon/blocked-multi-polygon": { "get": { "tags": [ "BlockedPolygon" ], "operationId": "GetMultiBlockedPolygon", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AvoidPolygonsDto" } } } }, "404": { "description": "" } }, "security": [ { "JWT": [] } ] } }, "/api/RoutingDirection/status": { "get": { "tags": [ "RoutingDirection" ], "operationId": "GetApiRoutingDirectionStatus", "responses": { "200": { "description": "" } }, "security": [ { "JWT": [] } ] } }, "/api/RoutingDirection/health": { "get": { "tags": [ "RoutingDirection" ], "operationId": "GetApiRoutingDirectionHealth", "responses": { "200": { "description": "" } }, "security": [ { "JWT": [] } ] } }, "/api/RoutingDirection/direction/{profile}": { "get": { "tags": [ "RoutingDirection" ], "operationId": "GetApiRoutingDirectionDirection", "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" }, "x-position": 1 }, { "name": "start", "in": "query", "required": true, "schema": { "type": "string" }, "x-position": 2 }, { "name": "end", "in": "query", "required": true, "schema": { "type": "string" }, "x-position": 3 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DirectionCutResponseDto" } } } }, "400": { "description": "" } }, "security": [ { "JWT": [] } ] }, "post": { "tags": [ "RoutingDirection" ], "operationId": "PostApiRoutingDirectionDirection", "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" }, "x-position": 1 } ], "requestBody": { "x-name": "requestDto", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetDirectionAdvanceRequestDto" } } }, "required": true, "x-position": 2 }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DirectionCutResponseDto" } } } }, "400": { "description": "" } }, "security": [ { "JWT": [] } ] } }, "/api/Users/register": { "post": { "tags": [ "Users" ], "operationId": "PostApiUsersRegister", "requestBody": { "x-name": "registration", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "" }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpValidationProblemDetails" } } } } } } }, "/api/Users/login": { "post": { "tags": [ "Users" ], "operationId": "PostApiUsersLogin", "parameters": [ { "name": "useCookies", "in": "query", "schema": { "type": "boolean", "nullable": true }, "x-position": 2 }, { "name": "useSessionCookies", "in": "query", "schema": { "type": "boolean", "nullable": true }, "x-position": 3 } ], "requestBody": { "x-name": "login", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccessTokenResponse" } } } } } } }, "/api/Users/refresh": { "post": { "tags": [ "Users" ], "operationId": "PostApiUsersRefresh", "requestBody": { "x-name": "refreshRequest", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshRequest" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccessTokenResponse" } } } } } } }, "/api/Users/confirmEmail": { "get": { "tags": [ "Users" ], "operationId": "GetApiUsersConfirmEmail", "parameters": [ { "name": "userId", "in": "query", "required": true, "schema": { "type": "string", "nullable": true }, "x-position": 1 }, { "name": "code", "in": "query", "required": true, "schema": { "type": "string", "nullable": true }, "x-position": 2 }, { "name": "changedEmail", "in": "query", "schema": { "type": "string", "nullable": true }, "x-position": 3 } ], "responses": { "200": { "description": "" } } } }, "/api/Users/resendConfirmationEmail": { "post": { "tags": [ "Users" ], "operationId": "PostApiUsersResendConfirmationEmail", "requestBody": { "x-name": "resendRequest", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResendConfirmationEmailRequest" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "" } } } }, "/api/Users/forgotPassword": { "post": { "tags": [ "Users" ], "operationId": "PostApiUsersForgotPassword", "requestBody": { "x-name": "resetRequest", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordRequest" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "" }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpValidationProblemDetails" } } } } } } }, "/api/Users/resetPassword": { "post": { "tags": [ "Users" ], "operationId": "PostApiUsersResetPassword", "requestBody": { "x-name": "resetRequest", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetPasswordRequest" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "" }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpValidationProblemDetails" } } } } } } }, "/api/Users/manage/2fa": { "post": { "tags": [ "Users" ], "operationId": "PostApiUsersManage2fa", "requestBody": { "x-name": "tfaRequest", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TwoFactorRequest" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TwoFactorResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpValidationProblemDetails" } } } }, "404": { "description": "" } }, "security": [ { "JWT": [] } ] } }, "/api/Users/manage/info": { "get": { "tags": [ "Users" ], "operationId": "GetApiUsersManageInfo", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InfoResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpValidationProblemDetails" } } } }, "404": { "description": "" } }, "security": [ { "JWT": [] } ] }, "post": { "tags": [ "Users" ], "operationId": "PostApiUsersManageInfo", "requestBody": { "x-name": "infoRequest", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InfoRequest" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InfoResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpValidationProblemDetails" } } } }, "404": { "description": "" } }, "security": [ { "JWT": [] } ] } }, "/api/WeatherForecasts": { "get": { "tags": [ "WeatherForecasts" ], "operationId": "GetWeatherForecasts", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WeatherForecast" } } } } } } } } }, "components": { "schemas": { "CreateAccidentCommand": { "type": "object", "additionalProperties": false, "properties": { "time": { "type": "string", "format": "date-time" }, "latitude": { "type": "number", "format": "double" }, "longitude": { "type": "number", "format": "double" }, "severity": { "$ref": "#/components/schemas/AccidentSeverity" }, "is_blocking_way": { "type": "boolean" } } }, "AccidentSeverity": { "type": "string", "description": "", "x-enumNames": [ "Low", "Medium", "High" ], "enum": [ "Low", "Medium", "High" ] }, "UpdateAccidentResolvedStatusCommand": { "type": "object", "additionalProperties": false, "properties": { "accidentId": { "type": "string", "format": "guid" }, "isResolved": { "type": "boolean" } } }, "BlockedPolygonDto": { "type": "object", "additionalProperties": false, "properties": { "AccidentId": { "type": "string", "format": "guid" }, "Coordinates": { "type": "array", "items": { "$ref": "#/components/schemas/CoordinateEntity" } } } }, "CoordinateEntity": { "type": "object", "additionalProperties": false, "properties": { "latitude": { "type": "number", "format": "float" }, "longitude": { "type": "number", "format": "float" } } }, "AvoidPolygonsDto": { "type": "object", "additionalProperties": false, "properties": { "coordinates": { "type": "array", "nullable": true, "items": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/components/schemas/CoordinateDto" } } } }, "type": { "type": "string", "nullable": true } } }, "CoordinateDto": { "type": "object", "additionalProperties": false, "properties": { "longitude": { "type": "number", "format": "double" }, "latitude": { "type": "number", "format": "double" } } }, "DirectionCutResponseDto": { "type": "object", "additionalProperties": false, "properties": { "bbox": { "type": "array", "items": { "type": "number", "format": "double" } }, "routes": { "type": "array", "items": { "$ref": "#/components/schemas/SegmentResponseDto" } } } }, "SegmentResponseDto": { "type": "object", "additionalProperties": false, "properties": { "distance": { "type": "number", "format": "double" }, "duration": { "type": "number", "format": "double" }, "steps": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/StepResponseDto" } } } }, "StepResponseDto": { "type": "object", "additionalProperties": false, "properties": { "distance": { "type": "number", "format": "double" }, "duration": { "type": "number", "format": "double" }, "instruction": { "type": "string" } } }, "GetDirectionAdvanceRequestDto": { "type": "object", "additionalProperties": false, "properties": { "coordinates": { "type": "array", "items": { "type": "array", "items": { "type": "number", "format": "double" } } }, "geometry_simplify": { "type": "boolean" }, "geometry": { "type": "boolean" }, "language": { "type": "string" }, "options": { "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/ORSDirectionAvoidOptionsDto" } ] }, "units": { "type": "string", "nullable": true } } }, "ORSDirectionAvoidOptionsDto": { "type": "object", "additionalProperties": false, "properties": { "avoid_polygons": { "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/AvoidPolygonsDto" } ] } } }, "HttpValidationProblemDetails": { "allOf": [ { "$ref": "#/components/schemas/ProblemDetails" }, { "type": "object", "additionalProperties": { "nullable": true }, "properties": { "errors": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } } } } ] }, "ProblemDetails": { "type": "object", "additionalProperties": { "nullable": true }, "properties": { "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int32", "nullable": true }, "detail": { "type": "string", "nullable": true }, "instance": { "type": "string", "nullable": true } } }, "RegisterRequest": { "type": "object", "additionalProperties": false, "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "AccessTokenResponse": { "type": "object", "additionalProperties": false, "properties": { "tokenType": { "type": "string" }, "accessToken": { "type": "string" }, "expiresIn": { "type": "integer", "format": "int64" }, "refreshToken": { "type": "string" } } }, "LoginRequest": { "type": "object", "additionalProperties": false, "properties": { "email": { "type": "string" }, "password": { "type": "string" }, "twoFactorCode": { "type": "string", "nullable": true }, "twoFactorRecoveryCode": { "type": "string", "nullable": true } } }, "RefreshRequest": { "type": "object", "additionalProperties": false, "properties": { "refreshToken": { "type": "string" } } }, "ResendConfirmationEmailRequest": { "type": "object", "additionalProperties": false, "properties": { "email": { "type": "string" } } }, "ForgotPasswordRequest": { "type": "object", "additionalProperties": false, "properties": { "email": { "type": "string" } } }, "ResetPasswordRequest": { "type": "object", "additionalProperties": false, "properties": { "email": { "type": "string" }, "resetCode": { "type": "string" }, "newPassword": { "type": "string" } } }, "TwoFactorResponse": { "type": "object", "additionalProperties": false, "properties": { "sharedKey": { "type": "string" }, "recoveryCodesLeft": { "type": "integer", "format": "int32" }, "recoveryCodes": { "type": "array", "nullable": true, "items": { "type": "string" } }, "isTwoFactorEnabled": { "type": "boolean" }, "isMachineRemembered": { "type": "boolean" } } }, "TwoFactorRequest": { "type": "object", "additionalProperties": false, "properties": { "enable": { "type": "boolean", "nullable": true }, "twoFactorCode": { "type": "string", "nullable": true }, "resetSharedKey": { "type": "boolean" }, "resetRecoveryCodes": { "type": "boolean" }, "forgetMachine": { "type": "boolean" } } }, "InfoResponse": { "type": "object", "additionalProperties": false, "properties": { "email": { "type": "string" }, "isEmailConfirmed": { "type": "boolean" } } }, "InfoRequest": { "type": "object", "additionalProperties": false, "properties": { "newEmail": { "type": "string", "nullable": true }, "newPassword": { "type": "string", "nullable": true }, "oldPassword": { "type": "string", "nullable": true } } }, "WeatherForecast": { "type": "object", "additionalProperties": false, "properties": { "date": { "type": "string", "format": "date-time" }, "temperatureC": { "type": "integer", "format": "int32" }, "temperatureF": { "type": "integer", "format": "int32" }, "summary": { "type": "string", "nullable": true } } } }, "securitySchemes": { "JWT": { "type": "apiKey", "description": "Type into the textbox: Bearer {your JWT token}.", "name": "Authorization", "in": "header" } } }, "security": [ { "JWT": [] } ] }