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
I am trying to convert a json schema that should either be null or a $ref to another object. In this case the reference is just a simple string but this could be arbitrarily complicated.
The design of the json schema follows the advice given here:
Error
at Object.<anonymous> ([...]/json-schema-to-openapi-schema/index.js:8:30)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> ([...]/json-schema-to-openapi/index.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10) {
name: 'InvalidTypeError',
message: 'Type "null" is not a valid type'
}
I believe this issue is similar to #21. However, in that case you could easily adjust the json schema using the "type": [] syntax. Here it is different. I guess the only alternative would be to make all referenced objects nullable, which I would like to avoid.
I believe this would be a great addition for converting rather complicated schemata. :)
The text was updated successfully, but these errors were encountered:
I am trying to convert a json schema that should either be
null
or a$ref
to another object. In this case the reference is just a simplestring
but this could be arbitrarily complicated.The design of the json schema follows the advice given here:
Input
I expected the output to be somewhat similar to this:
Expected Output
However, it actually caused the package to crash:
Error
I believe this issue is similar to #21. However, in that case you could easily adjust the json schema using the
"type": []
syntax. Here it is different. I guess the only alternative would be to make all referenced objects nullable, which I would like to avoid.I believe this would be a great addition for converting rather complicated schemata. :)
The text was updated successfully, but these errors were encountered: