Open beclever opened 2 days ago
for example, given json schema: { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "http://example.com", "title": "ExampleBasicApp", "description": "desc", "type": "object", "properties": { "id": { "description": "Subscription Id", "maxLength": 512, "type": "string" }, "spsid": { "description": "Service Provider Subscription Id", "maxLength": 384, "type": "string" }, generate a json like below: { "id": "string", "spsid": "string" }
This library isn't really intended for that use case but you can attempt to do so using a walker.
https://github.com/networknt/json-schema-validator/blob/3234d023706d04fe8ad58e616b23f482beb2579d/src/test/java/com/networknt/schema/walk/JsonSchemaWalkListenerTest.java#L566-L621
Thank you, this is really helpful to me.
for example, given json schema: { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "http://example.com", "title": "ExampleBasicApp", "description": "desc", "type": "object", "properties": { "id": { "description": "Subscription Id", "maxLength": 512, "type": "string" }, "spsid": { "description": "Service Provider Subscription Id", "maxLength": 384, "type": "string" }, generate a json like below: { "id": "string", "spsid": "string" }