Skip to content

Commit

Permalink
major(cb2-9874): Introduce the AdditionalInformation object to IVA de…
Browse files Browse the repository at this point in the history
…fect JSON schema (#148)
  • Loading branch information
m-mullen authored Nov 28, 2023
1 parent 9ff6792 commit 9b4dfa2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 37 deletions.
23 changes: 11 additions & 12 deletions json-definitions/iva/defects/get/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
"sectionDescription": {
"type": ["string"]
},
"vehicleTypes": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "../../../v3/tech-record/enums/vehicleType.ignore.json"
}
]
}
},
"euVehicleCategories": {
"type": "array",
"items": {
Expand All @@ -45,8 +35,7 @@
"rsNumber",
"requiredStandard",
"refCalculation",
"additionalInfo",
"inspectionTypes"
"additionalInfo"
],
"properties": {
"rsNumber": {
Expand All @@ -73,6 +62,16 @@
}
}
}
},
"additionalInformation": {
"type": "object",
"additionalProperties" : false,
"required" : ["notes"],
"properties": {
"notes" : {
"type" : ["string"]
}
}
}
}
}
36 changes: 15 additions & 21 deletions json-schemas/iva/defects/get/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,6 @@
"string"
]
},
"vehicleTypes": {
"type": "array",
"items": {
"anyOf": [
{
"title": "Vehicle Type",
"type": "string",
"enum": [
"psv",
"trl",
"hgv",
"car",
"lgv",
"motorcycle"
]
}
]
}
},
"euVehicleCategories": {
"type": "array",
"items": {
Expand Down Expand Up @@ -99,8 +80,7 @@
"rsNumber",
"requiredStandard",
"refCalculation",
"additionalInfo",
"inspectionTypes"
"additionalInfo"
],
"properties": {
"rsNumber": {
Expand Down Expand Up @@ -140,6 +120,20 @@
}
}
}
},
"additionalInformation": {
"type": "object",
"additionalProperties": false,
"required": [
"notes"
],
"properties": {
"notes": {
"type": [
"string"
]
}
}
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dvsa/cvs-type-definitions",
"version": "3.7.0",
"version": "4.0.0",
"description": "type definitions for cvs vta and vtm applications",
"main": "index.js",
"repository": {
Expand Down
7 changes: 4 additions & 3 deletions types/iva/defects/get/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
* and run json-schema-to-typescript to regenerate this file.
*/

export type VehicleType = "psv" | "trl" | "hgv" | "car" | "lgv" | "motorcycle";
export type InspectionType = "basic" | "normal";

export interface DefectGETIVA {
sectionNumber: string;
sectionDescription: string;
vehicleTypes: VehicleType[];
euVehicleCategories: EUVehicleCategory[];
requiredStandards: {
rsNumber: number;
requiredStandard: string;
refCalculation: string;
additionalInfo: boolean;
inspectionTypes: InspectionType[];
inspectionTypes?: InspectionType[];
}[];
additionalInformation?: {
notes: string;
};
}

export enum EUVehicleCategory {
Expand Down

0 comments on commit 9b4dfa2

Please sign in to comment.