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.
t.strict
t.exact
1 parent f7b71ad commit e07064cCopy full SHA for e07064c
packages/openapi-generator/src/knownImports.ts
@@ -53,6 +53,20 @@ export const KNOWN_IMPORTS: KnownImports = {
53
}, {});
54
return E.right({ type: 'object', properties: props, required: [] });
55
},
56
+ strict: (_, schema) => E.right(schema),
57
+ exact: (_, schema) => {
58
+ if (schema.type !== 'object') {
59
+ return E.left('exactC parameter must be object');
60
+ }
61
+ const props = Object.entries(schema.properties).reduce((acc, [key, prop]) => {
62
+ return { ...acc, [key]: prop };
63
+ }, {});
64
+ return E.right({
65
+ type: 'object',
66
+ properties: props,
67
+ required: Object.keys(props),
68
+ });
69
+ },
70
record: (_, _domain, codomain) => {
71
if (!codomain) {
72
return E.left('Codomain of record must be specified');
0 commit comments