Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON -> JSON Schema bug #382

Open
Dmitiry1921 opened this issue Nov 15, 2023 · 1 comment
Open

JSON -> JSON Schema bug #382

Dmitiry1921 opened this issue Nov 15, 2023 · 1 comment

Comments

@Dmitiry1921
Copy link

Dmitiry1921 commented Nov 15, 2023

The problem during conversion from JSON to JSON Schema draft-07 is that when passing the JSON object
{ "userId": null }
through the transformer, the output is:
{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Generated schema for Root", "type": "object", "properties": { "userId": {} }, "required": [ "userId" ] }
However, the expected output is:
{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Generated schema for Root", "type": "object", "properties": { "userId": { "type": "null" } }, "required": [ "userId" ] }

@Dmitiry1921
Copy link
Author

The issue can be reproduced here: https://transform.tools/json-to-json-schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant