diff --git a/json-definitions/v1/test-result/index.json b/json-definitions/v1/test-result/index.json index b9ebf8db..ddb0ce52 100644 --- a/json-definitions/v1/test-result/index.json +++ b/json-definitions/v1/test-result/index.json @@ -166,10 +166,18 @@ ] }, "testTypes": { - "type": "array", - "items": { - "$ref": "../test-type/index.json#" - } + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "../test-type/index.json#" + } + }, + { + "type": "object", + "$ref": "../test-type/index.json#" + } + ] }, "reasonForCreation": { "type": "string", diff --git a/json-schemas/v1/test-result/index.json b/json-schemas/v1/test-result/index.json index d9bf7a22..007d8833 100644 --- a/json-schemas/v1/test-result/index.json +++ b/json-schemas/v1/test-result/index.json @@ -261,635 +261,1267 @@ ] }, "testTypes": { - "type": "array", - "items": { - "title": "Test Type Schema", - "type": "object", - "properties": { - "testTypeName": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string" - }, - "testTypeId": { - "type": "string" - }, - "certificateNumber": { - "type": [ - "string", - "null" - ] - }, - "secondaryCertificateNumber": { - "type": [ - "string", - "null" - ] - }, - "testTypeStartTimestamp": { - "type": [ - "string", - "null" - ] - }, - "testTypeEndTimestamp": { - "type": [ - "string", - "null" - ] - }, - "testResult": { - "anyOf": [ - { - "type:": "null" + "anyOf": [ + { + "type": "array", + "items": { + "title": "Test Type Schema", + "type": "object", + "properties": { + "testTypeName": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "testTypeId": { + "type": "string" + }, + "certificateNumber": { + "type": [ + "string", + "null" + ] + }, + "secondaryCertificateNumber": { + "type": [ + "string", + "null" + ] + }, + "testTypeStartTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testTypeEndTimestamp": { + "type": [ + "string", + "null" + ] }, - { - "title": "Test Results", - "type": "string", - "tsEnumNames": [ - "PASS", - "PRS", - "FAIL", - "ABANDONED" + "testResult": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Test Results", + "type": "string", + "tsEnumNames": [ + "PASS", + "PRS", + "FAIL", + "ABANDONED" + ], + "enum": [ + "pass", + "prs", + "fail", + "abandoned" + ] + } + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "reasonForAbandoning": { + "type": [ + "string", + "null" + ] + }, + "additionalNotesRecorded": { + "type": [ + "string", + "null" ], - "enum": [ - "pass", - "prs", - "fail", - "abandoned" + "maxLength": 500 + }, + "additionalCommentsForAbandon": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "numberOfSeatbeltsFitted": { + "type": [ + "integer", + "null" ] - } - ] - }, - "prohibitionIssued": { - "type": [ - "boolean", - "null" - ] - }, - "reasonForAbandoning": { - "type": [ - "string", - "null" - ] - }, - "additionalNotesRecorded": { - "type": [ - "string", - "null" - ], - "maxLength": 500 - }, - "additionalCommentsForAbandon": { - "type": [ - "string", - "null" - ], - "maxLength": 500 - }, - "numberOfSeatbeltsFitted": { - "type": [ - "integer", - "null" - ] - }, - "lastSeatbeltInstallationCheckDate": { - "type": [ - "string", - "null" - ] - }, - "seatbeltInstallationCheckDate": { - "type": [ - "boolean", - "null" - ] - }, - "testExpiryDate": { - "type": "string" - }, - "testAnniversaryDate": { - "type": [ - "string", - "null" - ] - }, - "modType": { - "anyOf": [ - { - "title": "Mod Type Schema", - "type": "object", - "properties": { - "code": { - "type": "string" + }, + "lastSeatbeltInstallationCheckDate": { + "type": [ + "string", + "null" + ] + }, + "seatbeltInstallationCheckDate": { + "type": [ + "boolean", + "null" + ] + }, + "testExpiryDate": { + "type": "string" + }, + "testAnniversaryDate": { + "type": [ + "string", + "null" + ] + }, + "modType": { + "anyOf": [ + { + "title": "Mod Type Schema", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "code", + "description" + ], + "additionalProperties": false }, - "description": { + { "type": "string" + }, + { + "type": "null" } - }, - "required": [ - "code", - "description" + ] + }, + "emissionStandard": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Emission Standards", + "type": "string", + "tsEnumNames": [ + "EURO3_PM", + "EURO4_PM", + "EURO3", + "EURO4", + "EURO5", + "EURO6", + "EUROV", + "EUROVI", + "FULL_ELECTRIC" + ], + "enum": [ + "0.10 g/kWh Euro 3 PM", + "0.03 g/kWh Euro IV PM'", + "Euro 3", + "Euro 4", + "Euro 5", + "Euro 6", + "Euro V", + "Euro VI", + "Full Electric" + ] + } + ] + }, + "fuelType": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Fuel Type", + "type": "string", + "tsEnumNames": [ + "DIESEL", + "GAS_CNG", + "GAS_LNG", + "GAS_LPG", + "PETROL", + "FUEL_CELL", + "FULL_ELECTRIC" + ], + "enum": [ + "diesel", + "gas-cng", + "gas-lng", + "gas-lpg", + "petrol", + "fuel cell", + "full electric" + ] + } + ] + }, + "modificationTypeUsed": { + "type": [ + "string", + "null" ], - "additionalProperties": false + "maxLength": 100 }, - { - "type": "string" + "smokeTestKLimitApplied": { + "type": [ + "string", + "null" + ], + "maxLength": 100 }, - { - "type": "null" - } - ] - }, - "emissionStandard": { - "anyOf": [ - { - "type:": "null" + "particulateTrapFitted": { + "type": [ + "string", + "null" + ], + "maxLength": 100 }, - { - "title": "Emission Standards", - "type": "string", - "tsEnumNames": [ - "EURO3_PM", - "EURO4_PM", - "EURO3", - "EURO4", - "EURO5", - "EURO6", - "EUROV", - "EUROVI", - "FULL_ELECTRIC" + "particulateTrapSerialNumber": { + "type": [ + "string", + "null" ], - "enum": [ - "0.10 g/kWh Euro 3 PM", - "0.03 g/kWh Euro IV PM'", - "Euro 3", - "Euro 4", - "Euro 5", - "Euro 6", - "Euro V", - "Euro VI", - "Full Electric" - ] - } - ] - }, - "fuelType": { - "anyOf": [ - { - "type:": "null" + "maxLength": 100 }, - { - "title": "Fuel Type", - "type": "string", - "tsEnumNames": [ - "DIESEL", - "GAS_CNG", - "GAS_LNG", - "GAS_LPG", - "PETROL", - "FUEL_CELL", - "FULL_ELECTRIC" + "defects": { + "type": [ + "array" ], - "enum": [ - "diesel", - "gas-cng", - "gas-lng", - "gas-lpg", - "petrol", - "fuel cell", - "full electric" - ] - } - ] - }, - "modificationTypeUsed": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "smokeTestKLimitApplied": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "particulateTrapFitted": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "particulateTrapSerialNumber": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "defects": { - "type": [ - "array" - ], - "items": { - "title": "Defect Details Schema", - "type": "object", - "properties": { - "imNumber": { - "type": "integer" - }, - "imDescription": { - "type": "string" - }, - "additionalInformation": { + "items": { + "title": "Defect Details Schema", + "type": "object", "properties": { - "location": { - "title": "Defect Location Schema", - "type": "object", + "imNumber": { + "type": "integer" + }, + "imDescription": { + "type": "string" + }, + "additionalInformation": { "properties": { - "vertical": { - "type": [ - "string", - "null" - ] - }, - "horizontal": { - "type": [ - "string", - "null" - ] - }, - "lateral": { - "type": [ - "string", - "null" - ] - }, - "longitudinal": { - "type": [ - "string", - "null" - ] - }, - "rowNumber": { - "type": [ - "integer", - "null" - ] - }, - "seatNumber": { - "type": [ - "integer", - "null" - ] + "location": { + "title": "Defect Location Schema", + "type": "object", + "properties": { + "vertical": { + "type": [ + "string", + "null" + ] + }, + "horizontal": { + "type": [ + "string", + "null" + ] + }, + "lateral": { + "type": [ + "string", + "null" + ] + }, + "longitudinal": { + "type": [ + "string", + "null" + ] + }, + "rowNumber": { + "type": [ + "integer", + "null" + ] + }, + "seatNumber": { + "type": [ + "integer", + "null" + ] + }, + "axleNumber": { + "type": [ + "integer", + "null" + ] + } + }, + "additionalProperties": false }, - "axleNumber": { - "type": [ - "integer", - "null" - ] + "notes": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + }, + "itemNumber": { + "type": "integer" }, - "notes": { + "itemDescription": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "location", - "notes" - ] - }, - "itemNumber": { - "type": "integer" - }, - "itemDescription": { - "type": "string" - }, - "deficiencyRef": { - "type": "string" - }, - "deficiencyId": { - "type": [ - "string", - "null" - ] - }, - "deficiencySubId": { - "type": [ - "string", - "null" - ] - }, - "deficiencyCategory": { - "type": "string" - }, - "deficiencyText": { - "type": [ - "string", - "null" - ] - }, - "stdForProhibition": { - "type": [ - "boolean", - "null" - ] - }, - "prs": { - "type": [ - "boolean", - "null" - ] - }, - "prohibitionIssued": { - "type": [ - "boolean", - "null" - ] - }, - "metadata": { - "title": "Defect Metadata Schema", - "type": "object", - "properties": { - "category": { + }, + "deficiencyRef": { + "type": "string" + }, + "deficiencyId": { + "type": [ + "string", + "null" + ] + }, + "deficiencySubId": { + "type": [ + "string", + "null" + ] + }, + "deficiencyCategory": { + "type": "string" + }, + "deficiencyText": { + "type": [ + "string", + "null" + ] + }, + "stdForProhibition": { + "type": [ + "boolean", + "null" + ] + }, + "prs": { + "type": [ + "boolean", + "null" + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "metadata": { + "title": "Defect Metadata Schema", + "type": "object", "properties": { - "additionalInfo": { - "title": "Defect Additional Details Metadata Schema", - "type": "object", + "category": { "properties": { - "location": { - "title": "Defect Location Metadata Schema", + "additionalInfo": { + "title": "Defect Additional Details Metadata Schema", "type": "object", "properties": { - "vertical": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "location": { + "title": "Defect Location Metadata Schema", + "type": "object", + "properties": { + "vertical": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "horizontal": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "horizontal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "lateral": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "lateral": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "longitudinal": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "longitudinal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "rowNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "number" - } + "rowNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "seatNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } + "seatNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" + "axleNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] } - ] + }, + "additionalProperties": false }, - "axleNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "null" - } - ] + "notes": { + "type": "boolean" } }, - "additionalProperties": false - }, - "notes": { - "type": "boolean" + "additionalProperties": false, + "required": [ + "location", + "notes" + ] } }, - "additionalProperties": false, - "required": [ - "location", - "notes" - ] + "additionalProperties": false } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "category" + ] } }, "additionalProperties": false, "required": [ - "category" + "imNumber", + "imDescription", + "additionalInformation", + "itemNumber", + "itemDescription", + "deficiencyRef", + "deficiencyId", + "deficiencySubId", + "deficiencyCategory", + "deficiencyText", + "stdForProhibition", + "prs", + "prohibitionIssued", + "metadata" ] } }, - "additionalProperties": false, - "required": [ - "imNumber", - "imDescription", - "additionalInformation", - "itemNumber", - "itemDescription", - "deficiencyRef", - "deficiencyId", - "deficiencySubId", - "deficiencyCategory", - "deficiencyText", - "stdForProhibition", - "prs", - "prohibitionIssued", - "metadata" - ] - } - }, - "customDefects": { - "type": [ - "array", - "null" + "customDefects": { + "type": [ + "array", + "null" + ], + "items": { + "title": "Specialist Custom Defects Schema", + "type": "object", + "properties": { + "referenceNumber": { + "type": "string" + }, + "defectName": { + "type": "string" + }, + "defectNotes": { + "type": "string" + }, + "hasAllMandatoryFields": { + "type": "boolean", + "description": "FE only" + } + }, + "additionalProperties": false, + "required": [ + "referenceNumber", + "defectName", + "defectNotes" + ] + } + }, + "requiredStandards": { + "type": [ + "array" + ], + "items": { + "title": "Specialist Custom Defects Schema Put", + "type": "object", + "properties": { + "sectionNumber": { + "type": "string" + }, + "sectionDescription": { + "type": "string" + }, + "additionalNotes": { + "type": [ + "string", + "null" + ] + }, + "rsNumber": { + "type": "integer" + }, + "requiredStandard": { + "type": "string" + }, + "refCalculation": { + "type": "string" + }, + "additionalInfo": { + "type": "boolean" + }, + "inspectionTypes": { + "type": "array", + "items": { + "anyOf": [ + { + "title": "Inspection Type", + "type": "string", + "enum": [ + "basic", + "normal" + ] + } + ] + } + }, + "prs": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "sectionNumber", + "sectionDescription", + "rsNumber", + "requiredStandard", + "refCalculation", + "additionalInfo", + "referenceNumber", + "prs" + ] + } + }, + "testNumber": { + "type": [ + "string", + "null" + ] + }, + "reapplicationDate": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "testTypeName", + "name", + "testTypeId", + "certificateNumber", + "secondaryCertificateNumber", + "testTypeStartTimestamp", + "testTypeEndTimestamp", + "testResult", + "prohibitionIssued", + "reasonForAbandoning", + "additionalNotesRecorded", + "additionalCommentsForAbandon", + "defects" ], - "items": { - "title": "Specialist Custom Defects Schema", - "type": "object", - "properties": { - "referenceNumber": { - "type": "string" + "additionalProperties": false + } + }, + { + "title": "Test Type Schema", + "type": "object", + "properties": { + "testTypeName": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "testTypeId": { + "type": "string" + }, + "certificateNumber": { + "type": [ + "string", + "null" + ] + }, + "secondaryCertificateNumber": { + "type": [ + "string", + "null" + ] + }, + "testTypeStartTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testTypeEndTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testResult": { + "anyOf": [ + { + "type:": "null" }, - "defectName": { - "type": "string" + { + "title": "Test Results", + "type": "string", + "tsEnumNames": [ + "PASS", + "PRS", + "FAIL", + "ABANDONED" + ], + "enum": [ + "pass", + "prs", + "fail", + "abandoned" + ] + } + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "reasonForAbandoning": { + "type": [ + "string", + "null" + ] + }, + "additionalNotesRecorded": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "additionalCommentsForAbandon": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "numberOfSeatbeltsFitted": { + "type": [ + "integer", + "null" + ] + }, + "lastSeatbeltInstallationCheckDate": { + "type": [ + "string", + "null" + ] + }, + "seatbeltInstallationCheckDate": { + "type": [ + "boolean", + "null" + ] + }, + "testExpiryDate": { + "type": "string" + }, + "testAnniversaryDate": { + "type": [ + "string", + "null" + ] + }, + "modType": { + "anyOf": [ + { + "title": "Mod Type Schema", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "code", + "description" + ], + "additionalProperties": false }, - "defectNotes": { + { "type": "string" }, - "hasAllMandatoryFields": { - "type": "boolean", - "description": "FE only" + { + "type": "null" } - }, - "additionalProperties": false, - "required": [ - "referenceNumber", - "defectName", - "defectNotes" ] - } - }, - "requiredStandards": { - "type": [ - "array" - ], - "items": { - "title": "Specialist Custom Defects Schema Put", - "type": "object", - "properties": { - "sectionNumber": { - "type": "string" - }, - "sectionDescription": { - "type": "string" + }, + "emissionStandard": { + "anyOf": [ + { + "type:": "null" }, - "additionalNotes": { - "type": [ - "string", - "null" + { + "title": "Emission Standards", + "type": "string", + "tsEnumNames": [ + "EURO3_PM", + "EURO4_PM", + "EURO3", + "EURO4", + "EURO5", + "EURO6", + "EUROV", + "EUROVI", + "FULL_ELECTRIC" + ], + "enum": [ + "0.10 g/kWh Euro 3 PM", + "0.03 g/kWh Euro IV PM'", + "Euro 3", + "Euro 4", + "Euro 5", + "Euro 6", + "Euro V", + "Euro VI", + "Full Electric" ] + } + ] + }, + "fuelType": { + "anyOf": [ + { + "type:": "null" }, - "rsNumber": { - "type": "integer" - }, - "requiredStandard": { - "type": "string" - }, - "refCalculation": { - "type": "string" + { + "title": "Fuel Type", + "type": "string", + "tsEnumNames": [ + "DIESEL", + "GAS_CNG", + "GAS_LNG", + "GAS_LPG", + "PETROL", + "FUEL_CELL", + "FULL_ELECTRIC" + ], + "enum": [ + "diesel", + "gas-cng", + "gas-lng", + "gas-lpg", + "petrol", + "fuel cell", + "full electric" + ] + } + ] + }, + "modificationTypeUsed": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "smokeTestKLimitApplied": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "particulateTrapFitted": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "particulateTrapSerialNumber": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "defects": { + "type": [ + "array" + ], + "items": { + "title": "Defect Details Schema", + "type": "object", + "properties": { + "imNumber": { + "type": "integer" + }, + "imDescription": { + "type": "string" + }, + "additionalInformation": { + "properties": { + "location": { + "title": "Defect Location Schema", + "type": "object", + "properties": { + "vertical": { + "type": [ + "string", + "null" + ] + }, + "horizontal": { + "type": [ + "string", + "null" + ] + }, + "lateral": { + "type": [ + "string", + "null" + ] + }, + "longitudinal": { + "type": [ + "string", + "null" + ] + }, + "rowNumber": { + "type": [ + "integer", + "null" + ] + }, + "seatNumber": { + "type": [ + "integer", + "null" + ] + }, + "axleNumber": { + "type": [ + "integer", + "null" + ] + } + }, + "additionalProperties": false + }, + "notes": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + }, + "itemNumber": { + "type": "integer" + }, + "itemDescription": { + "type": "string" + }, + "deficiencyRef": { + "type": "string" + }, + "deficiencyId": { + "type": [ + "string", + "null" + ] + }, + "deficiencySubId": { + "type": [ + "string", + "null" + ] + }, + "deficiencyCategory": { + "type": "string" + }, + "deficiencyText": { + "type": [ + "string", + "null" + ] + }, + "stdForProhibition": { + "type": [ + "boolean", + "null" + ] + }, + "prs": { + "type": [ + "boolean", + "null" + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "metadata": { + "title": "Defect Metadata Schema", + "type": "object", + "properties": { + "category": { + "properties": { + "additionalInfo": { + "title": "Defect Additional Details Metadata Schema", + "type": "object", + "properties": { + "location": { + "title": "Defect Location Metadata Schema", + "type": "object", + "properties": { + "vertical": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "horizontal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "lateral": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "longitudinal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "rowNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + }, + "seatNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ] + }, + "axleNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "notes": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "category" + ] + } }, - "additionalInfo": { - "type": "boolean" + "additionalProperties": false, + "required": [ + "imNumber", + "imDescription", + "additionalInformation", + "itemNumber", + "itemDescription", + "deficiencyRef", + "deficiencyId", + "deficiencySubId", + "deficiencyCategory", + "deficiencyText", + "stdForProhibition", + "prs", + "prohibitionIssued", + "metadata" + ] + } + }, + "customDefects": { + "type": [ + "array", + "null" + ], + "items": { + "title": "Specialist Custom Defects Schema", + "type": "object", + "properties": { + "referenceNumber": { + "type": "string" + }, + "defectName": { + "type": "string" + }, + "defectNotes": { + "type": "string" + }, + "hasAllMandatoryFields": { + "type": "boolean", + "description": "FE only" + } }, - "inspectionTypes": { - "type": "array", - "items": { - "anyOf": [ - { - "title": "Inspection Type", - "type": "string", - "enum": [ - "basic", - "normal" - ] - } + "additionalProperties": false, + "required": [ + "referenceNumber", + "defectName", + "defectNotes" + ] + } + }, + "requiredStandards": { + "type": [ + "array" + ], + "items": { + "title": "Specialist Custom Defects Schema Put", + "type": "object", + "properties": { + "sectionNumber": { + "type": "string" + }, + "sectionDescription": { + "type": "string" + }, + "additionalNotes": { + "type": [ + "string", + "null" ] + }, + "rsNumber": { + "type": "integer" + }, + "requiredStandard": { + "type": "string" + }, + "refCalculation": { + "type": "string" + }, + "additionalInfo": { + "type": "boolean" + }, + "inspectionTypes": { + "type": "array", + "items": { + "anyOf": [ + { + "title": "Inspection Type", + "type": "string", + "enum": [ + "basic", + "normal" + ] + } + ] + } + }, + "prs": { + "type": "boolean" } }, - "prs": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "sectionNumber", - "sectionDescription", - "rsNumber", - "requiredStandard", - "refCalculation", - "additionalInfo", - "referenceNumber", - "prs" + "additionalProperties": false, + "required": [ + "sectionNumber", + "sectionDescription", + "rsNumber", + "requiredStandard", + "refCalculation", + "additionalInfo", + "referenceNumber", + "prs" + ] + } + }, + "testNumber": { + "type": [ + "string", + "null" + ] + }, + "reapplicationDate": { + "type": [ + "string", + "null" ] } }, - "testNumber": { - "type": [ - "string", - "null" - ] - }, - "reapplicationDate": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "testTypeName", - "name", - "testTypeId", - "certificateNumber", - "secondaryCertificateNumber", - "testTypeStartTimestamp", - "testTypeEndTimestamp", - "testResult", - "prohibitionIssued", - "reasonForAbandoning", - "additionalNotesRecorded", - "additionalCommentsForAbandon", - "defects" - ], - "additionalProperties": false - } + "required": [ + "testTypeName", + "name", + "testTypeId", + "certificateNumber", + "secondaryCertificateNumber", + "testTypeStartTimestamp", + "testTypeEndTimestamp", + "testResult", + "prohibitionIssued", + "reasonForAbandoning", + "additionalNotesRecorded", + "additionalCommentsForAbandon", + "defects" + ], + "additionalProperties": false + } + ] }, "reasonForCreation": { "type": "string", diff --git a/json-schemas/v1/test/index.json b/json-schemas/v1/test/index.json index c1bea1df..dd56fa00 100644 --- a/json-schemas/v1/test/index.json +++ b/json-schemas/v1/test/index.json @@ -943,635 +943,1267 @@ ] }, "testTypes": { - "type": "array", - "items": { - "title": "Test Type Schema", - "type": "object", - "properties": { - "testTypeName": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string" - }, - "testTypeId": { - "type": "string" - }, - "certificateNumber": { - "type": [ - "string", - "null" - ] - }, - "secondaryCertificateNumber": { - "type": [ - "string", - "null" - ] - }, - "testTypeStartTimestamp": { - "type": [ - "string", - "null" - ] - }, - "testTypeEndTimestamp": { - "type": [ - "string", - "null" - ] - }, - "testResult": { - "anyOf": [ - { - "type:": "null" + "anyOf": [ + { + "type": "array", + "items": { + "title": "Test Type Schema", + "type": "object", + "properties": { + "testTypeName": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "testTypeId": { + "type": "string" + }, + "certificateNumber": { + "type": [ + "string", + "null" + ] + }, + "secondaryCertificateNumber": { + "type": [ + "string", + "null" + ] + }, + "testTypeStartTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testTypeEndTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testResult": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Test Results", + "type": "string", + "tsEnumNames": [ + "PASS", + "PRS", + "FAIL", + "ABANDONED" + ], + "enum": [ + "pass", + "prs", + "fail", + "abandoned" + ] + } + ] }, - { - "title": "Test Results", - "type": "string", - "tsEnumNames": [ - "PASS", - "PRS", - "FAIL", - "ABANDONED" + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "reasonForAbandoning": { + "type": [ + "string", + "null" + ] + }, + "additionalNotesRecorded": { + "type": [ + "string", + "null" ], - "enum": [ - "pass", - "prs", - "fail", - "abandoned" + "maxLength": 500 + }, + "additionalCommentsForAbandon": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "numberOfSeatbeltsFitted": { + "type": [ + "integer", + "null" ] - } - ] - }, - "prohibitionIssued": { - "type": [ - "boolean", - "null" - ] - }, - "reasonForAbandoning": { - "type": [ - "string", - "null" - ] - }, - "additionalNotesRecorded": { - "type": [ - "string", - "null" - ], - "maxLength": 500 - }, - "additionalCommentsForAbandon": { - "type": [ - "string", - "null" - ], - "maxLength": 500 - }, - "numberOfSeatbeltsFitted": { - "type": [ - "integer", - "null" - ] - }, - "lastSeatbeltInstallationCheckDate": { - "type": [ - "string", - "null" - ] - }, - "seatbeltInstallationCheckDate": { - "type": [ - "boolean", - "null" - ] - }, - "testExpiryDate": { - "type": "string" - }, - "testAnniversaryDate": { - "type": [ - "string", - "null" - ] - }, - "modType": { - "anyOf": [ - { - "title": "Mod Type Schema", - "type": "object", - "properties": { - "code": { - "type": "string" + }, + "lastSeatbeltInstallationCheckDate": { + "type": [ + "string", + "null" + ] + }, + "seatbeltInstallationCheckDate": { + "type": [ + "boolean", + "null" + ] + }, + "testExpiryDate": { + "type": "string" + }, + "testAnniversaryDate": { + "type": [ + "string", + "null" + ] + }, + "modType": { + "anyOf": [ + { + "title": "Mod Type Schema", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "code", + "description" + ], + "additionalProperties": false }, - "description": { + { "type": "string" + }, + { + "type": "null" } - }, - "required": [ - "code", - "description" + ] + }, + "emissionStandard": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Emission Standards", + "type": "string", + "tsEnumNames": [ + "EURO3_PM", + "EURO4_PM", + "EURO3", + "EURO4", + "EURO5", + "EURO6", + "EUROV", + "EUROVI", + "FULL_ELECTRIC" + ], + "enum": [ + "0.10 g/kWh Euro 3 PM", + "0.03 g/kWh Euro IV PM'", + "Euro 3", + "Euro 4", + "Euro 5", + "Euro 6", + "Euro V", + "Euro VI", + "Full Electric" + ] + } + ] + }, + "fuelType": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Fuel Type", + "type": "string", + "tsEnumNames": [ + "DIESEL", + "GAS_CNG", + "GAS_LNG", + "GAS_LPG", + "PETROL", + "FUEL_CELL", + "FULL_ELECTRIC" + ], + "enum": [ + "diesel", + "gas-cng", + "gas-lng", + "gas-lpg", + "petrol", + "fuel cell", + "full electric" + ] + } + ] + }, + "modificationTypeUsed": { + "type": [ + "string", + "null" ], - "additionalProperties": false + "maxLength": 100 }, - { - "type": "string" + "smokeTestKLimitApplied": { + "type": [ + "string", + "null" + ], + "maxLength": 100 }, - { - "type": "null" - } - ] - }, - "emissionStandard": { - "anyOf": [ - { - "type:": "null" + "particulateTrapFitted": { + "type": [ + "string", + "null" + ], + "maxLength": 100 }, - { - "title": "Emission Standards", - "type": "string", - "tsEnumNames": [ - "EURO3_PM", - "EURO4_PM", - "EURO3", - "EURO4", - "EURO5", - "EURO6", - "EUROV", - "EUROVI", - "FULL_ELECTRIC" + "particulateTrapSerialNumber": { + "type": [ + "string", + "null" ], - "enum": [ - "0.10 g/kWh Euro 3 PM", - "0.03 g/kWh Euro IV PM'", - "Euro 3", - "Euro 4", - "Euro 5", - "Euro 6", - "Euro V", - "Euro VI", - "Full Electric" - ] - } - ] - }, - "fuelType": { - "anyOf": [ - { - "type:": "null" + "maxLength": 100 }, - { - "title": "Fuel Type", - "type": "string", - "tsEnumNames": [ - "DIESEL", - "GAS_CNG", - "GAS_LNG", - "GAS_LPG", - "PETROL", - "FUEL_CELL", - "FULL_ELECTRIC" + "defects": { + "type": [ + "array" ], - "enum": [ - "diesel", - "gas-cng", - "gas-lng", - "gas-lpg", - "petrol", - "fuel cell", - "full electric" - ] - } - ] - }, - "modificationTypeUsed": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "smokeTestKLimitApplied": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "particulateTrapFitted": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "particulateTrapSerialNumber": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "defects": { - "type": [ - "array" - ], - "items": { - "title": "Defect Details Schema", - "type": "object", - "properties": { - "imNumber": { - "type": "integer" - }, - "imDescription": { - "type": "string" - }, - "additionalInformation": { + "items": { + "title": "Defect Details Schema", + "type": "object", "properties": { - "location": { - "title": "Defect Location Schema", - "type": "object", + "imNumber": { + "type": "integer" + }, + "imDescription": { + "type": "string" + }, + "additionalInformation": { "properties": { - "vertical": { - "type": [ - "string", - "null" - ] - }, - "horizontal": { - "type": [ - "string", - "null" - ] - }, - "lateral": { - "type": [ - "string", - "null" - ] - }, - "longitudinal": { - "type": [ - "string", - "null" - ] - }, - "rowNumber": { - "type": [ - "integer", - "null" - ] - }, - "seatNumber": { - "type": [ - "integer", - "null" - ] + "location": { + "title": "Defect Location Schema", + "type": "object", + "properties": { + "vertical": { + "type": [ + "string", + "null" + ] + }, + "horizontal": { + "type": [ + "string", + "null" + ] + }, + "lateral": { + "type": [ + "string", + "null" + ] + }, + "longitudinal": { + "type": [ + "string", + "null" + ] + }, + "rowNumber": { + "type": [ + "integer", + "null" + ] + }, + "seatNumber": { + "type": [ + "integer", + "null" + ] + }, + "axleNumber": { + "type": [ + "integer", + "null" + ] + } + }, + "additionalProperties": false }, - "axleNumber": { - "type": [ - "integer", - "null" - ] + "notes": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + }, + "itemNumber": { + "type": "integer" }, - "notes": { + "itemDescription": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "location", - "notes" - ] - }, - "itemNumber": { - "type": "integer" - }, - "itemDescription": { - "type": "string" - }, - "deficiencyRef": { - "type": "string" - }, - "deficiencyId": { - "type": [ - "string", - "null" - ] - }, - "deficiencySubId": { - "type": [ - "string", - "null" - ] - }, - "deficiencyCategory": { - "type": "string" - }, - "deficiencyText": { - "type": [ - "string", - "null" - ] - }, - "stdForProhibition": { - "type": [ - "boolean", - "null" - ] - }, - "prs": { - "type": [ - "boolean", - "null" - ] - }, - "prohibitionIssued": { - "type": [ - "boolean", - "null" - ] - }, - "metadata": { - "title": "Defect Metadata Schema", - "type": "object", - "properties": { - "category": { + }, + "deficiencyRef": { + "type": "string" + }, + "deficiencyId": { + "type": [ + "string", + "null" + ] + }, + "deficiencySubId": { + "type": [ + "string", + "null" + ] + }, + "deficiencyCategory": { + "type": "string" + }, + "deficiencyText": { + "type": [ + "string", + "null" + ] + }, + "stdForProhibition": { + "type": [ + "boolean", + "null" + ] + }, + "prs": { + "type": [ + "boolean", + "null" + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "metadata": { + "title": "Defect Metadata Schema", + "type": "object", "properties": { - "additionalInfo": { - "title": "Defect Additional Details Metadata Schema", - "type": "object", + "category": { "properties": { - "location": { - "title": "Defect Location Metadata Schema", + "additionalInfo": { + "title": "Defect Additional Details Metadata Schema", "type": "object", "properties": { - "vertical": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "location": { + "title": "Defect Location Metadata Schema", + "type": "object", + "properties": { + "vertical": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "horizontal": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "horizontal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "lateral": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "lateral": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "longitudinal": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "longitudinal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "rowNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "number" - } + "rowNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "seatNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } + "seatNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" + "axleNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] } - ] + }, + "additionalProperties": false }, - "axleNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "null" - } - ] + "notes": { + "type": "boolean" } }, - "additionalProperties": false - }, - "notes": { - "type": "boolean" + "additionalProperties": false, + "required": [ + "location", + "notes" + ] } }, - "additionalProperties": false, - "required": [ - "location", - "notes" - ] + "additionalProperties": false } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "category" + ] } }, "additionalProperties": false, "required": [ - "category" + "imNumber", + "imDescription", + "additionalInformation", + "itemNumber", + "itemDescription", + "deficiencyRef", + "deficiencyId", + "deficiencySubId", + "deficiencyCategory", + "deficiencyText", + "stdForProhibition", + "prs", + "prohibitionIssued", + "metadata" ] } }, - "additionalProperties": false, - "required": [ - "imNumber", - "imDescription", - "additionalInformation", - "itemNumber", - "itemDescription", - "deficiencyRef", - "deficiencyId", - "deficiencySubId", - "deficiencyCategory", - "deficiencyText", - "stdForProhibition", - "prs", - "prohibitionIssued", - "metadata" - ] - } - }, - "customDefects": { - "type": [ - "array", - "null" + "customDefects": { + "type": [ + "array", + "null" + ], + "items": { + "title": "Specialist Custom Defects Schema", + "type": "object", + "properties": { + "referenceNumber": { + "type": "string" + }, + "defectName": { + "type": "string" + }, + "defectNotes": { + "type": "string" + }, + "hasAllMandatoryFields": { + "type": "boolean", + "description": "FE only" + } + }, + "additionalProperties": false, + "required": [ + "referenceNumber", + "defectName", + "defectNotes" + ] + } + }, + "requiredStandards": { + "type": [ + "array" + ], + "items": { + "title": "Specialist Custom Defects Schema Put", + "type": "object", + "properties": { + "sectionNumber": { + "type": "string" + }, + "sectionDescription": { + "type": "string" + }, + "additionalNotes": { + "type": [ + "string", + "null" + ] + }, + "rsNumber": { + "type": "integer" + }, + "requiredStandard": { + "type": "string" + }, + "refCalculation": { + "type": "string" + }, + "additionalInfo": { + "type": "boolean" + }, + "inspectionTypes": { + "type": "array", + "items": { + "anyOf": [ + { + "title": "Inspection Type", + "type": "string", + "enum": [ + "basic", + "normal" + ] + } + ] + } + }, + "prs": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "sectionNumber", + "sectionDescription", + "rsNumber", + "requiredStandard", + "refCalculation", + "additionalInfo", + "referenceNumber", + "prs" + ] + } + }, + "testNumber": { + "type": [ + "string", + "null" + ] + }, + "reapplicationDate": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "testTypeName", + "name", + "testTypeId", + "certificateNumber", + "secondaryCertificateNumber", + "testTypeStartTimestamp", + "testTypeEndTimestamp", + "testResult", + "prohibitionIssued", + "reasonForAbandoning", + "additionalNotesRecorded", + "additionalCommentsForAbandon", + "defects" ], - "items": { - "title": "Specialist Custom Defects Schema", - "type": "object", - "properties": { - "referenceNumber": { - "type": "string" + "additionalProperties": false + } + }, + { + "title": "Test Type Schema", + "type": "object", + "properties": { + "testTypeName": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "testTypeId": { + "type": "string" + }, + "certificateNumber": { + "type": [ + "string", + "null" + ] + }, + "secondaryCertificateNumber": { + "type": [ + "string", + "null" + ] + }, + "testTypeStartTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testTypeEndTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testResult": { + "anyOf": [ + { + "type:": "null" }, - "defectName": { - "type": "string" + { + "title": "Test Results", + "type": "string", + "tsEnumNames": [ + "PASS", + "PRS", + "FAIL", + "ABANDONED" + ], + "enum": [ + "pass", + "prs", + "fail", + "abandoned" + ] + } + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "reasonForAbandoning": { + "type": [ + "string", + "null" + ] + }, + "additionalNotesRecorded": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "additionalCommentsForAbandon": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "numberOfSeatbeltsFitted": { + "type": [ + "integer", + "null" + ] + }, + "lastSeatbeltInstallationCheckDate": { + "type": [ + "string", + "null" + ] + }, + "seatbeltInstallationCheckDate": { + "type": [ + "boolean", + "null" + ] + }, + "testExpiryDate": { + "type": "string" + }, + "testAnniversaryDate": { + "type": [ + "string", + "null" + ] + }, + "modType": { + "anyOf": [ + { + "title": "Mod Type Schema", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "code", + "description" + ], + "additionalProperties": false }, - "defectNotes": { + { "type": "string" }, - "hasAllMandatoryFields": { - "type": "boolean", - "description": "FE only" + { + "type": "null" } - }, - "additionalProperties": false, - "required": [ - "referenceNumber", - "defectName", - "defectNotes" ] - } - }, - "requiredStandards": { - "type": [ - "array" - ], - "items": { - "title": "Specialist Custom Defects Schema Put", - "type": "object", - "properties": { - "sectionNumber": { - "type": "string" - }, - "sectionDescription": { - "type": "string" + }, + "emissionStandard": { + "anyOf": [ + { + "type:": "null" }, - "additionalNotes": { - "type": [ - "string", - "null" + { + "title": "Emission Standards", + "type": "string", + "tsEnumNames": [ + "EURO3_PM", + "EURO4_PM", + "EURO3", + "EURO4", + "EURO5", + "EURO6", + "EUROV", + "EUROVI", + "FULL_ELECTRIC" + ], + "enum": [ + "0.10 g/kWh Euro 3 PM", + "0.03 g/kWh Euro IV PM'", + "Euro 3", + "Euro 4", + "Euro 5", + "Euro 6", + "Euro V", + "Euro VI", + "Full Electric" ] + } + ] + }, + "fuelType": { + "anyOf": [ + { + "type:": "null" }, - "rsNumber": { - "type": "integer" - }, - "requiredStandard": { - "type": "string" - }, - "refCalculation": { - "type": "string" + { + "title": "Fuel Type", + "type": "string", + "tsEnumNames": [ + "DIESEL", + "GAS_CNG", + "GAS_LNG", + "GAS_LPG", + "PETROL", + "FUEL_CELL", + "FULL_ELECTRIC" + ], + "enum": [ + "diesel", + "gas-cng", + "gas-lng", + "gas-lpg", + "petrol", + "fuel cell", + "full electric" + ] + } + ] + }, + "modificationTypeUsed": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "smokeTestKLimitApplied": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "particulateTrapFitted": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "particulateTrapSerialNumber": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "defects": { + "type": [ + "array" + ], + "items": { + "title": "Defect Details Schema", + "type": "object", + "properties": { + "imNumber": { + "type": "integer" + }, + "imDescription": { + "type": "string" + }, + "additionalInformation": { + "properties": { + "location": { + "title": "Defect Location Schema", + "type": "object", + "properties": { + "vertical": { + "type": [ + "string", + "null" + ] + }, + "horizontal": { + "type": [ + "string", + "null" + ] + }, + "lateral": { + "type": [ + "string", + "null" + ] + }, + "longitudinal": { + "type": [ + "string", + "null" + ] + }, + "rowNumber": { + "type": [ + "integer", + "null" + ] + }, + "seatNumber": { + "type": [ + "integer", + "null" + ] + }, + "axleNumber": { + "type": [ + "integer", + "null" + ] + } + }, + "additionalProperties": false + }, + "notes": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + }, + "itemNumber": { + "type": "integer" + }, + "itemDescription": { + "type": "string" + }, + "deficiencyRef": { + "type": "string" + }, + "deficiencyId": { + "type": [ + "string", + "null" + ] + }, + "deficiencySubId": { + "type": [ + "string", + "null" + ] + }, + "deficiencyCategory": { + "type": "string" + }, + "deficiencyText": { + "type": [ + "string", + "null" + ] + }, + "stdForProhibition": { + "type": [ + "boolean", + "null" + ] + }, + "prs": { + "type": [ + "boolean", + "null" + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "metadata": { + "title": "Defect Metadata Schema", + "type": "object", + "properties": { + "category": { + "properties": { + "additionalInfo": { + "title": "Defect Additional Details Metadata Schema", + "type": "object", + "properties": { + "location": { + "title": "Defect Location Metadata Schema", + "type": "object", + "properties": { + "vertical": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "horizontal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "lateral": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "longitudinal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "rowNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + }, + "seatNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ] + }, + "axleNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "notes": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "category" + ] + } }, - "additionalInfo": { - "type": "boolean" + "additionalProperties": false, + "required": [ + "imNumber", + "imDescription", + "additionalInformation", + "itemNumber", + "itemDescription", + "deficiencyRef", + "deficiencyId", + "deficiencySubId", + "deficiencyCategory", + "deficiencyText", + "stdForProhibition", + "prs", + "prohibitionIssued", + "metadata" + ] + } + }, + "customDefects": { + "type": [ + "array", + "null" + ], + "items": { + "title": "Specialist Custom Defects Schema", + "type": "object", + "properties": { + "referenceNumber": { + "type": "string" + }, + "defectName": { + "type": "string" + }, + "defectNotes": { + "type": "string" + }, + "hasAllMandatoryFields": { + "type": "boolean", + "description": "FE only" + } }, - "inspectionTypes": { - "type": "array", - "items": { - "anyOf": [ - { - "title": "Inspection Type", - "type": "string", - "enum": [ - "basic", - "normal" - ] - } + "additionalProperties": false, + "required": [ + "referenceNumber", + "defectName", + "defectNotes" + ] + } + }, + "requiredStandards": { + "type": [ + "array" + ], + "items": { + "title": "Specialist Custom Defects Schema Put", + "type": "object", + "properties": { + "sectionNumber": { + "type": "string" + }, + "sectionDescription": { + "type": "string" + }, + "additionalNotes": { + "type": [ + "string", + "null" ] + }, + "rsNumber": { + "type": "integer" + }, + "requiredStandard": { + "type": "string" + }, + "refCalculation": { + "type": "string" + }, + "additionalInfo": { + "type": "boolean" + }, + "inspectionTypes": { + "type": "array", + "items": { + "anyOf": [ + { + "title": "Inspection Type", + "type": "string", + "enum": [ + "basic", + "normal" + ] + } + ] + } + }, + "prs": { + "type": "boolean" } }, - "prs": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "sectionNumber", - "sectionDescription", - "rsNumber", - "requiredStandard", - "refCalculation", - "additionalInfo", - "referenceNumber", - "prs" + "additionalProperties": false, + "required": [ + "sectionNumber", + "sectionDescription", + "rsNumber", + "requiredStandard", + "refCalculation", + "additionalInfo", + "referenceNumber", + "prs" + ] + } + }, + "testNumber": { + "type": [ + "string", + "null" + ] + }, + "reapplicationDate": { + "type": [ + "string", + "null" ] } }, - "testNumber": { - "type": [ - "string", - "null" - ] - }, - "reapplicationDate": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "testTypeName", - "name", - "testTypeId", - "certificateNumber", - "secondaryCertificateNumber", - "testTypeStartTimestamp", - "testTypeEndTimestamp", - "testResult", - "prohibitionIssued", - "reasonForAbandoning", - "additionalNotesRecorded", - "additionalCommentsForAbandon", - "defects" - ], - "additionalProperties": false - } + "required": [ + "testTypeName", + "name", + "testTypeId", + "certificateNumber", + "secondaryCertificateNumber", + "testTypeStartTimestamp", + "testTypeEndTimestamp", + "testResult", + "prohibitionIssued", + "reasonForAbandoning", + "additionalNotesRecorded", + "additionalCommentsForAbandon", + "defects" + ], + "additionalProperties": false + } + ] }, "reasonForCreation": { "type": "string", diff --git a/json-schemas/v1/vehicle/index.json b/json-schemas/v1/vehicle/index.json index 455968f9..1a131d6d 100644 --- a/json-schemas/v1/vehicle/index.json +++ b/json-schemas/v1/vehicle/index.json @@ -915,635 +915,1267 @@ ] }, "testTypes": { - "type": "array", - "items": { - "title": "Test Type Schema", - "type": "object", - "properties": { - "testTypeName": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string" - }, - "testTypeId": { - "type": "string" - }, - "certificateNumber": { - "type": [ - "string", - "null" - ] - }, - "secondaryCertificateNumber": { - "type": [ - "string", - "null" - ] - }, - "testTypeStartTimestamp": { - "type": [ - "string", - "null" - ] - }, - "testTypeEndTimestamp": { - "type": [ - "string", - "null" - ] - }, - "testResult": { - "anyOf": [ - { - "type:": "null" + "anyOf": [ + { + "type": "array", + "items": { + "title": "Test Type Schema", + "type": "object", + "properties": { + "testTypeName": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "testTypeId": { + "type": "string" + }, + "certificateNumber": { + "type": [ + "string", + "null" + ] + }, + "secondaryCertificateNumber": { + "type": [ + "string", + "null" + ] + }, + "testTypeStartTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testTypeEndTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testResult": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Test Results", + "type": "string", + "tsEnumNames": [ + "PASS", + "PRS", + "FAIL", + "ABANDONED" + ], + "enum": [ + "pass", + "prs", + "fail", + "abandoned" + ] + } + ] }, - { - "title": "Test Results", - "type": "string", - "tsEnumNames": [ - "PASS", - "PRS", - "FAIL", - "ABANDONED" + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "reasonForAbandoning": { + "type": [ + "string", + "null" + ] + }, + "additionalNotesRecorded": { + "type": [ + "string", + "null" ], - "enum": [ - "pass", - "prs", - "fail", - "abandoned" + "maxLength": 500 + }, + "additionalCommentsForAbandon": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "numberOfSeatbeltsFitted": { + "type": [ + "integer", + "null" ] - } - ] - }, - "prohibitionIssued": { - "type": [ - "boolean", - "null" - ] - }, - "reasonForAbandoning": { - "type": [ - "string", - "null" - ] - }, - "additionalNotesRecorded": { - "type": [ - "string", - "null" - ], - "maxLength": 500 - }, - "additionalCommentsForAbandon": { - "type": [ - "string", - "null" - ], - "maxLength": 500 - }, - "numberOfSeatbeltsFitted": { - "type": [ - "integer", - "null" - ] - }, - "lastSeatbeltInstallationCheckDate": { - "type": [ - "string", - "null" - ] - }, - "seatbeltInstallationCheckDate": { - "type": [ - "boolean", - "null" - ] - }, - "testExpiryDate": { - "type": "string" - }, - "testAnniversaryDate": { - "type": [ - "string", - "null" - ] - }, - "modType": { - "anyOf": [ - { - "title": "Mod Type Schema", - "type": "object", - "properties": { - "code": { - "type": "string" + }, + "lastSeatbeltInstallationCheckDate": { + "type": [ + "string", + "null" + ] + }, + "seatbeltInstallationCheckDate": { + "type": [ + "boolean", + "null" + ] + }, + "testExpiryDate": { + "type": "string" + }, + "testAnniversaryDate": { + "type": [ + "string", + "null" + ] + }, + "modType": { + "anyOf": [ + { + "title": "Mod Type Schema", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "code", + "description" + ], + "additionalProperties": false }, - "description": { + { "type": "string" + }, + { + "type": "null" } - }, - "required": [ - "code", - "description" + ] + }, + "emissionStandard": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Emission Standards", + "type": "string", + "tsEnumNames": [ + "EURO3_PM", + "EURO4_PM", + "EURO3", + "EURO4", + "EURO5", + "EURO6", + "EUROV", + "EUROVI", + "FULL_ELECTRIC" + ], + "enum": [ + "0.10 g/kWh Euro 3 PM", + "0.03 g/kWh Euro IV PM'", + "Euro 3", + "Euro 4", + "Euro 5", + "Euro 6", + "Euro V", + "Euro VI", + "Full Electric" + ] + } + ] + }, + "fuelType": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Fuel Type", + "type": "string", + "tsEnumNames": [ + "DIESEL", + "GAS_CNG", + "GAS_LNG", + "GAS_LPG", + "PETROL", + "FUEL_CELL", + "FULL_ELECTRIC" + ], + "enum": [ + "diesel", + "gas-cng", + "gas-lng", + "gas-lpg", + "petrol", + "fuel cell", + "full electric" + ] + } + ] + }, + "modificationTypeUsed": { + "type": [ + "string", + "null" ], - "additionalProperties": false + "maxLength": 100 }, - { - "type": "string" + "smokeTestKLimitApplied": { + "type": [ + "string", + "null" + ], + "maxLength": 100 }, - { - "type": "null" - } - ] - }, - "emissionStandard": { - "anyOf": [ - { - "type:": "null" + "particulateTrapFitted": { + "type": [ + "string", + "null" + ], + "maxLength": 100 }, - { - "title": "Emission Standards", - "type": "string", - "tsEnumNames": [ - "EURO3_PM", - "EURO4_PM", - "EURO3", - "EURO4", - "EURO5", - "EURO6", - "EUROV", - "EUROVI", - "FULL_ELECTRIC" + "particulateTrapSerialNumber": { + "type": [ + "string", + "null" ], - "enum": [ - "0.10 g/kWh Euro 3 PM", - "0.03 g/kWh Euro IV PM'", - "Euro 3", - "Euro 4", - "Euro 5", - "Euro 6", - "Euro V", - "Euro VI", - "Full Electric" - ] - } - ] - }, - "fuelType": { - "anyOf": [ - { - "type:": "null" + "maxLength": 100 }, - { - "title": "Fuel Type", - "type": "string", - "tsEnumNames": [ - "DIESEL", - "GAS_CNG", - "GAS_LNG", - "GAS_LPG", - "PETROL", - "FUEL_CELL", - "FULL_ELECTRIC" + "defects": { + "type": [ + "array" ], - "enum": [ - "diesel", - "gas-cng", - "gas-lng", - "gas-lpg", - "petrol", - "fuel cell", - "full electric" - ] - } - ] - }, - "modificationTypeUsed": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "smokeTestKLimitApplied": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "particulateTrapFitted": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "particulateTrapSerialNumber": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "defects": { - "type": [ - "array" - ], - "items": { - "title": "Defect Details Schema", - "type": "object", - "properties": { - "imNumber": { - "type": "integer" - }, - "imDescription": { - "type": "string" - }, - "additionalInformation": { + "items": { + "title": "Defect Details Schema", + "type": "object", "properties": { - "location": { - "title": "Defect Location Schema", - "type": "object", + "imNumber": { + "type": "integer" + }, + "imDescription": { + "type": "string" + }, + "additionalInformation": { "properties": { - "vertical": { - "type": [ - "string", - "null" - ] - }, - "horizontal": { - "type": [ - "string", - "null" - ] - }, - "lateral": { - "type": [ - "string", - "null" - ] - }, - "longitudinal": { - "type": [ - "string", - "null" - ] - }, - "rowNumber": { - "type": [ - "integer", - "null" - ] - }, - "seatNumber": { - "type": [ - "integer", - "null" - ] + "location": { + "title": "Defect Location Schema", + "type": "object", + "properties": { + "vertical": { + "type": [ + "string", + "null" + ] + }, + "horizontal": { + "type": [ + "string", + "null" + ] + }, + "lateral": { + "type": [ + "string", + "null" + ] + }, + "longitudinal": { + "type": [ + "string", + "null" + ] + }, + "rowNumber": { + "type": [ + "integer", + "null" + ] + }, + "seatNumber": { + "type": [ + "integer", + "null" + ] + }, + "axleNumber": { + "type": [ + "integer", + "null" + ] + } + }, + "additionalProperties": false }, - "axleNumber": { - "type": [ - "integer", - "null" - ] + "notes": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + }, + "itemNumber": { + "type": "integer" }, - "notes": { + "itemDescription": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "location", - "notes" - ] - }, - "itemNumber": { - "type": "integer" - }, - "itemDescription": { - "type": "string" - }, - "deficiencyRef": { - "type": "string" - }, - "deficiencyId": { - "type": [ - "string", - "null" - ] - }, - "deficiencySubId": { - "type": [ - "string", - "null" - ] - }, - "deficiencyCategory": { - "type": "string" - }, - "deficiencyText": { - "type": [ - "string", - "null" - ] - }, - "stdForProhibition": { - "type": [ - "boolean", - "null" - ] - }, - "prs": { - "type": [ - "boolean", - "null" - ] - }, - "prohibitionIssued": { - "type": [ - "boolean", - "null" - ] - }, - "metadata": { - "title": "Defect Metadata Schema", - "type": "object", - "properties": { - "category": { + }, + "deficiencyRef": { + "type": "string" + }, + "deficiencyId": { + "type": [ + "string", + "null" + ] + }, + "deficiencySubId": { + "type": [ + "string", + "null" + ] + }, + "deficiencyCategory": { + "type": "string" + }, + "deficiencyText": { + "type": [ + "string", + "null" + ] + }, + "stdForProhibition": { + "type": [ + "boolean", + "null" + ] + }, + "prs": { + "type": [ + "boolean", + "null" + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "metadata": { + "title": "Defect Metadata Schema", + "type": "object", "properties": { - "additionalInfo": { - "title": "Defect Additional Details Metadata Schema", - "type": "object", + "category": { "properties": { - "location": { - "title": "Defect Location Metadata Schema", + "additionalInfo": { + "title": "Defect Additional Details Metadata Schema", "type": "object", "properties": { - "vertical": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "location": { + "title": "Defect Location Metadata Schema", + "type": "object", + "properties": { + "vertical": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "horizontal": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "horizontal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "lateral": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "lateral": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "longitudinal": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "longitudinal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "rowNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "number" - } + "rowNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "seatNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } + "seatNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" + "axleNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] } - ] + }, + "additionalProperties": false }, - "axleNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "null" - } - ] + "notes": { + "type": "boolean" } }, - "additionalProperties": false - }, - "notes": { - "type": "boolean" + "additionalProperties": false, + "required": [ + "location", + "notes" + ] } }, - "additionalProperties": false, - "required": [ - "location", - "notes" - ] + "additionalProperties": false } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "category" + ] } }, "additionalProperties": false, "required": [ - "category" + "imNumber", + "imDescription", + "additionalInformation", + "itemNumber", + "itemDescription", + "deficiencyRef", + "deficiencyId", + "deficiencySubId", + "deficiencyCategory", + "deficiencyText", + "stdForProhibition", + "prs", + "prohibitionIssued", + "metadata" ] } }, - "additionalProperties": false, - "required": [ - "imNumber", - "imDescription", - "additionalInformation", - "itemNumber", - "itemDescription", - "deficiencyRef", - "deficiencyId", - "deficiencySubId", - "deficiencyCategory", - "deficiencyText", - "stdForProhibition", - "prs", - "prohibitionIssued", - "metadata" - ] - } - }, - "customDefects": { - "type": [ - "array", - "null" + "customDefects": { + "type": [ + "array", + "null" + ], + "items": { + "title": "Specialist Custom Defects Schema", + "type": "object", + "properties": { + "referenceNumber": { + "type": "string" + }, + "defectName": { + "type": "string" + }, + "defectNotes": { + "type": "string" + }, + "hasAllMandatoryFields": { + "type": "boolean", + "description": "FE only" + } + }, + "additionalProperties": false, + "required": [ + "referenceNumber", + "defectName", + "defectNotes" + ] + } + }, + "requiredStandards": { + "type": [ + "array" + ], + "items": { + "title": "Specialist Custom Defects Schema Put", + "type": "object", + "properties": { + "sectionNumber": { + "type": "string" + }, + "sectionDescription": { + "type": "string" + }, + "additionalNotes": { + "type": [ + "string", + "null" + ] + }, + "rsNumber": { + "type": "integer" + }, + "requiredStandard": { + "type": "string" + }, + "refCalculation": { + "type": "string" + }, + "additionalInfo": { + "type": "boolean" + }, + "inspectionTypes": { + "type": "array", + "items": { + "anyOf": [ + { + "title": "Inspection Type", + "type": "string", + "enum": [ + "basic", + "normal" + ] + } + ] + } + }, + "prs": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "sectionNumber", + "sectionDescription", + "rsNumber", + "requiredStandard", + "refCalculation", + "additionalInfo", + "referenceNumber", + "prs" + ] + } + }, + "testNumber": { + "type": [ + "string", + "null" + ] + }, + "reapplicationDate": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "testTypeName", + "name", + "testTypeId", + "certificateNumber", + "secondaryCertificateNumber", + "testTypeStartTimestamp", + "testTypeEndTimestamp", + "testResult", + "prohibitionIssued", + "reasonForAbandoning", + "additionalNotesRecorded", + "additionalCommentsForAbandon", + "defects" ], - "items": { - "title": "Specialist Custom Defects Schema", - "type": "object", - "properties": { - "referenceNumber": { - "type": "string" + "additionalProperties": false + } + }, + { + "title": "Test Type Schema", + "type": "object", + "properties": { + "testTypeName": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "testTypeId": { + "type": "string" + }, + "certificateNumber": { + "type": [ + "string", + "null" + ] + }, + "secondaryCertificateNumber": { + "type": [ + "string", + "null" + ] + }, + "testTypeStartTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testTypeEndTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testResult": { + "anyOf": [ + { + "type:": "null" }, - "defectName": { - "type": "string" + { + "title": "Test Results", + "type": "string", + "tsEnumNames": [ + "PASS", + "PRS", + "FAIL", + "ABANDONED" + ], + "enum": [ + "pass", + "prs", + "fail", + "abandoned" + ] + } + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "reasonForAbandoning": { + "type": [ + "string", + "null" + ] + }, + "additionalNotesRecorded": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "additionalCommentsForAbandon": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "numberOfSeatbeltsFitted": { + "type": [ + "integer", + "null" + ] + }, + "lastSeatbeltInstallationCheckDate": { + "type": [ + "string", + "null" + ] + }, + "seatbeltInstallationCheckDate": { + "type": [ + "boolean", + "null" + ] + }, + "testExpiryDate": { + "type": "string" + }, + "testAnniversaryDate": { + "type": [ + "string", + "null" + ] + }, + "modType": { + "anyOf": [ + { + "title": "Mod Type Schema", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "code", + "description" + ], + "additionalProperties": false }, - "defectNotes": { + { "type": "string" }, - "hasAllMandatoryFields": { - "type": "boolean", - "description": "FE only" + { + "type": "null" } - }, - "additionalProperties": false, - "required": [ - "referenceNumber", - "defectName", - "defectNotes" ] - } - }, - "requiredStandards": { - "type": [ - "array" - ], - "items": { - "title": "Specialist Custom Defects Schema Put", - "type": "object", - "properties": { - "sectionNumber": { - "type": "string" - }, - "sectionDescription": { - "type": "string" + }, + "emissionStandard": { + "anyOf": [ + { + "type:": "null" }, - "additionalNotes": { - "type": [ - "string", - "null" + { + "title": "Emission Standards", + "type": "string", + "tsEnumNames": [ + "EURO3_PM", + "EURO4_PM", + "EURO3", + "EURO4", + "EURO5", + "EURO6", + "EUROV", + "EUROVI", + "FULL_ELECTRIC" + ], + "enum": [ + "0.10 g/kWh Euro 3 PM", + "0.03 g/kWh Euro IV PM'", + "Euro 3", + "Euro 4", + "Euro 5", + "Euro 6", + "Euro V", + "Euro VI", + "Full Electric" ] + } + ] + }, + "fuelType": { + "anyOf": [ + { + "type:": "null" }, - "rsNumber": { - "type": "integer" - }, - "requiredStandard": { - "type": "string" - }, - "refCalculation": { - "type": "string" + { + "title": "Fuel Type", + "type": "string", + "tsEnumNames": [ + "DIESEL", + "GAS_CNG", + "GAS_LNG", + "GAS_LPG", + "PETROL", + "FUEL_CELL", + "FULL_ELECTRIC" + ], + "enum": [ + "diesel", + "gas-cng", + "gas-lng", + "gas-lpg", + "petrol", + "fuel cell", + "full electric" + ] + } + ] + }, + "modificationTypeUsed": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "smokeTestKLimitApplied": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "particulateTrapFitted": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "particulateTrapSerialNumber": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "defects": { + "type": [ + "array" + ], + "items": { + "title": "Defect Details Schema", + "type": "object", + "properties": { + "imNumber": { + "type": "integer" + }, + "imDescription": { + "type": "string" + }, + "additionalInformation": { + "properties": { + "location": { + "title": "Defect Location Schema", + "type": "object", + "properties": { + "vertical": { + "type": [ + "string", + "null" + ] + }, + "horizontal": { + "type": [ + "string", + "null" + ] + }, + "lateral": { + "type": [ + "string", + "null" + ] + }, + "longitudinal": { + "type": [ + "string", + "null" + ] + }, + "rowNumber": { + "type": [ + "integer", + "null" + ] + }, + "seatNumber": { + "type": [ + "integer", + "null" + ] + }, + "axleNumber": { + "type": [ + "integer", + "null" + ] + } + }, + "additionalProperties": false + }, + "notes": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + }, + "itemNumber": { + "type": "integer" + }, + "itemDescription": { + "type": "string" + }, + "deficiencyRef": { + "type": "string" + }, + "deficiencyId": { + "type": [ + "string", + "null" + ] + }, + "deficiencySubId": { + "type": [ + "string", + "null" + ] + }, + "deficiencyCategory": { + "type": "string" + }, + "deficiencyText": { + "type": [ + "string", + "null" + ] + }, + "stdForProhibition": { + "type": [ + "boolean", + "null" + ] + }, + "prs": { + "type": [ + "boolean", + "null" + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "metadata": { + "title": "Defect Metadata Schema", + "type": "object", + "properties": { + "category": { + "properties": { + "additionalInfo": { + "title": "Defect Additional Details Metadata Schema", + "type": "object", + "properties": { + "location": { + "title": "Defect Location Metadata Schema", + "type": "object", + "properties": { + "vertical": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "horizontal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "lateral": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "longitudinal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "rowNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + }, + "seatNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ] + }, + "axleNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "notes": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "category" + ] + } }, - "additionalInfo": { - "type": "boolean" + "additionalProperties": false, + "required": [ + "imNumber", + "imDescription", + "additionalInformation", + "itemNumber", + "itemDescription", + "deficiencyRef", + "deficiencyId", + "deficiencySubId", + "deficiencyCategory", + "deficiencyText", + "stdForProhibition", + "prs", + "prohibitionIssued", + "metadata" + ] + } + }, + "customDefects": { + "type": [ + "array", + "null" + ], + "items": { + "title": "Specialist Custom Defects Schema", + "type": "object", + "properties": { + "referenceNumber": { + "type": "string" + }, + "defectName": { + "type": "string" + }, + "defectNotes": { + "type": "string" + }, + "hasAllMandatoryFields": { + "type": "boolean", + "description": "FE only" + } }, - "inspectionTypes": { - "type": "array", - "items": { - "anyOf": [ - { - "title": "Inspection Type", - "type": "string", - "enum": [ - "basic", - "normal" - ] - } + "additionalProperties": false, + "required": [ + "referenceNumber", + "defectName", + "defectNotes" + ] + } + }, + "requiredStandards": { + "type": [ + "array" + ], + "items": { + "title": "Specialist Custom Defects Schema Put", + "type": "object", + "properties": { + "sectionNumber": { + "type": "string" + }, + "sectionDescription": { + "type": "string" + }, + "additionalNotes": { + "type": [ + "string", + "null" ] + }, + "rsNumber": { + "type": "integer" + }, + "requiredStandard": { + "type": "string" + }, + "refCalculation": { + "type": "string" + }, + "additionalInfo": { + "type": "boolean" + }, + "inspectionTypes": { + "type": "array", + "items": { + "anyOf": [ + { + "title": "Inspection Type", + "type": "string", + "enum": [ + "basic", + "normal" + ] + } + ] + } + }, + "prs": { + "type": "boolean" } }, - "prs": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "sectionNumber", - "sectionDescription", - "rsNumber", - "requiredStandard", - "refCalculation", - "additionalInfo", - "referenceNumber", - "prs" + "additionalProperties": false, + "required": [ + "sectionNumber", + "sectionDescription", + "rsNumber", + "requiredStandard", + "refCalculation", + "additionalInfo", + "referenceNumber", + "prs" + ] + } + }, + "testNumber": { + "type": [ + "string", + "null" + ] + }, + "reapplicationDate": { + "type": [ + "string", + "null" ] } }, - "testNumber": { - "type": [ - "string", - "null" - ] - }, - "reapplicationDate": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "testTypeName", - "name", - "testTypeId", - "certificateNumber", - "secondaryCertificateNumber", - "testTypeStartTimestamp", - "testTypeEndTimestamp", - "testResult", - "prohibitionIssued", - "reasonForAbandoning", - "additionalNotesRecorded", - "additionalCommentsForAbandon", - "defects" - ], - "additionalProperties": false - } + "required": [ + "testTypeName", + "name", + "testTypeId", + "certificateNumber", + "secondaryCertificateNumber", + "testTypeStartTimestamp", + "testTypeEndTimestamp", + "testResult", + "prohibitionIssued", + "reasonForAbandoning", + "additionalNotesRecorded", + "additionalCommentsForAbandon", + "defects" + ], + "additionalProperties": false + } + ] }, "reasonForCreation": { "type": "string", diff --git a/json-schemas/v1/visit/index.json b/json-schemas/v1/visit/index.json index 01995fd0..e224084a 100644 --- a/json-schemas/v1/visit/index.json +++ b/json-schemas/v1/visit/index.json @@ -976,635 +976,1267 @@ ] }, "testTypes": { - "type": "array", - "items": { - "title": "Test Type Schema", - "type": "object", - "properties": { - "testTypeName": { - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string" - }, - "testTypeId": { - "type": "string" - }, - "certificateNumber": { - "type": [ - "string", - "null" - ] - }, - "secondaryCertificateNumber": { - "type": [ - "string", - "null" - ] - }, - "testTypeStartTimestamp": { - "type": [ - "string", - "null" - ] - }, - "testTypeEndTimestamp": { - "type": [ - "string", - "null" - ] - }, - "testResult": { - "anyOf": [ - { - "type:": "null" + "anyOf": [ + { + "type": "array", + "items": { + "title": "Test Type Schema", + "type": "object", + "properties": { + "testTypeName": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "testTypeId": { + "type": "string" + }, + "certificateNumber": { + "type": [ + "string", + "null" + ] + }, + "secondaryCertificateNumber": { + "type": [ + "string", + "null" + ] + }, + "testTypeStartTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testTypeEndTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testResult": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Test Results", + "type": "string", + "tsEnumNames": [ + "PASS", + "PRS", + "FAIL", + "ABANDONED" + ], + "enum": [ + "pass", + "prs", + "fail", + "abandoned" + ] + } + ] }, - { - "title": "Test Results", - "type": "string", - "tsEnumNames": [ - "PASS", - "PRS", - "FAIL", - "ABANDONED" + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "reasonForAbandoning": { + "type": [ + "string", + "null" + ] + }, + "additionalNotesRecorded": { + "type": [ + "string", + "null" ], - "enum": [ - "pass", - "prs", - "fail", - "abandoned" + "maxLength": 500 + }, + "additionalCommentsForAbandon": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "numberOfSeatbeltsFitted": { + "type": [ + "integer", + "null" ] - } - ] - }, - "prohibitionIssued": { - "type": [ - "boolean", - "null" - ] - }, - "reasonForAbandoning": { - "type": [ - "string", - "null" - ] - }, - "additionalNotesRecorded": { - "type": [ - "string", - "null" - ], - "maxLength": 500 - }, - "additionalCommentsForAbandon": { - "type": [ - "string", - "null" - ], - "maxLength": 500 - }, - "numberOfSeatbeltsFitted": { - "type": [ - "integer", - "null" - ] - }, - "lastSeatbeltInstallationCheckDate": { - "type": [ - "string", - "null" - ] - }, - "seatbeltInstallationCheckDate": { - "type": [ - "boolean", - "null" - ] - }, - "testExpiryDate": { - "type": "string" - }, - "testAnniversaryDate": { - "type": [ - "string", - "null" - ] - }, - "modType": { - "anyOf": [ - { - "title": "Mod Type Schema", - "type": "object", - "properties": { - "code": { - "type": "string" + }, + "lastSeatbeltInstallationCheckDate": { + "type": [ + "string", + "null" + ] + }, + "seatbeltInstallationCheckDate": { + "type": [ + "boolean", + "null" + ] + }, + "testExpiryDate": { + "type": "string" + }, + "testAnniversaryDate": { + "type": [ + "string", + "null" + ] + }, + "modType": { + "anyOf": [ + { + "title": "Mod Type Schema", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "code", + "description" + ], + "additionalProperties": false }, - "description": { + { "type": "string" + }, + { + "type": "null" } - }, - "required": [ - "code", - "description" + ] + }, + "emissionStandard": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Emission Standards", + "type": "string", + "tsEnumNames": [ + "EURO3_PM", + "EURO4_PM", + "EURO3", + "EURO4", + "EURO5", + "EURO6", + "EUROV", + "EUROVI", + "FULL_ELECTRIC" + ], + "enum": [ + "0.10 g/kWh Euro 3 PM", + "0.03 g/kWh Euro IV PM'", + "Euro 3", + "Euro 4", + "Euro 5", + "Euro 6", + "Euro V", + "Euro VI", + "Full Electric" + ] + } + ] + }, + "fuelType": { + "anyOf": [ + { + "type:": "null" + }, + { + "title": "Fuel Type", + "type": "string", + "tsEnumNames": [ + "DIESEL", + "GAS_CNG", + "GAS_LNG", + "GAS_LPG", + "PETROL", + "FUEL_CELL", + "FULL_ELECTRIC" + ], + "enum": [ + "diesel", + "gas-cng", + "gas-lng", + "gas-lpg", + "petrol", + "fuel cell", + "full electric" + ] + } + ] + }, + "modificationTypeUsed": { + "type": [ + "string", + "null" ], - "additionalProperties": false + "maxLength": 100 }, - { - "type": "string" + "smokeTestKLimitApplied": { + "type": [ + "string", + "null" + ], + "maxLength": 100 }, - { - "type": "null" - } - ] - }, - "emissionStandard": { - "anyOf": [ - { - "type:": "null" + "particulateTrapFitted": { + "type": [ + "string", + "null" + ], + "maxLength": 100 }, - { - "title": "Emission Standards", - "type": "string", - "tsEnumNames": [ - "EURO3_PM", - "EURO4_PM", - "EURO3", - "EURO4", - "EURO5", - "EURO6", - "EUROV", - "EUROVI", - "FULL_ELECTRIC" + "particulateTrapSerialNumber": { + "type": [ + "string", + "null" ], - "enum": [ - "0.10 g/kWh Euro 3 PM", - "0.03 g/kWh Euro IV PM'", - "Euro 3", - "Euro 4", - "Euro 5", - "Euro 6", - "Euro V", - "Euro VI", - "Full Electric" - ] - } - ] - }, - "fuelType": { - "anyOf": [ - { - "type:": "null" + "maxLength": 100 }, - { - "title": "Fuel Type", - "type": "string", - "tsEnumNames": [ - "DIESEL", - "GAS_CNG", - "GAS_LNG", - "GAS_LPG", - "PETROL", - "FUEL_CELL", - "FULL_ELECTRIC" + "defects": { + "type": [ + "array" ], - "enum": [ - "diesel", - "gas-cng", - "gas-lng", - "gas-lpg", - "petrol", - "fuel cell", - "full electric" - ] - } - ] - }, - "modificationTypeUsed": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "smokeTestKLimitApplied": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "particulateTrapFitted": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "particulateTrapSerialNumber": { - "type": [ - "string", - "null" - ], - "maxLength": 100 - }, - "defects": { - "type": [ - "array" - ], - "items": { - "title": "Defect Details Schema", - "type": "object", - "properties": { - "imNumber": { - "type": "integer" - }, - "imDescription": { - "type": "string" - }, - "additionalInformation": { + "items": { + "title": "Defect Details Schema", + "type": "object", "properties": { - "location": { - "title": "Defect Location Schema", - "type": "object", + "imNumber": { + "type": "integer" + }, + "imDescription": { + "type": "string" + }, + "additionalInformation": { "properties": { - "vertical": { - "type": [ - "string", - "null" - ] - }, - "horizontal": { - "type": [ - "string", - "null" - ] - }, - "lateral": { - "type": [ - "string", - "null" - ] - }, - "longitudinal": { - "type": [ - "string", - "null" - ] - }, - "rowNumber": { - "type": [ - "integer", - "null" - ] - }, - "seatNumber": { - "type": [ - "integer", - "null" - ] + "location": { + "title": "Defect Location Schema", + "type": "object", + "properties": { + "vertical": { + "type": [ + "string", + "null" + ] + }, + "horizontal": { + "type": [ + "string", + "null" + ] + }, + "lateral": { + "type": [ + "string", + "null" + ] + }, + "longitudinal": { + "type": [ + "string", + "null" + ] + }, + "rowNumber": { + "type": [ + "integer", + "null" + ] + }, + "seatNumber": { + "type": [ + "integer", + "null" + ] + }, + "axleNumber": { + "type": [ + "integer", + "null" + ] + } + }, + "additionalProperties": false }, - "axleNumber": { - "type": [ - "integer", - "null" - ] + "notes": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + }, + "itemNumber": { + "type": "integer" }, - "notes": { + "itemDescription": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "location", - "notes" - ] - }, - "itemNumber": { - "type": "integer" - }, - "itemDescription": { - "type": "string" - }, - "deficiencyRef": { - "type": "string" - }, - "deficiencyId": { - "type": [ - "string", - "null" - ] - }, - "deficiencySubId": { - "type": [ - "string", - "null" - ] - }, - "deficiencyCategory": { - "type": "string" - }, - "deficiencyText": { - "type": [ - "string", - "null" - ] - }, - "stdForProhibition": { - "type": [ - "boolean", - "null" - ] - }, - "prs": { - "type": [ - "boolean", - "null" - ] - }, - "prohibitionIssued": { - "type": [ - "boolean", - "null" - ] - }, - "metadata": { - "title": "Defect Metadata Schema", - "type": "object", - "properties": { - "category": { + }, + "deficiencyRef": { + "type": "string" + }, + "deficiencyId": { + "type": [ + "string", + "null" + ] + }, + "deficiencySubId": { + "type": [ + "string", + "null" + ] + }, + "deficiencyCategory": { + "type": "string" + }, + "deficiencyText": { + "type": [ + "string", + "null" + ] + }, + "stdForProhibition": { + "type": [ + "boolean", + "null" + ] + }, + "prs": { + "type": [ + "boolean", + "null" + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "metadata": { + "title": "Defect Metadata Schema", + "type": "object", "properties": { - "additionalInfo": { - "title": "Defect Additional Details Metadata Schema", - "type": "object", + "category": { "properties": { - "location": { - "title": "Defect Location Metadata Schema", + "additionalInfo": { + "title": "Defect Additional Details Metadata Schema", "type": "object", "properties": { - "vertical": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "location": { + "title": "Defect Location Metadata Schema", + "type": "object", + "properties": { + "vertical": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "horizontal": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "horizontal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "lateral": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "lateral": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "longitudinal": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } + "longitudinal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "rowNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "number" - } + "rowNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" - } - ] - }, - "seatNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } + "seatNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ] }, - { - "type": "null" + "axleNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] } - ] + }, + "additionalProperties": false }, - "axleNumber": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "null" - } - ] + "notes": { + "type": "boolean" } }, - "additionalProperties": false - }, - "notes": { - "type": "boolean" + "additionalProperties": false, + "required": [ + "location", + "notes" + ] } }, - "additionalProperties": false, - "required": [ - "location", - "notes" - ] + "additionalProperties": false } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "category" + ] } }, "additionalProperties": false, "required": [ - "category" + "imNumber", + "imDescription", + "additionalInformation", + "itemNumber", + "itemDescription", + "deficiencyRef", + "deficiencyId", + "deficiencySubId", + "deficiencyCategory", + "deficiencyText", + "stdForProhibition", + "prs", + "prohibitionIssued", + "metadata" ] } }, - "additionalProperties": false, - "required": [ - "imNumber", - "imDescription", - "additionalInformation", - "itemNumber", - "itemDescription", - "deficiencyRef", - "deficiencyId", - "deficiencySubId", - "deficiencyCategory", - "deficiencyText", - "stdForProhibition", - "prs", - "prohibitionIssued", - "metadata" - ] - } - }, - "customDefects": { - "type": [ - "array", - "null" + "customDefects": { + "type": [ + "array", + "null" + ], + "items": { + "title": "Specialist Custom Defects Schema", + "type": "object", + "properties": { + "referenceNumber": { + "type": "string" + }, + "defectName": { + "type": "string" + }, + "defectNotes": { + "type": "string" + }, + "hasAllMandatoryFields": { + "type": "boolean", + "description": "FE only" + } + }, + "additionalProperties": false, + "required": [ + "referenceNumber", + "defectName", + "defectNotes" + ] + } + }, + "requiredStandards": { + "type": [ + "array" + ], + "items": { + "title": "Specialist Custom Defects Schema Put", + "type": "object", + "properties": { + "sectionNumber": { + "type": "string" + }, + "sectionDescription": { + "type": "string" + }, + "additionalNotes": { + "type": [ + "string", + "null" + ] + }, + "rsNumber": { + "type": "integer" + }, + "requiredStandard": { + "type": "string" + }, + "refCalculation": { + "type": "string" + }, + "additionalInfo": { + "type": "boolean" + }, + "inspectionTypes": { + "type": "array", + "items": { + "anyOf": [ + { + "title": "Inspection Type", + "type": "string", + "enum": [ + "basic", + "normal" + ] + } + ] + } + }, + "prs": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "sectionNumber", + "sectionDescription", + "rsNumber", + "requiredStandard", + "refCalculation", + "additionalInfo", + "referenceNumber", + "prs" + ] + } + }, + "testNumber": { + "type": [ + "string", + "null" + ] + }, + "reapplicationDate": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "testTypeName", + "name", + "testTypeId", + "certificateNumber", + "secondaryCertificateNumber", + "testTypeStartTimestamp", + "testTypeEndTimestamp", + "testResult", + "prohibitionIssued", + "reasonForAbandoning", + "additionalNotesRecorded", + "additionalCommentsForAbandon", + "defects" ], - "items": { - "title": "Specialist Custom Defects Schema", - "type": "object", - "properties": { - "referenceNumber": { - "type": "string" + "additionalProperties": false + } + }, + { + "title": "Test Type Schema", + "type": "object", + "properties": { + "testTypeName": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "testTypeId": { + "type": "string" + }, + "certificateNumber": { + "type": [ + "string", + "null" + ] + }, + "secondaryCertificateNumber": { + "type": [ + "string", + "null" + ] + }, + "testTypeStartTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testTypeEndTimestamp": { + "type": [ + "string", + "null" + ] + }, + "testResult": { + "anyOf": [ + { + "type:": "null" }, - "defectName": { - "type": "string" + { + "title": "Test Results", + "type": "string", + "tsEnumNames": [ + "PASS", + "PRS", + "FAIL", + "ABANDONED" + ], + "enum": [ + "pass", + "prs", + "fail", + "abandoned" + ] + } + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "reasonForAbandoning": { + "type": [ + "string", + "null" + ] + }, + "additionalNotesRecorded": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "additionalCommentsForAbandon": { + "type": [ + "string", + "null" + ], + "maxLength": 500 + }, + "numberOfSeatbeltsFitted": { + "type": [ + "integer", + "null" + ] + }, + "lastSeatbeltInstallationCheckDate": { + "type": [ + "string", + "null" + ] + }, + "seatbeltInstallationCheckDate": { + "type": [ + "boolean", + "null" + ] + }, + "testExpiryDate": { + "type": "string" + }, + "testAnniversaryDate": { + "type": [ + "string", + "null" + ] + }, + "modType": { + "anyOf": [ + { + "title": "Mod Type Schema", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "code", + "description" + ], + "additionalProperties": false }, - "defectNotes": { + { "type": "string" }, - "hasAllMandatoryFields": { - "type": "boolean", - "description": "FE only" + { + "type": "null" } - }, - "additionalProperties": false, - "required": [ - "referenceNumber", - "defectName", - "defectNotes" ] - } - }, - "requiredStandards": { - "type": [ - "array" - ], - "items": { - "title": "Specialist Custom Defects Schema Put", - "type": "object", - "properties": { - "sectionNumber": { - "type": "string" - }, - "sectionDescription": { - "type": "string" + }, + "emissionStandard": { + "anyOf": [ + { + "type:": "null" }, - "additionalNotes": { - "type": [ - "string", - "null" + { + "title": "Emission Standards", + "type": "string", + "tsEnumNames": [ + "EURO3_PM", + "EURO4_PM", + "EURO3", + "EURO4", + "EURO5", + "EURO6", + "EUROV", + "EUROVI", + "FULL_ELECTRIC" + ], + "enum": [ + "0.10 g/kWh Euro 3 PM", + "0.03 g/kWh Euro IV PM'", + "Euro 3", + "Euro 4", + "Euro 5", + "Euro 6", + "Euro V", + "Euro VI", + "Full Electric" ] + } + ] + }, + "fuelType": { + "anyOf": [ + { + "type:": "null" }, - "rsNumber": { - "type": "integer" - }, - "requiredStandard": { - "type": "string" - }, - "refCalculation": { - "type": "string" + { + "title": "Fuel Type", + "type": "string", + "tsEnumNames": [ + "DIESEL", + "GAS_CNG", + "GAS_LNG", + "GAS_LPG", + "PETROL", + "FUEL_CELL", + "FULL_ELECTRIC" + ], + "enum": [ + "diesel", + "gas-cng", + "gas-lng", + "gas-lpg", + "petrol", + "fuel cell", + "full electric" + ] + } + ] + }, + "modificationTypeUsed": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "smokeTestKLimitApplied": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "particulateTrapFitted": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "particulateTrapSerialNumber": { + "type": [ + "string", + "null" + ], + "maxLength": 100 + }, + "defects": { + "type": [ + "array" + ], + "items": { + "title": "Defect Details Schema", + "type": "object", + "properties": { + "imNumber": { + "type": "integer" + }, + "imDescription": { + "type": "string" + }, + "additionalInformation": { + "properties": { + "location": { + "title": "Defect Location Schema", + "type": "object", + "properties": { + "vertical": { + "type": [ + "string", + "null" + ] + }, + "horizontal": { + "type": [ + "string", + "null" + ] + }, + "lateral": { + "type": [ + "string", + "null" + ] + }, + "longitudinal": { + "type": [ + "string", + "null" + ] + }, + "rowNumber": { + "type": [ + "integer", + "null" + ] + }, + "seatNumber": { + "type": [ + "integer", + "null" + ] + }, + "axleNumber": { + "type": [ + "integer", + "null" + ] + } + }, + "additionalProperties": false + }, + "notes": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + }, + "itemNumber": { + "type": "integer" + }, + "itemDescription": { + "type": "string" + }, + "deficiencyRef": { + "type": "string" + }, + "deficiencyId": { + "type": [ + "string", + "null" + ] + }, + "deficiencySubId": { + "type": [ + "string", + "null" + ] + }, + "deficiencyCategory": { + "type": "string" + }, + "deficiencyText": { + "type": [ + "string", + "null" + ] + }, + "stdForProhibition": { + "type": [ + "boolean", + "null" + ] + }, + "prs": { + "type": [ + "boolean", + "null" + ] + }, + "prohibitionIssued": { + "type": [ + "boolean", + "null" + ] + }, + "metadata": { + "title": "Defect Metadata Schema", + "type": "object", + "properties": { + "category": { + "properties": { + "additionalInfo": { + "title": "Defect Additional Details Metadata Schema", + "type": "object", + "properties": { + "location": { + "title": "Defect Location Metadata Schema", + "type": "object", + "properties": { + "vertical": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "horizontal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "lateral": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "longitudinal": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "rowNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + }, + "seatNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "null" + } + ] + }, + "axleNumber": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "notes": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "location", + "notes" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "category" + ] + } }, - "additionalInfo": { - "type": "boolean" + "additionalProperties": false, + "required": [ + "imNumber", + "imDescription", + "additionalInformation", + "itemNumber", + "itemDescription", + "deficiencyRef", + "deficiencyId", + "deficiencySubId", + "deficiencyCategory", + "deficiencyText", + "stdForProhibition", + "prs", + "prohibitionIssued", + "metadata" + ] + } + }, + "customDefects": { + "type": [ + "array", + "null" + ], + "items": { + "title": "Specialist Custom Defects Schema", + "type": "object", + "properties": { + "referenceNumber": { + "type": "string" + }, + "defectName": { + "type": "string" + }, + "defectNotes": { + "type": "string" + }, + "hasAllMandatoryFields": { + "type": "boolean", + "description": "FE only" + } }, - "inspectionTypes": { - "type": "array", - "items": { - "anyOf": [ - { - "title": "Inspection Type", - "type": "string", - "enum": [ - "basic", - "normal" - ] - } + "additionalProperties": false, + "required": [ + "referenceNumber", + "defectName", + "defectNotes" + ] + } + }, + "requiredStandards": { + "type": [ + "array" + ], + "items": { + "title": "Specialist Custom Defects Schema Put", + "type": "object", + "properties": { + "sectionNumber": { + "type": "string" + }, + "sectionDescription": { + "type": "string" + }, + "additionalNotes": { + "type": [ + "string", + "null" ] + }, + "rsNumber": { + "type": "integer" + }, + "requiredStandard": { + "type": "string" + }, + "refCalculation": { + "type": "string" + }, + "additionalInfo": { + "type": "boolean" + }, + "inspectionTypes": { + "type": "array", + "items": { + "anyOf": [ + { + "title": "Inspection Type", + "type": "string", + "enum": [ + "basic", + "normal" + ] + } + ] + } + }, + "prs": { + "type": "boolean" } }, - "prs": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "sectionNumber", - "sectionDescription", - "rsNumber", - "requiredStandard", - "refCalculation", - "additionalInfo", - "referenceNumber", - "prs" + "additionalProperties": false, + "required": [ + "sectionNumber", + "sectionDescription", + "rsNumber", + "requiredStandard", + "refCalculation", + "additionalInfo", + "referenceNumber", + "prs" + ] + } + }, + "testNumber": { + "type": [ + "string", + "null" + ] + }, + "reapplicationDate": { + "type": [ + "string", + "null" ] } }, - "testNumber": { - "type": [ - "string", - "null" - ] - }, - "reapplicationDate": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "testTypeName", - "name", - "testTypeId", - "certificateNumber", - "secondaryCertificateNumber", - "testTypeStartTimestamp", - "testTypeEndTimestamp", - "testResult", - "prohibitionIssued", - "reasonForAbandoning", - "additionalNotesRecorded", - "additionalCommentsForAbandon", - "defects" - ], - "additionalProperties": false - } + "required": [ + "testTypeName", + "name", + "testTypeId", + "certificateNumber", + "secondaryCertificateNumber", + "testTypeStartTimestamp", + "testTypeEndTimestamp", + "testResult", + "prohibitionIssued", + "reasonForAbandoning", + "additionalNotesRecorded", + "additionalCommentsForAbandon", + "defects" + ], + "additionalProperties": false + } + ] }, "reasonForCreation": { "type": "string", diff --git a/types/v1/test-result/index.d.ts b/types/v1/test-result/index.d.ts index bd02a208..b60db8a4 100644 --- a/types/v1/test-result/index.d.ts +++ b/types/v1/test-result/index.d.ts @@ -40,7 +40,7 @@ export interface TestResultSchema { numberOfSeats?: number; regnDate?: string | null; firstUseDate?: string | null; - testTypes: TestTypeSchema[]; + testTypes: TestTypeSchema[] | TestTypeSchema1; reasonForCreation?: string; createdAt?: string | null; createdByEmailAddress?: string; @@ -175,6 +175,49 @@ export interface SpecialistCustomDefectsSchemaPut { inspectionTypes?: InspectionType[]; prs: boolean; } +export interface TestTypeSchema1 { + testTypeName: string | null; + name: string; + testTypeId: string; + certificateNumber: string | null; + secondaryCertificateNumber: string | null; + testTypeStartTimestamp: string | null; + testTypeEndTimestamp: string | null; + testResult: + | { + [k: string]: unknown; + } + | TestResults; + prohibitionIssued: boolean | null; + reasonForAbandoning: string | null; + additionalNotesRecorded: string | null; + additionalCommentsForAbandon: string | null; + numberOfSeatbeltsFitted?: number | null; + lastSeatbeltInstallationCheckDate?: string | null; + seatbeltInstallationCheckDate?: boolean | null; + testExpiryDate?: string; + testAnniversaryDate?: string | null; + modType?: ModTypeSchema | string | null; + emissionStandard?: + | { + [k: string]: unknown; + } + | EmissionStandards; + fuelType?: + | { + [k: string]: unknown; + } + | FuelType; + modificationTypeUsed?: string | null; + smokeTestKLimitApplied?: string | null; + particulateTrapFitted?: string | null; + particulateTrapSerialNumber?: string | null; + defects: DefectDetailsSchema[]; + customDefects?: SpecialistCustomDefectsSchema[] | null; + requiredStandards?: SpecialistCustomDefectsSchemaPut[]; + testNumber?: string | null; + reapplicationDate?: string | null; +} export interface BodyTypeSchema { code?: string | null; description?: string | null; diff --git a/types/v1/test/index.d.ts b/types/v1/test/index.d.ts index a1502c85..3a32d4de 100644 --- a/types/v1/test/index.d.ts +++ b/types/v1/test/index.d.ts @@ -261,7 +261,7 @@ export interface TestResultSchema { numberOfSeats?: number; regnDate?: string | null; firstUseDate?: string | null; - testTypes: TestTypeSchema[]; + testTypes: TestTypeSchema[] | TestTypeSchema1; reasonForCreation?: string; createdAt?: string | null; createdByEmailAddress?: string; @@ -392,6 +392,49 @@ export interface SpecialistCustomDefectsSchemaPut { inspectionTypes?: InspectionType[]; prs: boolean; } +export interface TestTypeSchema1 { + testTypeName: string | null; + name: string; + testTypeId: string; + certificateNumber: string | null; + secondaryCertificateNumber: string | null; + testTypeStartTimestamp: string | null; + testTypeEndTimestamp: string | null; + testResult: + | { + [k: string]: unknown; + } + | TestResults; + prohibitionIssued: boolean | null; + reasonForAbandoning: string | null; + additionalNotesRecorded: string | null; + additionalCommentsForAbandon: string | null; + numberOfSeatbeltsFitted?: number | null; + lastSeatbeltInstallationCheckDate?: string | null; + seatbeltInstallationCheckDate?: boolean | null; + testExpiryDate?: string; + testAnniversaryDate?: string | null; + modType?: ModTypeSchema | string | null; + emissionStandard?: + | { + [k: string]: unknown; + } + | EmissionStandards; + fuelType?: + | { + [k: string]: unknown; + } + | FuelType; + modificationTypeUsed?: string | null; + smokeTestKLimitApplied?: string | null; + particulateTrapFitted?: string | null; + particulateTrapSerialNumber?: string | null; + defects: DefectDetailsSchema[]; + customDefects?: SpecialistCustomDefectsSchema[] | null; + requiredStandards?: SpecialistCustomDefectsSchemaPut[]; + testNumber?: string | null; + reapplicationDate?: string | null; +} export interface BodyTypeSchema { code?: string | null; description?: string | null; diff --git a/types/v1/vehicle/index.d.ts b/types/v1/vehicle/index.d.ts index 3be6dc89..8bfb37f8 100644 --- a/types/v1/vehicle/index.d.ts +++ b/types/v1/vehicle/index.d.ts @@ -253,7 +253,7 @@ export interface TestResultSchema { numberOfSeats?: number; regnDate?: string | null; firstUseDate?: string | null; - testTypes: TestTypeSchema[]; + testTypes: TestTypeSchema[] | TestTypeSchema1; reasonForCreation?: string; createdAt?: string | null; createdByEmailAddress?: string; @@ -384,6 +384,49 @@ export interface SpecialistCustomDefectsSchemaPut { inspectionTypes?: InspectionType[]; prs: boolean; } +export interface TestTypeSchema1 { + testTypeName: string | null; + name: string; + testTypeId: string; + certificateNumber: string | null; + secondaryCertificateNumber: string | null; + testTypeStartTimestamp: string | null; + testTypeEndTimestamp: string | null; + testResult: + | { + [k: string]: unknown; + } + | TestResults; + prohibitionIssued: boolean | null; + reasonForAbandoning: string | null; + additionalNotesRecorded: string | null; + additionalCommentsForAbandon: string | null; + numberOfSeatbeltsFitted?: number | null; + lastSeatbeltInstallationCheckDate?: string | null; + seatbeltInstallationCheckDate?: boolean | null; + testExpiryDate?: string; + testAnniversaryDate?: string | null; + modType?: ModTypeSchema | string | null; + emissionStandard?: + | { + [k: string]: unknown; + } + | EmissionStandards; + fuelType?: + | { + [k: string]: unknown; + } + | FuelType; + modificationTypeUsed?: string | null; + smokeTestKLimitApplied?: string | null; + particulateTrapFitted?: string | null; + particulateTrapSerialNumber?: string | null; + defects: DefectDetailsSchema[]; + customDefects?: SpecialistCustomDefectsSchema[] | null; + requiredStandards?: SpecialistCustomDefectsSchemaPut[]; + testNumber?: string | null; + reapplicationDate?: string | null; +} export interface BodyTypeSchema { code?: string | null; description?: string | null; diff --git a/types/v1/visit/index.d.ts b/types/v1/visit/index.d.ts index b4233945..560ca751 100644 --- a/types/v1/visit/index.d.ts +++ b/types/v1/visit/index.d.ts @@ -274,7 +274,7 @@ export interface TestResultSchema { numberOfSeats?: number; regnDate?: string | null; firstUseDate?: string | null; - testTypes: TestTypeSchema[]; + testTypes: TestTypeSchema[] | TestTypeSchema1; reasonForCreation?: string; createdAt?: string | null; createdByEmailAddress?: string; @@ -405,6 +405,49 @@ export interface SpecialistCustomDefectsSchemaPut { inspectionTypes?: InspectionType[]; prs: boolean; } +export interface TestTypeSchema1 { + testTypeName: string | null; + name: string; + testTypeId: string; + certificateNumber: string | null; + secondaryCertificateNumber: string | null; + testTypeStartTimestamp: string | null; + testTypeEndTimestamp: string | null; + testResult: + | { + [k: string]: unknown; + } + | TestResults; + prohibitionIssued: boolean | null; + reasonForAbandoning: string | null; + additionalNotesRecorded: string | null; + additionalCommentsForAbandon: string | null; + numberOfSeatbeltsFitted?: number | null; + lastSeatbeltInstallationCheckDate?: string | null; + seatbeltInstallationCheckDate?: boolean | null; + testExpiryDate?: string; + testAnniversaryDate?: string | null; + modType?: ModTypeSchema | string | null; + emissionStandard?: + | { + [k: string]: unknown; + } + | EmissionStandards; + fuelType?: + | { + [k: string]: unknown; + } + | FuelType; + modificationTypeUsed?: string | null; + smokeTestKLimitApplied?: string | null; + particulateTrapFitted?: string | null; + particulateTrapSerialNumber?: string | null; + defects: DefectDetailsSchema[]; + customDefects?: SpecialistCustomDefectsSchema[] | null; + requiredStandards?: SpecialistCustomDefectsSchemaPut[]; + testNumber?: string | null; + reapplicationDate?: string | null; +} export interface BodyTypeSchema { code?: string | null; description?: string | null;