-
Notifications
You must be signed in to change notification settings - Fork 325
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
Issue 26 #37
Conversation
merging last changes
@stevehu could you release this? |
} | ||
|
||
private boolean isRelativePath(String schemaUrl) { | ||
return !schemaUrl.startsWith("http"); |
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 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(); |
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.
Where does this "id"
property come from and why is it treated as a URL?
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 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.
@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. |
adding relative $ref urls