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

Issue 26 #37

Merged
merged 3 commits into from
Jun 27, 2017
Merged

Issue 26 #37

merged 3 commits into from
Jun 27, 2017

Conversation

eskabetxe
Copy link
Contributor

adding relative $ref urls

@eskabetxe
Copy link
Contributor Author

@stevehu could you release this?

@eskabetxe eskabetxe deleted the issue_26 branch July 3, 2017 15:14
}

private boolean isRelativePath(String schemaUrl) {
return !schemaUrl.startsWith("http");

Choose a reason for hiding this comment

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

What about relative local paths? With this change I can't load local schemas anymore using $ref.

}

private String obtainAbsolutePath(JsonSchema parentSchema, String schemaUrl) {
String baseSchemaUrl = parentSchema.findAncestor().getSchemaNode().get("id").textValue();

Choose a reason for hiding this comment

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

Where does this "id" property come from and why is it treated as a URL?

Choose a reason for hiding this comment

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

I found https://spacetelescope.github.io/understanding-json-schema/structuring.html?highlight=dependencies#the-id-property. But it should be optional, I'd say. I still want to use $ref on local relative files.

@stevehu
Copy link
Contributor

stevehu commented Jan 31, 2018

@whiskeysierra I hear you. There are too many version of specs and it is very hard to support all of them at the same time with the current architecture. I am planning to refactor it with service from light-4j so that different user can choose their implementations.

#54

@jawaff jawaff mentioned this pull request May 3, 2019
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.

3 participants