From 142148368f8092b96fd18420b6bfd5af2ef3edc5 Mon Sep 17 00:00:00 2001 From: prtsie Date: Sun, 8 Sep 2024 00:12:29 +0300 Subject: [PATCH] past visas --- .../VisaApplications/Models/PastVisaModel.cs | 3 +- .../VisaApplications/Models/PastVisitModel.cs | 3 +- .../Models/PermissionToDestCountryModel.cs | 1 - .../PermissionToDestCountryInput.razor | 2 +- .../Pages/CreateApplication.razor | 147 ++++++++++++++++-- .../Validation/ConfigurationConstraints.cs | 2 + .../VisaApplicationCreateRequestModel.cs | 6 +- SchengenVisaApi/VisaApiClient/Client.cs | 21 ++- .../VisaApiClient/clientGeneratorConfig.nswag | 2 +- 9 files changed, 154 insertions(+), 33 deletions(-) diff --git a/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PastVisaModel.cs b/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PastVisaModel.cs index 8092a52..0aa0b02 100644 --- a/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PastVisaModel.cs +++ b/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PastVisaModel.cs @@ -11,11 +11,10 @@ public class PastVisaModel public DateTime IssueDate { get; set; } /// Name of visa - [Required] [MaxLength(ConfigurationConstraints.VisaNameLength)] public string Name { get; set; } = null!; /// Date when visa expires [Required] public DateTime ExpirationDate { get; set; } -} \ No newline at end of file +} diff --git a/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PastVisitModel.cs b/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PastVisitModel.cs index f4dd901..16df158 100644 --- a/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PastVisitModel.cs +++ b/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PastVisitModel.cs @@ -15,7 +15,6 @@ public class PastVisitModel public DateTime EndDate { get; set; } /// Destination country of past visit - [Required] [MaxLength(ConfigurationConstraints.CountryNameLength)] public string DestinationCountry { get; set; } = null!; -} \ No newline at end of file +} diff --git a/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PermissionToDestCountryModel.cs b/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PermissionToDestCountryModel.cs index 64d8155..cd1f59c 100644 --- a/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PermissionToDestCountryModel.cs +++ b/SchengenVisaApi/ApplicationLayer/Services/VisaApplications/Models/PermissionToDestCountryModel.cs @@ -12,6 +12,5 @@ public class PermissionToDestCountryModel /// Issuing authority [MaxLength(ConfigurationConstraints.IssuerNameLength)] - [Required] public string Issuer { get; set; } = null!; } diff --git a/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Components/FormComponents/VisaApplications/PermissionToDestCountryInput.razor b/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Components/FormComponents/VisaApplications/PermissionToDestCountryInput.razor index 2a2c2af..5e9ac0f 100644 --- a/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Components/FormComponents/VisaApplications/PermissionToDestCountryInput.razor +++ b/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Components/FormComponents/VisaApplications/PermissionToDestCountryInput.razor @@ -3,7 +3,7 @@

diff --git a/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Pages/CreateApplication.razor b/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Pages/CreateApplication.razor index 232311d..e7502c3 100644 --- a/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Pages/CreateApplication.razor +++ b/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Pages/CreateApplication.razor @@ -9,8 +9,8 @@ @using BlazorWebAssemblyVisaApiClient.Infrastructure.Helpers @using BlazorWebAssemblyVisaApiClient.Infrastructure.Services.DateTimeProvider @using BlazorWebAssemblyVisaApiClient.Infrastructure.Services.UserDataProvider +@using BlazorWebAssemblyVisaApiClient.Validation @using FluentValidation -@using Newtonsoft.Json @using Newtonsoft.Json.Linq @inherits BlazorWebAssemblyVisaApiClient.Components.Base.VisaClientComponentBase @@ -54,6 +54,62 @@
+
+
Past visas
+ @if (currentPastVisa > 0) + { + + + + + + + + @for (var i = 0; i < currentPastVisa; i++) + { + var visa = requestModel.PastVisas[i]; + + + + + + + } + +
NameIssue dateExpiration date
@visa.Name@visa.IssueDate.ToString("d.MM.yyyy")@visa.ExpirationDate.ToString("d.MM.yyyy") + +
+ } +
+
+ +
+
+ +
+
+ + + +
+ @if (requestModel.VisaCategory is VisaCategory.Transit) {
@@ -61,12 +117,16 @@
} + else + { + requestModel.PermissionToDestCountry = null; + } @if (isNonResident) {
Re-entry permission
- +

} @@ -76,12 +136,17 @@ -//todo past visas and visits @code { + +//todo past visas and visits private VisaApplicationCreateRequestModel requestModel = new(); private Status status = null!; + private Status pastVisaStatus = null!; private bool isNonResident; + private int currentPastVisa; + private int currentPastVisit; + private string formattedNow = null!; [Inject] IDateTimeProvider DateTimeProvider { get; set; } = null!; @@ -89,10 +154,22 @@ [Inject] IValidator VisaApplicationCreateRequestValidator { get; set; } = null!; + [Inject] IValidator PastVisaModelValidator { get; set; } = null!; + [Inject] IMapper Mapper { get; set; } = null!; protected override async Task OnInitializedAsync() { + requestModel.PastVisas = new PastVisaModel[ConfigurationConstraints.MaxPastVisas]; + for (var i = 0; i < requestModel.PastVisas.Length; i++) + { + requestModel.PastVisas[i] = new() + { + IssueDate = DateTimeProvider.Now(), + ExpirationDate = DateTimeProvider.Now() + }; + } + try { isNonResident = (await UserDataProvider.GetApplicant()).IsNonResident; @@ -102,11 +179,15 @@ ErrorHandler.Handle(e); } + formattedNow = DateTimeProvider.FormattedNow(); requestModel.PermissionToDestCountry!.ExpirationDate = DateTimeProvider.Now(); } private async Task TryCreate() { + requestModel.PastVisas = currentPastVisa == 0 ? [] : requestModel.PastVisas[..currentPastVisa]; + requestModel.PastVisits = currentPastVisit == 0 ? [] : requestModel.PastVisits[..currentPastVisit]; + var validationResult = await VisaApplicationCreateRequestValidator.ValidateAsync(requestModel); if (!validationResult.IsValid) { @@ -127,15 +208,16 @@ if (e.StatusCode == (int)HttpStatusCode.BadRequest && e.Result.AdditionalProperties.TryGetValue("errors", out var errors)) { - var errorsList = ((JArray)errors).ToObject>(); - if (errorsList is null) + try { - ErrorHandler.Handle(new JsonException("Can't convert validation errors to list")); - - return; + var errorsList = ((JArray)errors).ToObject>(); + status.SetError(string.Join("
", errorsList!)); + } + catch (Exception inner) + { + ErrorHandler.Handle(inner); + status.SetError("Error occured"); } - - status.SetError(string.Join("
", errorsList)); } else { @@ -148,4 +230,49 @@ } } + private void AddPastVisa() + { + var validationResult = PastVisaModelValidator.Validate(requestModel.PastVisas[currentPastVisa]); + if (!validationResult.IsValid) + { + pastVisaStatus.SetError(validationResult.ToErrorsString()); + return; + } + + if (currentPastVisa < requestModel.PastVisas.Length - 1) + { + currentPastVisa++; + pastVisaStatus.SetSucces("Added"); + } + else + { + pastVisaStatus.SetError($"{requestModel.PastVisas.Length} past visas is maximum"); + } + } + + private void RemovePastVisa(PastVisaModel visa) + { + currentPastVisa--; + var found = false; + + if (requestModel.PastVisas[^1] == visa) + { + requestModel.PastVisas[^1] = new(); + return; + } + + for (var i = 0; i < requestModel.PastVisas.Length - 1; i++) + { + if (requestModel.PastVisas[i] == visa) + { + found = true; + } + + if (found) + { + requestModel.PastVisas[i] = requestModel.PastVisas[i + 1]; + } + } + } + } diff --git a/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Validation/ConfigurationConstraints.cs b/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Validation/ConfigurationConstraints.cs index e1b3ccc..8cfc16a 100644 --- a/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Validation/ConfigurationConstraints.cs +++ b/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Validation/ConfigurationConstraints.cs @@ -20,4 +20,6 @@ public static class ConfigurationConstraints public const int ApplicantMinAge = 14; public const int JobTitleLength = 50; public const int MaxValidDays = 90; + public const int MaxPastVisas = 10; + public const int MaxPastVisits = 10; } diff --git a/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Validation/VisaApplications/Models/VisaApplicationCreateRequestModel.cs b/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Validation/VisaApplications/Models/VisaApplicationCreateRequestModel.cs index ce979c9..573e1dc 100644 --- a/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Validation/VisaApplications/Models/VisaApplicationCreateRequestModel.cs +++ b/SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Validation/VisaApplications/Models/VisaApplicationCreateRequestModel.cs @@ -26,13 +26,11 @@ namespace BlazorWebAssemblyVisaApiClient.Validation.VisaApplications.Models [Range(0, ConfigurationConstraints.MaxValidDays)] public int ValidDaysRequested { get; set; } - [ValidateComplexType] - public PastVisaModel[] PastVisas { get; set; } = default!; + [ValidateComplexType] public PastVisaModel[] PastVisas { get; set; } = default!; [ValidateComplexType] public PermissionToDestCountryModel? PermissionToDestCountry { get; set; } = new(); - [ValidateComplexType] - public PastVisitModel[] PastVisits { get; set; } = default!; + [ValidateComplexType] public PastVisitModel[] PastVisits { get; set; } = default!; } } diff --git a/SchengenVisaApi/VisaApiClient/Client.cs b/SchengenVisaApi/VisaApiClient/Client.cs index f81a0f3..1f6069f 100644 --- a/SchengenVisaApi/VisaApiClient/Client.cs +++ b/SchengenVisaApi/VisaApiClient/Client.cs @@ -1799,10 +1799,9 @@ namespace VisaApiClient [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.DateTimeOffset IssueDate { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required] - [System.ComponentModel.DataAnnotations.StringLength(70, MinimumLength = 1)] - public string Name { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(70)] + public string? Name { get; set; } = default!; [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] @@ -1821,10 +1820,9 @@ namespace VisaApiClient [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.DateTimeOffset EndDate { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("destinationCountry", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required] - [System.ComponentModel.DataAnnotations.StringLength(70, MinimumLength = 1)] - public string DestinationCountry { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("destinationCountry", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(70)] + public string? DestinationCountry { get; set; } = default!; } @@ -1835,10 +1833,9 @@ namespace VisaApiClient [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.DateTimeOffset ExpirationDate { get; set; } = default!; - [Newtonsoft.Json.JsonProperty("issuer", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required] - [System.ComponentModel.DataAnnotations.StringLength(200, MinimumLength = 1)] - public string Issuer { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("issuer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(200)] + public string? Issuer { get; set; } = default!; } diff --git a/SchengenVisaApi/VisaApiClient/clientGeneratorConfig.nswag b/SchengenVisaApi/VisaApiClient/clientGeneratorConfig.nswag index dc3bcb6..a840463 100644 --- a/SchengenVisaApi/VisaApiClient/clientGeneratorConfig.nswag +++ b/SchengenVisaApi/VisaApiClient/clientGeneratorConfig.nswag @@ -3,7 +3,7 @@ "defaultVariables": null, "documentGenerator": { "fromDocument": { - "json": "{\r\n \"openapi\": \"3.0.1\",\r\n \"info\": {\r\n \"title\": \"SchengenVisaApi\",\r\n \"version\": \"1.0\"\r\n },\r\n \"paths\": {\r\n \"/users/register\": {\r\n \"post\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Adds applicant with user account\",\r\n \"operationId\": \"Register\",\r\n \"requestBody\": {\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterApplicantRequest\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterApplicantRequest\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterApplicantRequest\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/users/authorities\": {\r\n \"post\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Adds approving authority with user account\",\r\n \"description\": \"Accessible only for admins\",\r\n \"operationId\": \"RegisterAuthority\",\r\n \"requestBody\": {\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterRequest\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterRequest\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterRequest\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"get\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Returns list of authority accounts\",\r\n \"description\": \"Accessible only for admins\",\r\n \"operationId\": \"GetAuthorityAccounts\",\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/UserModel\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/UserModel\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/UserModel\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/users/login\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Returns JWT-token for authentication\",\r\n \"operationId\": \"Login\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"email\",\r\n \"in\": \"query\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"password\",\r\n \"in\": \"query\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthToken\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthToken\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthToken\"\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/users/authorities/{authorityAccountId}\": {\r\n \"put\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Changes authority's account authentication data\",\r\n \"description\": \"Accessible only for admins\",\r\n \"operationId\": \"ChangeAuthorityAuthData\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"authorityAccountId\",\r\n \"in\": \"path\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthData\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthData\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthData\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Removes authority's account\",\r\n \"description\": \"Accessible only for admins\",\r\n \"operationId\": \"RemoveAuthorityAccount\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"authorityAccountId\",\r\n \"in\": \"path\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/users/applicant\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Returns applicant info\",\r\n \"operationId\": \"GetApplicant\",\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ApplicantModel\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ApplicantModel\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ApplicantModel\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications/pending\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Returns pending applications\",\r\n \"description\": \"Accessible only for approving authorities\",\r\n \"operationId\": \"GetPending\",\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForAuthority\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForAuthority\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForAuthority\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications/ofApplicant\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Returns all applications of one applicant\",\r\n \"description\": \"Returns applications of authorized applicant\",\r\n \"operationId\": \"GetForApplicant\",\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForApplicant\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForApplicant\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForApplicant\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications\": {\r\n \"post\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Adds new application\",\r\n \"description\": \"Adds application for authorized applicant\",\r\n \"operationId\": \"CreateApplication\",\r\n \"requestBody\": {\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationCreateRequest\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationCreateRequest\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationCreateRequest\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications/{applicationId}\": {\r\n \"patch\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Sets application status to closed\",\r\n \"description\": \"Accessible only for applicant\",\r\n \"operationId\": \"CloseApplication\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"applicationId\",\r\n \"in\": \"path\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications/approving/{applicationId}\": {\r\n \"patch\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Approve or reject applications\",\r\n \"description\": \"Accessible only for authorities\",\r\n \"operationId\": \"SetStatusFromAuthority\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"applicationId\",\r\n \"in\": \"path\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthorityRequestStatuses\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"components\": {\r\n \"schemas\": {\r\n \"AddressModel\": {\r\n \"required\": [\r\n \"building\",\r\n \"city\",\r\n \"country\",\r\n \"street\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"country\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"city\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"street\": {\r\n \"maxLength\": 100,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"building\": {\r\n \"maxLength\": 10,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ApplicantModel\": {\r\n \"required\": [\r\n \"birthDate\",\r\n \"citizenship\",\r\n \"citizenshipByBirth\",\r\n \"cityOfBirth\",\r\n \"countryOfBirth\",\r\n \"fatherName\",\r\n \"gender\",\r\n \"isNonResident\",\r\n \"jobTitle\",\r\n \"maritalStatus\",\r\n \"motherName\",\r\n \"name\",\r\n \"passport\",\r\n \"placeOfWork\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"passport\": {\r\n \"$ref\": \"#/components/schemas/PassportModel\"\r\n },\r\n \"birthDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"countryOfBirth\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"cityOfBirth\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"citizenship\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"citizenshipByBirth\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"gender\": {\r\n \"$ref\": \"#/components/schemas/Gender\"\r\n },\r\n \"maritalStatus\": {\r\n \"$ref\": \"#/components/schemas/MaritalStatus\"\r\n },\r\n \"fatherName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"motherName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"jobTitle\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"placeOfWork\": {\r\n \"$ref\": \"#/components/schemas/PlaceOfWorkModel\"\r\n },\r\n \"isNonResident\": {\r\n \"type\": \"boolean\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ApplicationStatus\": {\r\n \"enum\": [\r\n \"Pending\",\r\n \"Approved\",\r\n \"Rejected\",\r\n \"Closed\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"AuthData\": {\r\n \"required\": [\r\n \"email\",\r\n \"password\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"email\": {\r\n \"maxLength\": 254,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"password\": {\r\n \"maxLength\": 50,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AuthToken\": {\r\n \"required\": [\r\n \"token\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"token\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AuthorityRequestStatuses\": {\r\n \"enum\": [\r\n \"Approved\",\r\n \"Rejected\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"Gender\": {\r\n \"enum\": [\r\n \"Unknown\",\r\n \"Male\",\r\n \"Female\",\r\n \"Turkish\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"MaritalStatus\": {\r\n \"enum\": [\r\n \"Other\",\r\n \"Married\",\r\n \"Unmarried\",\r\n \"Separated\",\r\n \"WidowOrWidower\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"NameModel\": {\r\n \"required\": [\r\n \"firstName\",\r\n \"surname\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"firstName\": {\r\n \"maxLength\": 50,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"surname\": {\r\n \"maxLength\": 50,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"patronymic\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PassportModel\": {\r\n \"required\": [\r\n \"expirationDate\",\r\n \"issueDate\",\r\n \"issuer\",\r\n \"number\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"number\": {\r\n \"maxLength\": 20,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"issuer\": {\r\n \"maxLength\": 200,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"issueDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PastVisaModel\": {\r\n \"required\": [\r\n \"expirationDate\",\r\n \"issueDate\",\r\n \"name\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"issueDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"name\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PastVisitModel\": {\r\n \"required\": [\r\n \"destinationCountry\",\r\n \"endDate\",\r\n \"startDate\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"startDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"endDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"destinationCountry\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PermissionToDestCountryModel\": {\r\n \"required\": [\r\n \"expirationDate\",\r\n \"issuer\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"issuer\": {\r\n \"maxLength\": 200,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PlaceOfWorkModel\": {\r\n \"required\": [\r\n \"address\",\r\n \"name\",\r\n \"phoneNum\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 200,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressModel\"\r\n },\r\n \"phoneNum\": {\r\n \"maxLength\": 13,\r\n \"minLength\": 11,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": {}\r\n },\r\n \"ReentryPermitModel\": {\r\n \"required\": [\r\n \"expirationDate\",\r\n \"number\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"number\": {\r\n \"maxLength\": 25,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"RegisterApplicantRequest\": {\r\n \"required\": [\r\n \"applicantName\",\r\n \"birthDate\",\r\n \"citizenship\",\r\n \"citizenshipByBirth\",\r\n \"cityOfBirth\",\r\n \"countryOfBirth\",\r\n \"fatherName\",\r\n \"gender\",\r\n \"isNonResident\",\r\n \"jobTitle\",\r\n \"maritalStatus\",\r\n \"motherName\",\r\n \"passport\",\r\n \"placeOfWork\",\r\n \"registerRequest\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"registerRequest\": {\r\n \"$ref\": \"#/components/schemas/RegisterRequest\"\r\n },\r\n \"applicantName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"passport\": {\r\n \"$ref\": \"#/components/schemas/PassportModel\"\r\n },\r\n \"birthDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"cityOfBirth\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"countryOfBirth\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"citizenship\": {\r\n \"maxLength\": 30,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"citizenshipByBirth\": {\r\n \"maxLength\": 30,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"gender\": {\r\n \"$ref\": \"#/components/schemas/Gender\"\r\n },\r\n \"maritalStatus\": {\r\n \"$ref\": \"#/components/schemas/MaritalStatus\"\r\n },\r\n \"fatherName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"motherName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"jobTitle\": {\r\n \"maxLength\": 50,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"placeOfWork\": {\r\n \"$ref\": \"#/components/schemas/PlaceOfWorkModel\"\r\n },\r\n \"isNonResident\": {\r\n \"type\": \"boolean\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"RegisterRequest\": {\r\n \"required\": [\r\n \"authData\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"authData\": {\r\n \"$ref\": \"#/components/schemas/AuthData\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"RequestedNumberOfEntries\": {\r\n \"enum\": [\r\n \"Many\",\r\n \"One\",\r\n \"Two\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"UserModel\": {\r\n \"required\": [\r\n \"email\",\r\n \"id\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\",\r\n \"readOnly\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 254,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"VisaApplicationCreateRequest\": {\r\n \"required\": [\r\n \"destinationCountry\",\r\n \"isForGroup\",\r\n \"pastVisas\",\r\n \"pastVisits\",\r\n \"requestedNumberOfEntries\",\r\n \"validDaysRequested\",\r\n \"visaCategory\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"reentryPermit\": {\r\n \"$ref\": \"#/components/schemas/ReentryPermitModel\"\r\n },\r\n \"destinationCountry\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"visaCategory\": {\r\n \"$ref\": \"#/components/schemas/VisaCategory\"\r\n },\r\n \"isForGroup\": {\r\n \"type\": \"boolean\"\r\n },\r\n \"requestedNumberOfEntries\": {\r\n \"$ref\": \"#/components/schemas/RequestedNumberOfEntries\"\r\n },\r\n \"validDaysRequested\": {\r\n \"maximum\": 90,\r\n \"minimum\": 0,\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n },\r\n \"pastVisas\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisaModel\"\r\n }\r\n },\r\n \"permissionToDestCountry\": {\r\n \"$ref\": \"#/components/schemas/PermissionToDestCountryModel\"\r\n },\r\n \"pastVisits\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisitModel\"\r\n }\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"VisaApplicationModelForApplicant\": {\r\n \"required\": [\r\n \"destinationCountry\",\r\n \"forGroup\",\r\n \"id\",\r\n \"pastVisas\",\r\n \"pastVisits\",\r\n \"requestDate\",\r\n \"requestedNumberOfEntries\",\r\n \"status\",\r\n \"validDaysRequested\",\r\n \"visaCategory\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n },\r\n \"status\": {\r\n \"$ref\": \"#/components/schemas/ApplicationStatus\"\r\n },\r\n \"reentryPermit\": {\r\n \"$ref\": \"#/components/schemas/ReentryPermitModel\"\r\n },\r\n \"destinationCountry\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"pastVisas\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisaModel\"\r\n }\r\n },\r\n \"permissionToDestCountry\": {\r\n \"$ref\": \"#/components/schemas/PermissionToDestCountryModel\"\r\n },\r\n \"pastVisits\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisitModel\"\r\n }\r\n },\r\n \"visaCategory\": {\r\n \"$ref\": \"#/components/schemas/VisaCategory\"\r\n },\r\n \"forGroup\": {\r\n \"type\": \"boolean\"\r\n },\r\n \"requestedNumberOfEntries\": {\r\n \"$ref\": \"#/components/schemas/RequestedNumberOfEntries\"\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"validDaysRequested\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"VisaApplicationModelForAuthority\": {\r\n \"required\": [\r\n \"applicant\",\r\n \"destinationCountry\",\r\n \"forGroup\",\r\n \"id\",\r\n \"pastVisas\",\r\n \"pastVisits\",\r\n \"requestDate\",\r\n \"requestedNumberOfEntries\",\r\n \"status\",\r\n \"validDaysRequested\",\r\n \"visaCategory\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n },\r\n \"applicant\": {\r\n \"$ref\": \"#/components/schemas/ApplicantModel\"\r\n },\r\n \"status\": {\r\n \"$ref\": \"#/components/schemas/ApplicationStatus\"\r\n },\r\n \"reentryPermit\": {\r\n \"$ref\": \"#/components/schemas/ReentryPermitModel\"\r\n },\r\n \"destinationCountry\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"pastVisas\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisaModel\"\r\n }\r\n },\r\n \"permissionToDestCountry\": {\r\n \"$ref\": \"#/components/schemas/PermissionToDestCountryModel\"\r\n },\r\n \"pastVisits\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisitModel\"\r\n }\r\n },\r\n \"visaCategory\": {\r\n \"$ref\": \"#/components/schemas/VisaCategory\"\r\n },\r\n \"forGroup\": {\r\n \"type\": \"boolean\"\r\n },\r\n \"requestedNumberOfEntries\": {\r\n \"$ref\": \"#/components/schemas/RequestedNumberOfEntries\"\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"validDaysRequested\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"VisaCategory\": {\r\n \"enum\": [\r\n \"Transit\",\r\n \"ShortDated\"\r\n ],\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"securitySchemes\": {\r\n \"Bearer\": {\r\n \"type\": \"http\",\r\n \"description\": \"Provide a JWT-token.\",\r\n \"scheme\": \"Bearer\",\r\n \"bearerFormat\": \"JWT\"\r\n }\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"Bearer\": []\r\n }\r\n ]\r\n}", + "json": "{\r\n \"openapi\": \"3.0.1\",\r\n \"info\": {\r\n \"title\": \"SchengenVisaApi\",\r\n \"version\": \"1.0\"\r\n },\r\n \"paths\": {\r\n \"/users/register\": {\r\n \"post\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Adds applicant with user account\",\r\n \"operationId\": \"Register\",\r\n \"requestBody\": {\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterApplicantRequest\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterApplicantRequest\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterApplicantRequest\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/users/authorities\": {\r\n \"post\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Adds approving authority with user account\",\r\n \"description\": \"Accessible only for admins\",\r\n \"operationId\": \"RegisterAuthority\",\r\n \"requestBody\": {\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterRequest\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterRequest\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/RegisterRequest\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"get\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Returns list of authority accounts\",\r\n \"description\": \"Accessible only for admins\",\r\n \"operationId\": \"GetAuthorityAccounts\",\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/UserModel\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/UserModel\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/UserModel\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/users/login\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Returns JWT-token for authentication\",\r\n \"operationId\": \"Login\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"email\",\r\n \"in\": \"query\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"password\",\r\n \"in\": \"query\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthToken\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthToken\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthToken\"\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/users/authorities/{authorityAccountId}\": {\r\n \"put\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Changes authority's account authentication data\",\r\n \"description\": \"Accessible only for admins\",\r\n \"operationId\": \"ChangeAuthorityAuthData\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"authorityAccountId\",\r\n \"in\": \"path\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthData\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthData\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthData\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Removes authority's account\",\r\n \"description\": \"Accessible only for admins\",\r\n \"operationId\": \"RemoveAuthorityAccount\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"authorityAccountId\",\r\n \"in\": \"path\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/users/applicant\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Users\"\r\n ],\r\n \"summary\": \"Returns applicant info\",\r\n \"operationId\": \"GetApplicant\",\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ApplicantModel\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ApplicantModel\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ApplicantModel\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications/pending\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Returns pending applications\",\r\n \"description\": \"Accessible only for approving authorities\",\r\n \"operationId\": \"GetPending\",\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForAuthority\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForAuthority\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForAuthority\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications/ofApplicant\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Returns all applications of one applicant\",\r\n \"description\": \"Returns applications of authorized applicant\",\r\n \"operationId\": \"GetForApplicant\",\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForApplicant\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForApplicant\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationModelForApplicant\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications\": {\r\n \"post\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Adds new application\",\r\n \"description\": \"Adds application for authorized applicant\",\r\n \"operationId\": \"CreateApplication\",\r\n \"requestBody\": {\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationCreateRequest\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationCreateRequest\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/VisaApplicationCreateRequest\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications/{applicationId}\": {\r\n \"patch\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Sets application status to closed\",\r\n \"description\": \"Accessible only for applicant\",\r\n \"operationId\": \"CloseApplication\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"applicationId\",\r\n \"in\": \"path\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/visaApplications/approving/{applicationId}\": {\r\n \"patch\": {\r\n \"tags\": [\r\n \"VisaApplication\"\r\n ],\r\n \"summary\": \"Approve or reject applications\",\r\n \"description\": \"Accessible only for authorities\",\r\n \"operationId\": \"SetStatusFromAuthority\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"applicationId\",\r\n \"in\": \"path\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AuthorityRequestStatuses\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Success\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"components\": {\r\n \"schemas\": {\r\n \"AddressModel\": {\r\n \"required\": [\r\n \"building\",\r\n \"city\",\r\n \"country\",\r\n \"street\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"country\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"city\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"street\": {\r\n \"maxLength\": 100,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"building\": {\r\n \"maxLength\": 10,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ApplicantModel\": {\r\n \"required\": [\r\n \"birthDate\",\r\n \"citizenship\",\r\n \"citizenshipByBirth\",\r\n \"cityOfBirth\",\r\n \"countryOfBirth\",\r\n \"fatherName\",\r\n \"gender\",\r\n \"isNonResident\",\r\n \"jobTitle\",\r\n \"maritalStatus\",\r\n \"motherName\",\r\n \"name\",\r\n \"passport\",\r\n \"placeOfWork\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"passport\": {\r\n \"$ref\": \"#/components/schemas/PassportModel\"\r\n },\r\n \"birthDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"countryOfBirth\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"cityOfBirth\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"citizenship\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"citizenshipByBirth\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"gender\": {\r\n \"$ref\": \"#/components/schemas/Gender\"\r\n },\r\n \"maritalStatus\": {\r\n \"$ref\": \"#/components/schemas/MaritalStatus\"\r\n },\r\n \"fatherName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"motherName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"jobTitle\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"placeOfWork\": {\r\n \"$ref\": \"#/components/schemas/PlaceOfWorkModel\"\r\n },\r\n \"isNonResident\": {\r\n \"type\": \"boolean\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ApplicationStatus\": {\r\n \"enum\": [\r\n \"Pending\",\r\n \"Approved\",\r\n \"Rejected\",\r\n \"Closed\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"AuthData\": {\r\n \"required\": [\r\n \"email\",\r\n \"password\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"email\": {\r\n \"maxLength\": 254,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"password\": {\r\n \"maxLength\": 50,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AuthToken\": {\r\n \"required\": [\r\n \"token\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"token\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AuthorityRequestStatuses\": {\r\n \"enum\": [\r\n \"Approved\",\r\n \"Rejected\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"Gender\": {\r\n \"enum\": [\r\n \"Unknown\",\r\n \"Male\",\r\n \"Female\",\r\n \"Turkish\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"MaritalStatus\": {\r\n \"enum\": [\r\n \"Other\",\r\n \"Married\",\r\n \"Unmarried\",\r\n \"Separated\",\r\n \"WidowOrWidower\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"NameModel\": {\r\n \"required\": [\r\n \"firstName\",\r\n \"surname\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"firstName\": {\r\n \"maxLength\": 50,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"surname\": {\r\n \"maxLength\": 50,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"patronymic\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PassportModel\": {\r\n \"required\": [\r\n \"expirationDate\",\r\n \"issueDate\",\r\n \"issuer\",\r\n \"number\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"number\": {\r\n \"maxLength\": 20,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"issuer\": {\r\n \"maxLength\": 200,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"issueDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PastVisaModel\": {\r\n \"required\": [\r\n \"expirationDate\",\r\n \"issueDate\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"issueDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"name\": {\r\n \"maxLength\": 70,\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PastVisitModel\": {\r\n \"required\": [\r\n \"endDate\",\r\n \"startDate\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"startDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"endDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"destinationCountry\": {\r\n \"maxLength\": 70,\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PermissionToDestCountryModel\": {\r\n \"required\": [\r\n \"expirationDate\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"issuer\": {\r\n \"maxLength\": 200,\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PlaceOfWorkModel\": {\r\n \"required\": [\r\n \"address\",\r\n \"name\",\r\n \"phoneNum\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 200,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressModel\"\r\n },\r\n \"phoneNum\": {\r\n \"maxLength\": 13,\r\n \"minLength\": 11,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": {}\r\n },\r\n \"ReentryPermitModel\": {\r\n \"required\": [\r\n \"expirationDate\",\r\n \"number\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"number\": {\r\n \"maxLength\": 25,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"RegisterApplicantRequest\": {\r\n \"required\": [\r\n \"applicantName\",\r\n \"birthDate\",\r\n \"citizenship\",\r\n \"citizenshipByBirth\",\r\n \"cityOfBirth\",\r\n \"countryOfBirth\",\r\n \"fatherName\",\r\n \"gender\",\r\n \"isNonResident\",\r\n \"jobTitle\",\r\n \"maritalStatus\",\r\n \"motherName\",\r\n \"passport\",\r\n \"placeOfWork\",\r\n \"registerRequest\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"registerRequest\": {\r\n \"$ref\": \"#/components/schemas/RegisterRequest\"\r\n },\r\n \"applicantName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"passport\": {\r\n \"$ref\": \"#/components/schemas/PassportModel\"\r\n },\r\n \"birthDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"cityOfBirth\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"countryOfBirth\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"citizenship\": {\r\n \"maxLength\": 30,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"citizenshipByBirth\": {\r\n \"maxLength\": 30,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"gender\": {\r\n \"$ref\": \"#/components/schemas/Gender\"\r\n },\r\n \"maritalStatus\": {\r\n \"$ref\": \"#/components/schemas/MaritalStatus\"\r\n },\r\n \"fatherName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"motherName\": {\r\n \"$ref\": \"#/components/schemas/NameModel\"\r\n },\r\n \"jobTitle\": {\r\n \"maxLength\": 50,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"placeOfWork\": {\r\n \"$ref\": \"#/components/schemas/PlaceOfWorkModel\"\r\n },\r\n \"isNonResident\": {\r\n \"type\": \"boolean\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"RegisterRequest\": {\r\n \"required\": [\r\n \"authData\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"authData\": {\r\n \"$ref\": \"#/components/schemas/AuthData\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"RequestedNumberOfEntries\": {\r\n \"enum\": [\r\n \"Many\",\r\n \"One\",\r\n \"Two\"\r\n ],\r\n \"type\": \"string\"\r\n },\r\n \"UserModel\": {\r\n \"required\": [\r\n \"email\",\r\n \"id\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\",\r\n \"readOnly\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 254,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"VisaApplicationCreateRequest\": {\r\n \"required\": [\r\n \"destinationCountry\",\r\n \"isForGroup\",\r\n \"pastVisas\",\r\n \"pastVisits\",\r\n \"requestedNumberOfEntries\",\r\n \"validDaysRequested\",\r\n \"visaCategory\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"reentryPermit\": {\r\n \"$ref\": \"#/components/schemas/ReentryPermitModel\"\r\n },\r\n \"destinationCountry\": {\r\n \"maxLength\": 70,\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"visaCategory\": {\r\n \"$ref\": \"#/components/schemas/VisaCategory\"\r\n },\r\n \"isForGroup\": {\r\n \"type\": \"boolean\"\r\n },\r\n \"requestedNumberOfEntries\": {\r\n \"$ref\": \"#/components/schemas/RequestedNumberOfEntries\"\r\n },\r\n \"validDaysRequested\": {\r\n \"maximum\": 90,\r\n \"minimum\": 0,\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n },\r\n \"pastVisas\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisaModel\"\r\n }\r\n },\r\n \"permissionToDestCountry\": {\r\n \"$ref\": \"#/components/schemas/PermissionToDestCountryModel\"\r\n },\r\n \"pastVisits\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisitModel\"\r\n }\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"VisaApplicationModelForApplicant\": {\r\n \"required\": [\r\n \"destinationCountry\",\r\n \"forGroup\",\r\n \"id\",\r\n \"pastVisas\",\r\n \"pastVisits\",\r\n \"requestDate\",\r\n \"requestedNumberOfEntries\",\r\n \"status\",\r\n \"validDaysRequested\",\r\n \"visaCategory\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n },\r\n \"status\": {\r\n \"$ref\": \"#/components/schemas/ApplicationStatus\"\r\n },\r\n \"reentryPermit\": {\r\n \"$ref\": \"#/components/schemas/ReentryPermitModel\"\r\n },\r\n \"destinationCountry\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"pastVisas\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisaModel\"\r\n }\r\n },\r\n \"permissionToDestCountry\": {\r\n \"$ref\": \"#/components/schemas/PermissionToDestCountryModel\"\r\n },\r\n \"pastVisits\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisitModel\"\r\n }\r\n },\r\n \"visaCategory\": {\r\n \"$ref\": \"#/components/schemas/VisaCategory\"\r\n },\r\n \"forGroup\": {\r\n \"type\": \"boolean\"\r\n },\r\n \"requestedNumberOfEntries\": {\r\n \"$ref\": \"#/components/schemas/RequestedNumberOfEntries\"\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"validDaysRequested\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"VisaApplicationModelForAuthority\": {\r\n \"required\": [\r\n \"applicant\",\r\n \"destinationCountry\",\r\n \"forGroup\",\r\n \"id\",\r\n \"pastVisas\",\r\n \"pastVisits\",\r\n \"requestDate\",\r\n \"requestedNumberOfEntries\",\r\n \"status\",\r\n \"validDaysRequested\",\r\n \"visaCategory\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n },\r\n \"applicant\": {\r\n \"$ref\": \"#/components/schemas/ApplicantModel\"\r\n },\r\n \"status\": {\r\n \"$ref\": \"#/components/schemas/ApplicationStatus\"\r\n },\r\n \"reentryPermit\": {\r\n \"$ref\": \"#/components/schemas/ReentryPermitModel\"\r\n },\r\n \"destinationCountry\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\"\r\n },\r\n \"pastVisas\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisaModel\"\r\n }\r\n },\r\n \"permissionToDestCountry\": {\r\n \"$ref\": \"#/components/schemas/PermissionToDestCountryModel\"\r\n },\r\n \"pastVisits\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PastVisitModel\"\r\n }\r\n },\r\n \"visaCategory\": {\r\n \"$ref\": \"#/components/schemas/VisaCategory\"\r\n },\r\n \"forGroup\": {\r\n \"type\": \"boolean\"\r\n },\r\n \"requestedNumberOfEntries\": {\r\n \"$ref\": \"#/components/schemas/RequestedNumberOfEntries\"\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"validDaysRequested\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"VisaCategory\": {\r\n \"enum\": [\r\n \"Transit\",\r\n \"ShortDated\"\r\n ],\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"securitySchemes\": {\r\n \"Bearer\": {\r\n \"type\": \"http\",\r\n \"description\": \"Provide a JWT-token.\",\r\n \"scheme\": \"Bearer\",\r\n \"bearerFormat\": \"JWT\"\r\n }\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"Bearer\": []\r\n }\r\n ]\r\n}", "url": "https://localhost:44370/swagger/v1/swagger.json", "output": null, "newLineBehavior": "Auto"