Skip to content

Commit fbc2030

Browse files
committed
feat(cb2-14764): created recalls schema and added to test result schema
1 parent 17dd4bb commit fbc2030

File tree

9 files changed

+85
-0
lines changed

9 files changed

+85
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"title": "Recalls Schema",
3+
"type": "object",
4+
"properties": {
5+
"hasRecall": {
6+
"type": [
7+
"boolean",
8+
"null"
9+
]
10+
},
11+
"manufacturer": {
12+
"type": [
13+
"string",
14+
"null"
15+
]
16+
}
17+
},
18+
"additionalProperties": false,
19+
"required": [
20+
"hasRecall",
21+
"manufacturer"
22+
]
23+
}

json-definitions/v1/test-result/index.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,13 @@
278278
},
279279
"deletionFlag": {
280280
"type": "boolean"
281+
},
282+
"recalls": {
283+
"anyOf": [
284+
{
285+
"$ref": "../recalls/index.json"
286+
}
287+
]
281288
}
282289
},
283290
"additionalProperties": false,

json-schemas/v1/recalls/index.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"title": "Recalls Schema",
3+
"type": "object",
4+
"properties": {
5+
"hasRecall": {
6+
"type": [
7+
"boolean",
8+
"null"
9+
]
10+
},
11+
"manufacturer": {
12+
"type": [
13+
"string",
14+
"null"
15+
]
16+
}
17+
},
18+
"additionalProperties": false,
19+
"required": [
20+
"hasRecall",
21+
"manufacturer"
22+
]
23+
}

schemas.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const schemas = [
1717
"v1/enums/typeOfTest.enum.json",
1818
"v1/enums/waitReason.enum.json",
1919
"v1/reason-item/index.json",
20+
"v1/recalls/index.json",
2021
"v1/tech-record/index.json",
2122
"v1/test/index.json",
2223
"v1/test-result/index.json",

types/v1/recalls/index.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* tslint:disable */
2+
/**
3+
* This file was automatically generated by json-schema-to-typescript.
4+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5+
* and run json-schema-to-typescript to regenerate this file.
6+
*/
7+
8+
export interface RecallsSchema {
9+
hasRecall: boolean | null;
10+
manufacturer: string | null;
11+
}

types/v1/test-result/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export interface TestResultSchema {
6161
testHistory?: TestResultSchema[];
6262
testVersion?: string;
6363
deletionFlag?: boolean;
64+
recalls?: RecallsSchema;
6465
}
6566
export interface VehicleClassSchema {
6667
code: string;
@@ -203,6 +204,10 @@ export interface BodyTypeSchema {
203204
code?: string | null;
204205
description?: string | null;
205206
}
207+
export interface RecallsSchema {
208+
hasRecall: boolean | null;
209+
manufacturer: string | null;
210+
}
206211

207212
export enum TestStationTypes {
208213
ATF = "atf",

types/v1/test/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ export interface TestResultSchema {
282282
testHistory?: TestResultSchema[];
283283
testVersion?: string;
284284
deletionFlag?: boolean;
285+
recalls?: RecallsSchema;
285286
}
286287
export interface TestTypeSchema {
287288
testTypeName: string | null;
@@ -420,6 +421,10 @@ export interface BodyTypeSchema {
420421
code?: string | null;
421422
description?: string | null;
422423
}
424+
export interface RecallsSchema {
425+
hasRecall: boolean | null;
426+
manufacturer: string | null;
427+
}
423428

424429
export enum TestStationTypes {
425430
ATF = "atf",

types/v1/vehicle/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ export interface TestResultSchema {
274274
testHistory?: TestResultSchema[];
275275
testVersion?: string;
276276
deletionFlag?: boolean;
277+
recalls?: RecallsSchema;
277278
}
278279
export interface TestTypeSchema {
279280
testTypeName: string | null;
@@ -412,6 +413,10 @@ export interface BodyTypeSchema {
412413
code?: string | null;
413414
description?: string | null;
414415
}
416+
export interface RecallsSchema {
417+
hasRecall: boolean | null;
418+
manufacturer: string | null;
419+
}
415420

416421
export enum TestStationTypes {
417422
ATF = "atf",

types/v1/visit/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ export interface TestResultSchema {
295295
testHistory?: TestResultSchema[];
296296
testVersion?: string;
297297
deletionFlag?: boolean;
298+
recalls?: RecallsSchema;
298299
}
299300
export interface TestTypeSchema {
300301
testTypeName: string | null;
@@ -433,6 +434,10 @@ export interface BodyTypeSchema {
433434
code?: string | null;
434435
description?: string | null;
435436
}
437+
export interface RecallsSchema {
438+
hasRecall: boolean | null;
439+
manufacturer: string | null;
440+
}
436441

437442
export enum TestStationTypes {
438443
ATF = "atf",

0 commit comments

Comments
 (0)