Comments (14)
+1 for IRI support. It's 2016, let's be inclusive :-)
from json-schema-spec.
@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.
@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.
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.
@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.
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.
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.
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.
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.
@Relequestual I see. Is this something I can help with, perhaps in another PR?
from json-schema-spec.
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.
Seems like a simple and important improvement! 🥳
from json-schema-spec.
This may be closed now since it is implemented in #1137 .
from json-schema-spec.
🎉 🎉 🎉
from json-schema-spec.
Related Issues (20)
- OneOf property is failing during OAS Schema Validation HOT 4
- Intended interplay between "type" and "enum" HOT 2
- Validation Regex Description (section 7.3.8) should follow format of other string validation types
- Enum : Clarification HOT 2
- Build failure due to Relative JSON Pointer specification HOT 1
- Pattern: clarification on whether leading and trailing delimiters are allowed or required HOT 2
- Omitted `prefixItems` vs empty HOT 1
- Evaluation path: relative to $ref resolved schema or resource/document root? HOT 4
- JSON
- Feature Request: Constraint for single occurrence of a property structure in JSON Schema HOT 1
- Use JSON Pointers instead of 'properties' or 'prefixItems' keywords HOT 16
- Json-schema HOT 1
- How do I get the use Json to get the "about" and "mention" property to work with several subjects? HOT 4
- Statement on annotation values is unclear
- To validate CRUD of table information with a single Json-Schema, we propose an attribute for PrimaryKey. HOT 3
- Futuristic
- owner
- Typo in section 8.2.3 of draft 7 leading to wrong information HOT 4
- String format validation for IP addresses with network mask
- File extension in $id HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-schema-spec.