-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Draft-06 formats #173
Conversation
There was a problem hiding this 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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :-)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
@handrews is there anything else we need here? That's the last thing for draft-06 tests I think. |
@epoberezkin as far as I know we're good to go for Draft 06 in terms of tests. |
No description provided.