jsonschema2popo icon indicating copy to clipboard operation
jsonschema2popo copied to clipboard

tried your code

Open loomanss opened this issue 6 years ago • 1 comments

didn't work on the first try.

did some code changes but i'm new to python so i cannot estimate the impact on the project:

line 60 changed : for model_name in networkx.topological_sort(g): new version networkx didnt accept reversed=true argument line 157 & 158 changed :

parser.add_argument('json_schema_file', type=argparse.FileType('r') , help="Path to JSON Schema file to load") parser.add_argument('-o', '--output-file', type=argparse.FileType('w'), help="Path to file output", default="model.py")

Name: argparse Version: 1.2.1

Name: networkx Version: 2.2

example schema.json used :

{ "definitions": { "address": { "type": "object", "properties": { "street_address": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" } }, "required": ["street_address", "city", "state"] } } }

loomanss avatar Nov 26 '18 22:11 loomanss