transform icon indicating copy to clipboard operation
transform copied to clipboard

JSON -> JSON Schema bug

Open Dmitiry1921 opened this issue 2 years ago • 1 comments

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 avatar Nov 15 '23 11:11 Dmitiry1921

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

Dmitiry1921 avatar Nov 15 '23 11:11 Dmitiry1921