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

Fix id handling #178

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Nov 7, 2014

  1. Refactor JSON::Schema and fix ListOptionTest.

    * Refactor JSON::Schema#initialize to move schema URI generation into
      its own method, #generate_schema_uri.
    * Refactor JSON::Schema#base_uri to do less path munging itself.
    * Fix ListOptionTest, which was relying on seemingly unintended
      behaviour where JSON::Schema's constructor was modifying a URI
      in-place, thus appending a '#' to the URI used in the test. As
      JSON::Schema's constructor doesn't modify its arguments anymore,
      this test started to fail.
    gabrielg committed Nov 7, 2014
    Configuration menu
    Copy the full SHA
    482521d View commit details
    Browse the repository at this point in the history
  2. Generate absolute URIs as fake schema URIs.

    This generates absolute URN URIs for schemas as necessary, rather than
    relative ones. Using relative URIs causes errors given schemas that
    should actually be valid.
    
    BadSchemaRefTest has been altered to use a reference to an invalid
    URI, rather than a valid relative URI.
    gabrielg committed Nov 7, 2014
    Configuration menu
    Copy the full SHA
    0c63566 View commit details
    Browse the repository at this point in the history
  3. Add tests for other valid schemas with id properties.

    Commits 0c63566 and 482521d fixed improper handling of the id
    attribute, this adds the tests to prove it.
    
    Also introduces a minor refactor to JSON::Schema#generate_schema_uri.
    gabrielg committed Nov 7, 2014
    Configuration menu
    Copy the full SHA
    9fcad2f View commit details
    Browse the repository at this point in the history