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 ef826a4 commit 5839897Copy full SHA for 5839897
scripts/build-schema.js
@@ -16,6 +16,9 @@ const ref = id => ({ $ref: `#/definitions/${id}` });
16
17
const $optional = Symbol('optional');
18
const optional = schema => ({ ...schema, [$optional]: true });
19
+
20
+// Older compiler versions returned null for missing fields, whereas newer
21
+// releases omit them. Generally `optional` should be used instead of `nullable`.
22
const nullable = schema => schema ? optional(anyOf(schema, _null)) : optional(_null);
23
24
const object = (properties = {}) => ({
0 commit comments