-
Notifications
You must be signed in to change notification settings - Fork 6
Improve Resolver #12
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
base: master
Are you sure you want to change the base?
Improve Resolver #12
Conversation
|
@JanTvrdik, I think we must see this and the ideas in #6 and #11 as a whole and put a little more thought in it. AFAIK the issue isn't about correctness but usability. What's needed is a more convenient API to deal with paths/URIS in general (relative/absolute/not-specified). Implementation may then vary wildly. I won't have much time in the next days unfortunalely, so here are just quick notes:
|
675c11c to
e2f4f1b
Compare
e2f4f1b to
d037430
Compare
|
Thanks for your work. On the positive side:
On the other hand:
|
| $identifier .= '?'.$this->parts['query']; | ||
| } | ||
|
|
||
| if ($this->parts['fragment'] !== '' && $this->parts['fragment'][0] !== '/') { |
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.
This isn't right: as per RFC 3986, a fragment denotes a secondary resource; it can't be part of the primary resource identifier.
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.
Good point, I was unaware of the RFC 3986 terminology. The purpose of this is that we need non-JSON-pointer fragments to be used as part of schema identifiers.
It should be. Functionally mentioned in #6 (comment) remained intentionally unimplemented because relative URLs cannot be handled reliably.
I disagree. The specification regarding
Note: the schema is actually sort-of invalid because content of |
|
I don't see anything in the spec to support that reasonning. Scopes have nothing to do with "declaration" of schemas, they're just a way to alter the URI against which references will be resolved. They're also completely indifferent to the way references will be fetched (disk/memory/...). Reading the relevant section of the spec, I think the only possible interpretation is:
The expected content of {
"maximum": 2
}It is the case in the current implementation, and that's what the test is checking. |
No description provided.