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

Draft-06 formats #173

Merged
merged 5 commits into from
Mar 26, 2017
Merged

Draft-06 formats #173

merged 5 commits into from
Mar 26, 2017

Conversation

epoberezkin
Copy link
Member

No description provided.

@epoberezkin epoberezkin mentioned this pull request Mar 12, 2017
14 tasks
@epoberezkin
Copy link
Member Author

@handrews @Julian please review

Copy link
Contributor

@handrews handrews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this looks good, just a few minor requests for other cases.

@@ -47,6 +52,55 @@
]
},
{
"description": "validation of URI References",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to add a fragment-only URI reference, "#frag" or whatever.

]
},
{
"description": "format: uri-template",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a URI Template that doesn't have any variables in it?

And also a URI Template that is a templated relative reference?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is templated relative reference? I don't see anything here: https://tools.ietf.org/html/rfc6570

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's not obvious but it's there. It just means that the template can look like a relative uRI reference in addition to a full URI.

At the top of page 3 in the introduction there's this:

template processor: A program or library that, given a URI Template
and a set of variables with values, transforms the template string
into a URI reference by parsing the template for expressions and
substituting each one with its corresponding expansion.

(emphasis added).

In the expansion section:

If an error occurs, the result returned might not be a valid URI
reference
; it will be an incompletely expanded template string that
is only intended for diagnostic use.

It's mentioned in several other places but I think that gets the point across :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So a templatized URI reference would be something like

/foos/{id}
/foos{?offset,limit,query}

etc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Actually the spec only defines interpolation ({...}), everything outside curly braces can be anything, it doesn't have to be URI reference according to the syntax in RFC.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I can add relative reference

@epoberezkin
Copy link
Member Author

@handrews added e8ef6fd

@epoberezkin
Copy link
Member Author

@handrews is there anything else we need here? That's the last thing for draft-06 tests I think.

@handrews
Copy link
Contributor

@epoberezkin as far as I know we're good to go for Draft 06 in terms of tests.

@epoberezkin epoberezkin merged commit 05fdba4 into json-schema-org:master Mar 26, 2017
@epoberezkin epoberezkin deleted the format branch March 26, 2017 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants