Giter Site home page Giter Site logo

Implement $schema about jsonschema HOT 12 CLOSED

Julian avatar Julian commented on May 22, 2024
Implement $schema

from jsonschema.

Comments (12)

gazpachoking avatar gazpachoking commented on May 22, 2024

I'm guessing you mean support in the plain validate function, right?

What should happen if a $schema isn't found in the schema, and a validator class isn't explicitly specified? Should we default to one, or error?

from jsonschema.

Julian avatar Julian commented on May 22, 2024

Right, in validate.

@validates should be modified to pull the id out of IValidator.META_SCHEMA too.

I think we should default to one. The next release will be 1.0.0 so we can now make that default be draft 4 I think.

from jsonschema.

Julian avatar Julian commented on May 22, 2024

Uh. Whoops?

from jsonschema.

gazpachoking avatar gazpachoking commented on May 22, 2024

I have something for this, just trying to get all the updates merged in to the draft 4 branch now and tests updated. Do you think we should just have extra keys in validators for the schema uris to look this up?

from jsonschema.

gazpachoking avatar gazpachoking commented on May 22, 2024

Okay, here's what I've got. I'm unsure if schema URIs should just be mixed in with the common names in the validators dict like I'm doing right now though.
gazpachoking@112f3d6

from jsonschema.

Julian avatar Julian commented on May 22, 2024

Ech yes. I don't know why I said we should get this done before merging, I didn't actually mean that 😦. Let's see here...

from jsonschema.

gazpachoking avatar gazpachoking commented on May 22, 2024

Oh, sorry if I was premature there. I was just trying get the updated tests into draft 4 branch before working on it again.

from jsonschema.

gazpachoking avatar gazpachoking commented on May 22, 2024

We can always go back and do the merge again if I've done it wrong.

from jsonschema.

Julian avatar Julian commented on May 22, 2024

No no :)... It looks fine, I just didn't mean to say "we need this
otherwise we can't merge the other thing".

from jsonschema.

gazpachoking avatar gazpachoking commented on May 22, 2024

Oh no, I didn't take it that way. It just felt right to implement $schema in the draft 4 branch, and I wanted to pull in the master changes/tests before they diverged any further.

from jsonschema.

Julian avatar Julian commented on May 22, 2024

Ah OK, good. So I'll take a look in a bit, looks more or less mergeable as is.

from jsonschema.

Julian avatar Julian commented on May 22, 2024

Merged in #59.

from jsonschema.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.