Skip to content

Commit af1d6e8

Browse files
committed
fix: add missing validation types
1 parent 212f09b commit af1d6e8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/utils/__tests__/__snapshots__/renderSchema.spec.ts.snap

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,11 @@ Array [
254254
},
255255
},
256256
"type": "object",
257-
"validations": Object {},
257+
"validations": Object {
258+
"xml": Object {
259+
"name": "Pet",
260+
},
261+
},
258262
},
259263
"name": "",
260264
},
@@ -1735,6 +1739,7 @@ Array [
17351739
"PRINT_AT_KIOSK",
17361740
"SECURE_PAPER",
17371741
],
1742+
"readOnly": true,
17381743
},
17391744
},
17401745
"name": "",

src/utils/getValidations.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ export const COMMON_VALIDATION_TYPES = [
88
'default',
99
'example',
1010
'deprecated',
11+
'nullable',
12+
'discriminator',
13+
'readOnly',
14+
'writeOnly',
15+
'xml',
16+
'externalDocs',
1117
];
1218

1319
const VALIDATION_TYPES = {

0 commit comments

Comments
 (0)