You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the discussion here, when we have an enum which is nullable we should add null as one of the enum values. json-schema-org/json-schema-spec#258
According to the discussion here, when we have an enum which is nullable we should add null as one of the enum values.
json-schema-org/json-schema-spec#258
Here is an example of this change being implemented in another library: vega/ts-json-schema-generator#22
Details
Given the following types:
When we generate the schema without inlining the definitions, we get
This is correct and successfully validates request when null is given.
However, if we inline definitions we are given this schema,
which fails to validate when you pass a
null
value with the following errornull is not one of ["InService","OutOfService"]
.Instead, the schema that is generated should have the following change
The text was updated successfully, but these errors were encountered: