Skip to content

Fixup resolve URI from anchored sourceURI #236

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

Conversation

bburnichon
Copy link
Contributor

When using resolver with a base URI which has an anchored, the resolved URI keep the base URI anchor.

This patch ensures frament part of baseURI is removed before generating URI.

use JsonSchema\Uri\UriResolver;

$resolver = new UriResolver();

echo $resolver->resolve('baz.json', 'http://example.org/foo/bar.json#baz');

// expected: http://example.org/foo/baz.json
// actual:   http://example.org/foo/baz.json#baz

@bburnichon
Copy link
Contributor Author

ping @justinrainbow @bighappyface

@bighappyface
Copy link
Collaborator

Closed with #174

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