raml-for-jax-rs
raml-for-jax-rs copied to clipboard
Cross-Referenced Json Schema taking name of first field encountered
Assume i have this schema structure
SchemaA.json:
{
"properties": {
"myValA": { "$ref" : "file:path/to/Common.json"}
}
}
SchemaB.json:
{
"properties": {
"myValB": { "$ref" : "file:path/to/Common.json"}
}
}
Common.json:
{
"id" : "MyCommonUniqueName"
}
In this case, the Java Pojo generated for Common.json is called either "MyValA.java" or "MyValB.java" as it is called after the first property field name it encounters
I believe it would make sense for it to be called either "MyCommonUniqueName.java" (from the id) or possibly "Common.java" (from the file name)
A solution would be to bind the schema using a "javaType" but this would bind it specifically to my package structure and hence not make the schema redistributable