We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a59d0b9 commit b437a72Copy full SHA for b437a72
src/components/shared/Validations.tsx
@@ -180,7 +180,12 @@ export function getValidationsFromSchema(schemaNode: RegularNode) {
180
...(schemaNode.annotations.examples ? { examples: schemaNode.annotations.examples } : null),
181
}
182
: null),
183
- ...('fragment' in schemaNode && 'const' in schemaNode.fragment ? { const: schemaNode.fragment.const } : null),
+ ...('fragment' in schemaNode
184
+ ? {
185
+ ...('const' in schemaNode.fragment ? { const: schemaNode.fragment.const } : null),
186
+ ...('x-example' in schemaNode.fragment ? { ['x-example']: schemaNode.fragment['x-example'] } : null),
187
+ }
188
+ : null),
189
...schemaNode.validations,
190
};
191
0 commit comments