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

Make "required" configurable #8

Open
yazad3 opened this issue Jul 12, 2014 · 5 comments
Open

Make "required" configurable #8

yazad3 opened this issue Jul 12, 2014 · 5 comments

Comments

@yazad3
Copy link

yazad3 commented Jul 12, 2014

First of all thank you for the awesome tool! It is indeed very useful!

Currently when one reverse engineers the JSON Schema from the JSON - the required attribute is always set to true - this is in the generator.py file in the to_dict method - the schema_dict["required"] is hard coded to True.

It would be good if a command line option could be offered to to control this property - so users can generate schemas with all properties required or all not required.

Thank you!

@wizzat
Copy link

wizzat commented Jul 12, 2014

It would be better still to have required be configurable per object in the json.

@yazad3
Copy link
Author

yazad3 commented Jul 12, 2014

Yes - but at least an overall strategy for "required" across the object would be a good start.

@wizzat
Copy link

wizzat commented Jul 16, 2014

I'm in the process of creating a pull request which should address both concerns.

@wizzat
Copy link

wizzat commented Jul 17, 2014

Please check out #10 and see if it solves your use case.

@yazad3
Copy link
Author

yazad3 commented Jul 17, 2014

Sounds interesting...

Regards,
Yazad Khambata
617-291-3857
On 16 Jul 2014 15:59, "Mark Roberts" [email protected] wrote:

I'm in the process of creating a pull request which should address both
concerns.


Reply to this email directly or view it on GitHub
#8 (comment)
.

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

2 participants