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

Upgrade json schema to latest version #44

Merged
merged 3 commits into from Oct 10, 2014
Merged

Upgrade json schema to latest version #44

merged 3 commits into from Oct 10, 2014

Conversation

bkirz
Copy link
Contributor

@bkirz bkirz commented Oct 10, 2014

We've been using 1.1.1 for a long time, and 2.2.5 brings some fancy new features like strict mode. With this upgrade, we'll be able to depend the newer json-schema version in apps that use interpol.

@@ -217,10 +217,10 @@ def endpoint_name

def validate_data!(data, validate_schema = true)
if validate_schema
errors = ::JSON::Validator.fully_validate_schema(schema)
errors = ::JSON::Validator.fully_validate_schema(schema, version: :draft3)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably make the version be an attribute of the endpoint. As this currently exists it looks like there's no way to make an endpoint use v4 json schema.

That said, I'm fine with that being declared out of scope if it'll be addressed in a future iteration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll declare it out of scope for now. There's a $schema key you can use to point to a specific schema version, but I'm not sure how the json-schema gem handles that when also passed an explicit version key.

 - It's reached End-of-Life and has unpatched security vulnerabilities.
 - It's no longer supported by our dev tools (chruby/ruby-install)
bkirz added a commit that referenced this pull request Oct 10, 2014
Upgrade json schema to latest version
@bkirz bkirz merged commit cff610e into master Oct 10, 2014
@bkirz bkirz deleted the upgrade-json-schema branch October 10, 2014 22:44
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