Giter Club home page Giter Club logo

Comments (6)

jonasschmidt avatar jonasschmidt commented on July 17, 2024

Yes, that definitely looks wrong. I think the official test suite now has a lot more tests around relative refs and how they should be resolved. Back when I implemented the ref logic there wasn't much to go on. I will try and come up with a fix this week, and maybe update the test suite to cover all the expected ref behaviors.

from ex_json_schema.

cblock avatar cblock commented on July 17, 2024

Great, thanks a lot! I can offer to test any changes against my current project if that would be of any help for your.

from ex_json_schema.

jonasschmidt avatar jonasschmidt commented on July 17, 2024

Ok, that one was bit trickier to fix than I expected, but I found a whole bunch of other bugs around ref resolution in the process. I have to make a few final changes and then I will release a fixed version later this week.

from ex_json_schema.

cblock avatar cblock commented on July 17, 2024

Great, thanks a lot! Looking forward to the new version!

from ex_json_schema.

jonasschmidt avatar jonasschmidt commented on July 17, 2024

I released the ref handling fix as version 0.6.0, but it turns out that the Signal-K schema isn't a valid draft 4 schema:

** (ExJsonSchema.Schema.InvalidSchemaError) schema did not pass validation against its meta-schema: [%ExJsonSchema.Validator.Error{error: %ExJsonSchema.Validator.Error.Type{actual: "array", expected: ["object"]}, path: "#/definitions/chargerQualities/properties/allOf"}]

I verified with other validator implementations and they all come to the same result. The schema in https://signalk.org/specification/1.0.0/schemas/groups/electrical.json tries to use allOf in a property definition context and that doesn't work. According to the spec, allOf is treated as a normal property in that context and property definitions have to be objects.

from ex_json_schema.

cblock avatar cblock commented on July 17, 2024

First of all thanks a lot for the update. I can confirm / reproduce the schema did not pass validation against its meta-schema error and I'll address this upstream with the signal-k developers.

from ex_json_schema.

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.