From 994ec8886120aa6a933b9f525482b4f73ee17b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Albert?= Date: Tue, 8 Oct 2024 08:25:00 +0000 Subject: [PATCH] feat(driving-license): check if 65+ renewal is possible (#16292) (#16307) * check if 65 renewal is possible * remove console log * cleanup * coderabbit tweaks * coderabbit changes * quick fix * add type? --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../src/lib/drivingLicense.service.ts | 11 +- .../src/lib/drivingLicense.type.ts | 1 + .../EligibilitySummary/extractReasons.ts | 7 + .../EligibilitySummary/useEligibility.ts | 80 +- .../prerequisites/sectionApplicationFor.ts | 9 +- .../driving-license/src/lib/constants.ts | 14 + .../driving-license/src/lib/messages.ts | 10 + .../driving-license/src/lib/types.ts | 1 + .../src/lib/drivingLicenseApi.service.ts | 17 + .../driving-license/src/v5/clientConfig.json | 1465 +++++------------ 10 files changed, 550 insertions(+), 1065 deletions(-) diff --git a/libs/api/domains/driving-license/src/lib/drivingLicense.service.ts b/libs/api/domains/driving-license/src/lib/drivingLicense.service.ts index 13cd2086ac21..9cb539b8105c 100644 --- a/libs/api/domains/driving-license/src/lib/drivingLicense.service.ts +++ b/libs/api/domains/driving-license/src/lib/drivingLicense.service.ts @@ -355,8 +355,15 @@ export class DrivingLicenseService { } } - async canApplyFor(type: 'B-full' | 'B-temp' | 'BE', token: string) { - if (type === 'B-full') { + async canApplyFor( + type: 'B-full' | 'B-temp' | 'BE' | 'B-full-renewal-65', + token: string, + ) { + if (type === 'B-full-renewal-65') { + return this.drivingLicenseApi.getCanApplyForRenewal65({ + token, + }) + } else if (type === 'B-full') { return this.drivingLicenseApi.getCanApplyForCategoryFull({ category: 'B', token, diff --git a/libs/api/domains/driving-license/src/lib/drivingLicense.type.ts b/libs/api/domains/driving-license/src/lib/drivingLicense.type.ts index 24a6d5062b98..741ca9a09017 100644 --- a/libs/api/domains/driving-license/src/lib/drivingLicense.type.ts +++ b/libs/api/domains/driving-license/src/lib/drivingLicense.type.ts @@ -74,6 +74,7 @@ export enum RequirementKey { hasHadValidCategoryForFiveYearsOrMore = 'HasHadValidCategoryForFiveYearsOrMore', //TODO: Remove when RLS/SGS supports health certificate in BE license beRequiresHealthCertificate = 'beRequiresHealthCertificate', + noExtendedDrivingLicense = 'NoExtendedDrivingLicense', } export interface ApplicationEligibilityRequirement { diff --git a/libs/application/templates/driving-license/src/fields/EligibilitySummary/extractReasons.ts b/libs/application/templates/driving-license/src/fields/EligibilitySummary/extractReasons.ts index cc3009187f2c..d0a48764228d 100644 --- a/libs/application/templates/driving-license/src/fields/EligibilitySummary/extractReasons.ts +++ b/libs/application/templates/driving-license/src/fields/EligibilitySummary/extractReasons.ts @@ -25,6 +25,8 @@ const getDeniedByServiceMessageDescription = ( case RequirementKey.HasDeprivation: case RequirementKey.HasPoints: return requirementsMessages.hasPointsOrDeprivation + case RequirementKey.NoExtendedDrivingLicense: + return requirementsMessages.noExtendedDrivingLicenseTitle default: return requirementsMessages.rlsDefaultDeniedDescription } @@ -85,6 +87,11 @@ const requirementKeyToStep = ( title: requirementsMessages.beLicenseQualityPhotoTitle, description: requirementsMessages.beLicenseQualityPhotoDescription, } + case RequirementKey.NoExtendedDrivingLicense: + return { + title: requirementsMessages.noExtendedDrivingLicenseTitle, + description: requirementsMessages.noExtendedDrivingLicenseDescription, + } default: throw new Error('Unknown requirement reason - should not happen') } diff --git a/libs/application/templates/driving-license/src/fields/EligibilitySummary/useEligibility.ts b/libs/application/templates/driving-license/src/fields/EligibilitySummary/useEligibility.ts index 5a0b3eabb96e..5c474ce38154 100644 --- a/libs/application/templates/driving-license/src/fields/EligibilitySummary/useEligibility.ts +++ b/libs/application/templates/driving-license/src/fields/EligibilitySummary/useEligibility.ts @@ -1,14 +1,21 @@ import { getValueViaPath } from '@island.is/application/core' import { Application } from '@island.is/application/types' -import { ApplicationEligibility, RequirementKey } from '../../types/schema' +import { + ApplicationEligibility, + ApplicationEligibilityRequirement, + RequirementKey, +} from '../../types/schema' import { useQuery, gql } from '@apollo/client' import { B_FULL, + B_FULL_RENEWAL_65, BE, + codesExtendedLicenseCategories, codesRequiringHealthCertificate, DrivingLicenseApplicationFor, DrivingLicenseFakeData, otherLicenseCategories, + remarksCannotRenew65, YES, } from '../../lib/constants' import { fakeEligibility } from './fakeEligibility' @@ -90,6 +97,23 @@ export const useEligibility = ( ) } + const hasExtendedDrivingLicense = ( + currentLicense: DrivingLicense | undefined, + drivingLicenseIssued: string | undefined, + ): boolean => { + if (!drivingLicenseIssued) return false + + const relevantCategories = currentLicense?.categories?.filter((x) => + codesExtendedLicenseCategories.includes(x.nr), + ) + + if (!relevantCategories?.length) return false + + // Check if any category was issued on a different date than the 'B' license + // (indicating an extended license) + return relevantCategories.some((x) => x.issued !== drivingLicenseIssued) + } + if (usingFakeData) { return { loading: false, @@ -111,13 +135,11 @@ export const useEligibility = ( } } + const eligibility: ApplicationEligibilityRequirement[] = + data.drivingLicenseApplicationEligibility?.requirements ?? [] + //TODO: Remove when RLS/SGS supports health certificate in BE license if (application.answers.applicationFor === BE) { - const eligibility = - data.drivingLicenseApplicationEligibility === undefined - ? [] - : (data.drivingLicenseApplicationEligibility as ApplicationEligibility) - .requirements return { loading: loading, eligibility: { @@ -143,6 +165,52 @@ export const useEligibility = ( } } + if (application.answers.applicationFor === B_FULL_RENEWAL_65) { + const licenseB = currentLicense?.categories?.find( + (license) => license.nr === 'B', + ) + const drivingLicenseIssued = licenseB?.issued + + const hasExtendedLicense = hasExtendedDrivingLicense( + currentLicense, + drivingLicenseIssued, + ) + + const hasAnyInvalidRemarks = + currentLicense?.remarks?.some((remark) => + remarksCannotRenew65.includes(remark.code), + ) ?? false + + const requirements = [ + ...eligibility, + { + key: RequirementKey.HasNoPhoto, + requirementMet: hasQualityPhoto, + }, + ...(hasExtendedLicense + ? [ + { + key: RequirementKey.NoExtendedDrivingLicense, + requirementMet: false, + }, + ] + : []), + ] + + return { + loading: loading, + eligibility: { + isEligible: loading + ? undefined + : (data.drivingLicenseApplicationEligibility?.isEligible ?? false) && + hasQualityPhoto && + !hasExtendedLicense && + !hasAnyInvalidRemarks, + requirements, + }, + } + } + return { loading, eligibility: data.drivingLicenseApplicationEligibility, diff --git a/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts b/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts index 5fd395596f55..a5ba5d014713 100644 --- a/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts +++ b/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts @@ -43,7 +43,7 @@ export const sectionApplicationFor = ( 'currentLicense.data', ) ?? { categories: null } - const age = + let age = getValueViaPath( app.externalData, 'nationalRegistry.data.age', @@ -53,6 +53,7 @@ export const sectionApplicationFor = ( app.answers, 'fakeData', ) + if (fakeData?.useFakeData === 'yes') { currentLicense = fakeData.currentLicense ?? null categories = @@ -66,6 +67,8 @@ export const sectionApplicationFor = ( { nr: 'BE', validToCode: 9 }, ] : [] + + age = fakeData?.age } let options = [ @@ -91,9 +94,7 @@ export const sectionApplicationFor = ( subLabel: m.applicationForRenewalLicenseDescription.defaultMessage, value: B_FULL_RENEWAL_65, - disabled: - !currentLicense || - (fakeData && fakeData.age ? fakeData.age < 65 : age < 65), + disabled: !currentLicense || age < 65, }) } diff --git a/libs/application/templates/driving-license/src/lib/constants.ts b/libs/application/templates/driving-license/src/lib/constants.ts index 9bab845f6746..83312eee59ff 100644 --- a/libs/application/templates/driving-license/src/lib/constants.ts +++ b/libs/application/templates/driving-license/src/lib/constants.ts @@ -17,6 +17,20 @@ export enum Pickup { export const otherLicenseCategories = ['C', 'C1', 'CE', 'D', 'D1', 'DE'] export const codesRequiringHealthCertificate = ['400', '01.06'] +export const codesExtendedLicenseCategories = [ + 'C1', + 'C1E', + 'C', + 'CE', + 'D1', + 'D1E', + 'D', + 'DE', + 'Bfar', + 'Far', + 'FAR', +] +export const remarksCannotRenew65 = ['400', '450', '95'] export type DrivingLicenseApplicationFor = | typeof B_FULL diff --git a/libs/application/templates/driving-license/src/lib/messages.ts b/libs/application/templates/driving-license/src/lib/messages.ts index 41f59615efb6..6295467f82b8 100644 --- a/libs/application/templates/driving-license/src/lib/messages.ts +++ b/libs/application/templates/driving-license/src/lib/messages.ts @@ -974,4 +974,14 @@ export const requirementsMessages = defineMessages({ description: 'requirement unmet api returned false for an unspecified reason', }, + noExtendedDrivingLicenseTitle: { + id: 'dl.application:requirementunmet.noExtendedDrivingLicenseTitle', + defaultMessage: 'Ekki hægt að sækja um endurnýjun á 65+ ökuskírteini.', + description: 'requirement unmet 65 plus renewal', + }, + noExtendedDrivingLicenseDescription: { + id: 'dl.application:requirementunmet.noExtendedDrivingLicenseDescription#markdown', + defaultMessage: 'Ekki hægt að sækja um endurnýjun á 65+ ökuskírteini.', + description: 'requirement unmet 65 plus renewal', + }, }) diff --git a/libs/application/templates/driving-license/src/lib/types.ts b/libs/application/templates/driving-license/src/lib/types.ts index 92efcfc15176..9c5d92b9a323 100644 --- a/libs/application/templates/driving-license/src/lib/types.ts +++ b/libs/application/templates/driving-license/src/lib/types.ts @@ -11,6 +11,7 @@ export type ConditionFn = (answer: FormValue) => boolean export type DrivingLicenseCategory = { nr: string validToCode: number + issued?: string } export interface Remark { diff --git a/libs/clients/driving-license/src/lib/drivingLicenseApi.service.ts b/libs/clients/driving-license/src/lib/drivingLicenseApi.service.ts index b503dff8fef7..0f2d17f8df81 100644 --- a/libs/clients/driving-license/src/lib/drivingLicenseApi.service.ts +++ b/libs/clients/driving-license/src/lib/drivingLicenseApi.service.ts @@ -372,6 +372,23 @@ export class DrivingLicenseApi { } } + public async getCanApplyForRenewal65(params: { + token: string + }): Promise> { + const response = await this.v5.apiDrivinglicenseV5CanapplyforRenewal65Get({ + apiVersion: v5.DRIVING_LICENSE_API_VERSION_V5, + apiVersion2: v5.DRIVING_LICENSE_API_VERSION_V5, + jwttoken: params.token, + }) + + return { + result: !!response.result, + errorCode: response.errorCode + ? (response.errorCode as CanApplyErrorCodeBFull) + : undefined, + } + } + public async getCanApplyForCategoryTemporary(params: { token: string }): Promise> { diff --git a/libs/clients/driving-license/src/v5/clientConfig.json b/libs/clients/driving-license/src/v5/clientConfig.json index eb4a547bab5f..3bd7edd48d20 100644 --- a/libs/clients/driving-license/src/v5/clientConfig.json +++ b/libs/clients/driving-license/src/v5/clientConfig.json @@ -2,11 +2,8 @@ "openapi": "3.0.1", "info": { "title": "RLS driver licence Rest API", - "description": "RESTFul services for driver licences. Programmed in ASP.NET Core 3 API ", - "contact": { - "name": "TMD", - "email": "tmd@tmd.is" - }, + "description": "RESTFul services for driver licences. Programmed in .NET 8", + "contact": { "name": "TMD", "email": "tmd@tmd.is" }, "version": "5.0" }, "paths": { @@ -19,29 +16,21 @@ "name": "jwttoken", "in": "header", "description": "JWT token", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { @@ -56,7 +45,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -79,19 +68,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -108,34 +91,26 @@ "in": "path", "description": "RLS application id", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -158,19 +133,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -187,48 +156,36 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegSviptingaDto" - } + "items": { "$ref": "#/components/schemas/TegSviptingaDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegSviptingaDto" - } + "items": { "$ref": "#/components/schemas/TegSviptingaDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegSviptingaDto" - } + "items": { "$ref": "#/components/schemas/TegSviptingaDto" } } } } @@ -246,48 +203,36 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegundRettindaDto" - } + "items": { "$ref": "#/components/schemas/TegundRettindaDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegundRettindaDto" - } + "items": { "$ref": "#/components/schemas/TegundRettindaDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegundRettindaDto" - } + "items": { "$ref": "#/components/schemas/TegundRettindaDto" } } } } @@ -305,25 +250,19 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -364,48 +303,36 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/EmbaettiDto" - } + "items": { "$ref": "#/components/schemas/EmbaettiDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/EmbaettiDto" - } + "items": { "$ref": "#/components/schemas/EmbaettiDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/EmbaettiDto" - } + "items": { "$ref": "#/components/schemas/EmbaettiDto" } } } } @@ -422,52 +349,35 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } } @@ -483,52 +393,35 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } } @@ -544,58 +437,37 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, "application/json": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, - "text/json": { - "schema": { - "type": "string", - "format": "byte" - } - } + "text/json": { "schema": { "type": "string", "format": "byte" } } } }, - "204": { - "description": "No Content" - } + "204": { "description": "No Content" } } } }, @@ -608,58 +480,37 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, "application/json": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, - "text/json": { - "schema": { - "type": "string", - "format": "byte" - } - } + "text/json": { "schema": { "type": "string", "format": "byte" } } } }, - "204": { - "description": "No Content" - } + "204": { "description": "No Content" } } } }, @@ -673,34 +524,26 @@ "in": "path", "description": "Person social serial number", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -732,49 +575,35 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/DriverLicenseDto" - } + "schema": { "$ref": "#/components/schemas/DriverLicenseDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/DriverLicenseDto" - } + "schema": { "$ref": "#/components/schemas/DriverLicenseDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/DriverLicenseDto" - } + "schema": { "$ref": "#/components/schemas/DriverLicenseDto" } } } }, @@ -782,19 +611,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -810,52 +633,36 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { - "204": { - "description": "No Content" - }, + "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -872,42 +679,32 @@ "in": "path", "description": "Category to check for (B, C, and so on)", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -939,62 +736,43 @@ "in": "path", "description": "Category in license", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model of application", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostNewFinalLicense" - } + "schema": { "$ref": "#/components/schemas/PostNewFinalLicense" } } } }, "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } }, @@ -1002,19 +780,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -1030,38 +802,28 @@ "name": "jwttoken", "in": "header", "description": "JWT token", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model of application", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostNewCollaborative" - } + "schema": { "$ref": "#/components/schemas/PostNewCollaborative" } } } }, @@ -1070,22 +832,13 @@ "description": "Created", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } }, @@ -1093,19 +846,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -1121,49 +868,35 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/DeprivationDto" - } + "schema": { "$ref": "#/components/schemas/DeprivationDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/DeprivationDto" - } + "schema": { "$ref": "#/components/schemas/DeprivationDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/DeprivationDto" - } + "schema": { "$ref": "#/components/schemas/DeprivationDto" } } } } @@ -1180,29 +913,21 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model of application", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTemporaryLicense" - } + "schema": { "$ref": "#/components/schemas/PostTemporaryLicense" } } } }, @@ -1259,29 +984,21 @@ "name": "jwttoken", "in": "header", "description": "JWT token", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { @@ -1349,20 +1066,14 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { @@ -1377,7 +1088,7 @@ }, "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -1428,49 +1139,35 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/PenaltyPointsDto" - } + "schema": { "$ref": "#/components/schemas/PenaltyPointsDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/PenaltyPointsDto" - } + "schema": { "$ref": "#/components/schemas/PenaltyPointsDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/PenaltyPointsDto" - } + "schema": { "$ref": "#/components/schemas/PenaltyPointsDto" } } } } @@ -1485,34 +1182,26 @@ { "name": "jwttoken", "in": "header", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -1544,19 +1233,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -1572,52 +1255,35 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } } @@ -1634,34 +1300,26 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -1692,52 +1350,35 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } } @@ -1753,52 +1394,35 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } } @@ -1814,58 +1438,37 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, "application/json": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, - "text/json": { - "schema": { - "type": "string", - "format": "byte" - } - } + "text/json": { "schema": { "type": "string", "format": "byte" } } } }, - "204": { - "description": "No Content" - } + "204": { "description": "No Content" } } } }, @@ -1878,58 +1481,37 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, "application/json": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, - "text/json": { - "schema": { - "type": "string", - "format": "byte" - } - } + "text/json": { "schema": { "type": "string", "format": "byte" } } } }, - "204": { - "description": "No Content" - } + "204": { "description": "No Content" } } } }, @@ -1941,34 +1523,26 @@ { "name": "jwttoken", "in": "header", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -2000,20 +1574,14 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { @@ -2027,26 +1595,18 @@ } }, "responses": { - "204": { - "description": "No Content" - }, + "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -2060,34 +1620,26 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -2110,19 +1662,13 @@ "description": "Not Found", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -2139,48 +1685,36 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/InstructorDto" - } + "items": { "$ref": "#/components/schemas/InstructorDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/InstructorDto" - } + "items": { "$ref": "#/components/schemas/InstructorDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/InstructorDto" - } + "items": { "$ref": "#/components/schemas/InstructorDto" } } } } @@ -2199,49 +1733,35 @@ "in": "path", "description": "Driver license number", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/LicenseStatusDto" - } + "schema": { "$ref": "#/components/schemas/LicenseStatusDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseStatusDto" - } + "schema": { "$ref": "#/components/schemas/LicenseStatusDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/LicenseStatusDto" - } + "schema": { "$ref": "#/components/schemas/LicenseStatusDto" } } } } @@ -2258,67 +1778,48 @@ "in": "path", "description": "Category to check, optional, default B", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "drivinglicenseid", "in": "path", "description": "License id, optional, default persons newest license", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, { "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/CategoryValidDto" - } + "schema": { "$ref": "#/components/schemas/CategoryValidDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/CategoryValidDto" - } + "schema": { "$ref": "#/components/schemas/CategoryValidDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/CategoryValidDto" - } + "schema": { "$ref": "#/components/schemas/CategoryValidDto" } } } } @@ -2335,42 +1836,32 @@ "in": "path", "description": "License category", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -2401,59 +1892,43 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model with information about the practice permit", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostPracticePermit" - } + "schema": { "$ref": "#/components/schemas/PostPracticePermit" } } } }, "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } } } }, @@ -2461,19 +1936,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } } } } @@ -2489,78 +1958,106 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model with information about the practice permit", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostPracticePermit" - } + "schema": { "$ref": "#/components/schemas/PostPracticePermit" } } } }, "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } } } }, "400": { "description": "Bad Request", + "content": { + "text/plain": { + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } + }, + "application/json": { + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } + }, + "text/json": { + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } + } + } + } + } + } + }, + "/api/drivinglicense/v5/canapplyfor/renewal65": { + "get": { + "tags": ["Okuskirteini"], + "summary": "Check if person over 65 years old can apply for renewal of drivers license", + "parameters": [ + { + "name": "jwttoken", + "in": "header", + "description": "Token with person social security number", + "schema": { "type": "string" } + }, + { + "name": "api-version", + "in": "header", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + }, + { + "name": "api-version", + "in": "query", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + } + ], + "responses": { + "200": { + "description": "OK", "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/PracticePermitDto" + "$ref": "#/components/schemas/MayApplyForRenewal65" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/PracticePermitDto" + "$ref": "#/components/schemas/MayApplyForRenewal65" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PracticePermitDto" + "$ref": "#/components/schemas/MayApplyForRenewal65" } } } @@ -2577,59 +2074,43 @@ "name": "jwttoken", "in": "header", "description": "Token with person social security number", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model with information about the person", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostRenewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/PostRenewal65AndOver" } } } }, "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } } } }, @@ -2637,19 +2118,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } } } } @@ -2666,47 +2141,33 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -2747,47 +2208,33 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -2828,47 +2275,33 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -2909,47 +2342,33 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -2990,47 +2409,33 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -3071,47 +2476,33 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { @@ -3151,67 +2542,50 @@ "name": "jwttoken", "in": "header", "description": "jwt token", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "licenseid", "in": "path", "description": "License id", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { - "description": "Success", + "description": "OK", "content": { "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/MedferdDto" - } + "items": { "$ref": "#/components/schemas/MedferdDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/MedferdDto" - } + "items": { "$ref": "#/components/schemas/MedferdDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/MedferdDto" - } + "items": { "$ref": "#/components/schemas/MedferdDto" } } } } @@ -3220,19 +2594,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -3410,20 +2778,12 @@ "DriverLicenseDto": { "type": "object", "properties": { - "id": { - "type": "integer", - "description": "Id", - "format": "int32" - }, + "id": { "type": "integer", "description": "Id", "format": "int32" }, "temporaryLicense": { "type": "boolean", "description": "Is this license marked as temporary" }, - "name": { - "type": "string", - "description": "Name", - "nullable": true - }, + "name": { "type": "string", "description": "Name", "nullable": true }, "socialSecurityNumber": { "type": "string", "description": "Persond id number", @@ -3462,17 +2822,13 @@ }, "categories": { "type": "array", - "items": { - "$ref": "#/components/schemas/CategoryDto" - }, + "items": { "$ref": "#/components/schemas/CategoryDto" }, "description": "Category list", "nullable": true }, "comments": { "type": "array", - "items": { - "$ref": "#/components/schemas/LicenseCommentsDto" - }, + "items": { "$ref": "#/components/schemas/LicenseCommentsDto" }, "description": "Remark list", "nullable": true }, @@ -3488,15 +2844,9 @@ "format": "int32", "nullable": true }, - "photo": { - "$ref": "#/components/schemas/ImageDto" - }, - "signature": { - "$ref": "#/components/schemas/ImageDto" - }, - "deprivation": { - "$ref": "#/components/schemas/DeprivationDto" - } + "photo": { "$ref": "#/components/schemas/ImageDto" }, + "signature": { "$ref": "#/components/schemas/ImageDto" }, + "deprivation": { "$ref": "#/components/schemas/DeprivationDto" } }, "additionalProperties": false, "description": "Licence entity" @@ -3504,16 +2854,8 @@ "DriverLicenseWithoutImagesDto": { "type": "object", "properties": { - "id": { - "type": "integer", - "description": "Id", - "format": "int32" - }, - "name": { - "type": "string", - "description": "Name", - "nullable": true - }, + "id": { "type": "integer", "description": "Id", "format": "int32" }, + "name": { "type": "string", "description": "Name", "nullable": true }, "socialSecurityNumber": { "type": "string", "description": "Persond id number", @@ -3552,9 +2894,7 @@ }, "categories": { "type": "array", - "items": { - "$ref": "#/components/schemas/CategoryDto" - }, + "items": { "$ref": "#/components/schemas/CategoryDto" }, "description": "Category list", "nullable": true }, @@ -3565,15 +2905,11 @@ }, "comments": { "type": "array", - "items": { - "$ref": "#/components/schemas/LicenseCommentsDto" - }, + "items": { "$ref": "#/components/schemas/LicenseCommentsDto" }, "description": "Remark list", "nullable": true }, - "deprivation": { - "$ref": "#/components/schemas/DeprivationDto" - } + "deprivation": { "$ref": "#/components/schemas/DeprivationDto" } }, "additionalProperties": false, "description": "Licence entity" @@ -3886,9 +3222,7 @@ "properties": { "images": { "type": "array", - "items": { - "$ref": "#/components/schemas/ImageFromThjodskraDto" - }, + "items": { "$ref": "#/components/schemas/ImageFromThjodskraDto" }, "description": "Array of all images from thjodskra", "nullable": true } @@ -3904,11 +3238,7 @@ "description": "Public identity number", "nullable": true }, - "name": { - "type": "string", - "description": "Name", - "nullable": true - }, + "name": { "type": "string", "description": "Name", "nullable": true }, "driverLicenseId": { "type": "integer", "description": "Númer ökuskírteinis ökukennara", @@ -4009,6 +3339,22 @@ "additionalProperties": false, "description": "Data transfer object for results for person applying for\r\nfull license" }, + "MayApplyForRenewal65": { + "type": "object", + "properties": { + "result": { + "type": "boolean", + "description": "Can person apply for full license for 65+ years old" + }, + "errorCode": { + "type": "string", + "description": "Error code if can not apply", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Can person apply for renewal of license for 65+ years old" + }, "MayApplyForTemporaryLicenseDto": { "type": "object", "properties": { @@ -4150,6 +3496,14 @@ "type": "integer", "description": "Ordering district", "format": "int32" + }, + "contentList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RLSApplicationContentModel" + }, + "description": "Content list", + "nullable": true } }, "additionalProperties": false, @@ -4467,10 +3821,7 @@ "description": "The instructor", "nullable": true }, - "isOk": { - "type": "boolean", - "description": "Is the record OK" - }, + "isOk": { "type": "boolean", "description": "Is the record OK" }, "errorCode": { "type": "string", "description": "Error code, if any", @@ -4483,29 +3834,45 @@ "ProblemDetails": { "type": "object", "properties": { - "type": { + "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 } + }, + "additionalProperties": false + }, + "RLSApplicationContentModel": { + "type": "object", + "properties": { + "fileName": { "type": "string", + "description": "File name", "nullable": true }, - "title": { + "fileExtension": { "type": "string", + "description": "File extension", "nullable": true }, - "status": { - "type": "integer", - "format": "int32", + "contentType": { + "type": "string", + "description": "Content type", "nullable": true }, - "detail": { + "content": { "type": "string", + "description": "Content data", "nullable": true }, - "instance": { + "description": { "type": "string", + "description": "File description", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "RLS Application content" }, "Renewal65AndOver": { "type": "object", @@ -4532,16 +3899,8 @@ "TegSviptingaDto": { "type": "object", "properties": { - "id": { - "type": "integer", - "description": "Id", - "format": "int32" - }, - "heiti": { - "type": "string", - "description": "Name", - "nullable": true - } + "id": { "type": "integer", "description": "Id", "format": "int32" }, + "heiti": { "type": "string", "description": "Name", "nullable": true } }, "additionalProperties": false, "description": "Dto for Tegund sviptinga"