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

Add better nullability support. #20

Merged
merged 4 commits into from Apr 28, 2013
Merged

Add better nullability support. #20

merged 4 commits into from Apr 28, 2013

Conversation

myronmarston
Copy link
Contributor

json-schema supports nullability through a type union.
However, it can be cumbersome to have to use type unions
everywhere. This commit adds better support for nullability:

  • Any property can declare its nullability with a simple
    nullable: true declaration.
  • Add a new scalars_nullable_by_default config setting.

json-schema supports nullability through a type union.
However, it can be cumbersome to have to use type unions
everywhere. This commit adds better support for nullability:

* Any property can declare its nullability with a simple
  `nullable: true` declaration.
* Add a new `scalars_nullable_by_default` config setting.
@waltjones
Copy link
Contributor

Looks good. #conditionally_make_nullable very nicely done.

Previously, once you configured `endpoint_definition_files`, no other
config options would affect the endpoints even if they were meant to
because the endpoints were already loaded by that point.

This changes the endpoint loading so that it's lazy.
- Don't change `type: null` to `type: [null]`.
- Don't blow up when there is an actual property named `type`.
myronmarston added a commit that referenced this pull request Apr 28, 2013
Add better nullability support.
@myronmarston myronmarston merged commit 055f617 into master Apr 28, 2013
@myronmarston myronmarston deleted the nullable branch April 28, 2013 03:33
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

Successfully merging this pull request may close these issues.

None yet

2 participants