Code Monkey home page Code Monkey logo

Comments (14)

handrews avatar handrews commented on May 22, 2024 4

+1 for IRI support. It's 2016, let's be inclusive :-)

from json-schema-spec.

jakubklimek avatar jakubklimek commented on May 22, 2024 2

@philsturgeon Well, it is simply done in the meta-schema. In the spec we need to take care not to break anything, especially regarding canonical URIs, URIs used in HTTP Link Headers, URI templates, etc.

But it needs to be done.

from json-schema-spec.

handrews avatar handrews commented on May 22, 2024

@awwright what would need to be done for this? Is it sufficient to just go through and change URI to IRI? (and IRI reference, etc. etc.). I have not paid much attention to what sort of things come up with IRIs rather than URIs.

from json-schema-spec.

handrews avatar handrews commented on May 22, 2024

Note that while there is no separate IRI Template specification, per RFC 6570:

Although the URI syntax is used for the result, the template string
is allowed to contain the broader set of characters that can be found
in Internationalized Resource Identifier (IRI) references [RFC3987].
Therefore, a URI Template is also an IRI template, and the result of
template processing can be transformed to an IRI by following the
process defined in Section 3.2 of [RFC3987].

from json-schema-spec.

handrews avatar handrews commented on May 22, 2024

@awwright @Relequestual @philsturgeon @gregsdennis any thoughts on this?

Is it just as simple as saying $id and $ref take IRI-references instead of URI-references? Is that desirable? It doesn't ever seem to come up, but IRIs will only get more important, I suspect.

from json-schema-spec.

gregsdennis avatar gregsdennis commented on May 22, 2024

Looks like IRIs are already supported in .Net which means I'm already supporting it 🎉

I have no problems with this.

from json-schema-spec.

Relequestual avatar Relequestual commented on May 22, 2024

Seems like the right move to me.
Some extra considerations from RFD: https://www.w3.org/TR/rdf11-concepts/#h3_section-IRIs

Should we note similar considerations or is it unnecessary?

from json-schema-spec.

jakubklimek avatar jakubklimek commented on May 22, 2024

I already use IRIs in $ref and $id as this is necessary for Czech schemas. The ids and refs would look terrible otherwise:
https://ofn.gov.cz/turistické-cíle/2020-07-01/schémata/turistický-cíl.json
vs.
https://ofn.gov.cz/turistick%C3%A9-c%C3%ADle/2020-07-01/sch%C3%A9mata/turistick%C3%BD-c%C3%ADl.json

I use https://www.jsonschemavalidator.net/ for validation, and it worked OK with JSON instance files.
Only recently I accidentally validated the JSON schema itself and discovered that it is actually invalid because it uses IRIs in $id and $ref, which lead me to this issue.

Since there do not seem any objections to this, can this be implemented?

from json-schema-spec.

Relequestual avatar Relequestual commented on May 22, 2024

Updating the meta-schema is not all the work that needs to be done.
The specification documents would need to be updated to use IRI for $id and potentially other places.
The meta-schema is informative only, while the specification documents are normative.

from json-schema-spec.

jakubklimek avatar jakubklimek commented on May 22, 2024

@Relequestual I see. Is this something I can help with, perhaps in another PR?

from json-schema-spec.

Relequestual avatar Relequestual commented on May 22, 2024

Yes! You may use the same PR or another PR, your choice.
Often we don't update the meta-schema till later in the release cycle, but it's great to update it alongside changes.

My comment on your PR relating to not merging the PR... we haven't yet published the 2020-12 meta-schema. That is mostly my fault. Working on it =]

from json-schema-spec.

philsturgeon avatar philsturgeon commented on May 22, 2024

Seems like a simple and important improvement! 🥳

from json-schema-spec.

jakubklimek avatar jakubklimek commented on May 22, 2024

This may be closed now since it is implemented in #1137 .

from json-schema-spec.

jdesrosiers avatar jdesrosiers commented on May 22, 2024

🎉 🎉 🎉

from json-schema-spec.

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.