You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When my co-worker runs the exact same code on his mac, he gets the desired output schema:
{
"type" : "object",
"id" : "urn:jsonschema:com:emc:brs:policy:msg:ds:CreateDataSourceRequest",
"properties" : {
"className" : {
"type" : "string",
"required" : true
},
"messageVersion" : {
"type" : "string",
"required" : true,
"description" : "The version of this message",
"enum" : [ "1" ]
},
"dataSource" : {
"type" : "object",
"id" : "urn:jsonschema:com:emc:brs:policy:msg:DataSource",
"properties" : {
"hosts" : {
"type" : "array",
"required" : true,
"description" : "Reference to the credentials object if applicable",
"items" : {
"type" : "object",
"id" : "urn:jsonschema:com:emc:brs:policy:msg:Host",
"properties" : {
"hostname" : {
"type" : "string"
},
"ipv6Address" : {
"type" : "string"
},
"name" : {
"type" : "string",
"description" : "Optional alias or name of the object"
},
"ipv4Address" : {
"type" : "string"
},
"osType" : {
"type" : "string"
},
"attributes" : {
"type" : "object",
"description" : "List of attributes for the object",
"additionalProperties" : {
"type" : "string"
}
},
"uuid" : {
"type" : "string",
"required" : true,
"description" : "Unique id of this object"
},
"tags" : {
"type" : "object",
"description" : "List of tags for the object",
"additionalProperties" : {
"type" : "string"
}
}
}
}
},
"paths" : {
"type" : "array",
"required" : true,
"description" : "List of paths and/or compound paths to back up",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : "string",
"description" : "Optional alias or name of the object"
},
"options" : {
"type" : "object",
"id" : "urn:jsonschema:com:emc:brs:policy:msg:Options",
"properties" : {
"name" : {
"type" : "string",
"description" : "Optional alias or name of the object"
},
"flags" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
},
"attributes" : {
"type" : "object",
"description" : "List of attributes for the object",
"additionalProperties" : {
"type" : "string"
}
},
"pid" : {
"type" : "integer"
},
"uuid" : {
"type" : "string",
"required" : true,
"description" : "Unique id of this object"
},
"version" : {
"type" : "string"
},
"tags" : {
"type" : "object",
"description" : "List of tags for the object",
"additionalProperties" : {
"type" : "string"
}
}
}
},
"attributes" : {
"type" : "object",
"description" : "List of attributes for the object",
"additionalProperties" : {
"type" : "string"
}
},
"uuid" : {
"type" : "string",
"required" : true,
"description" : "Unique id of this object"
},
"creds" : {
"type" : "object",
"$ref" : "urn:jsonschema:com:emc:brs:policy:msg:Creds"
},
"dataSourceType" : {
"type" : "string",
"required" : true,
"description" : "The type of data source",
"enum" : [ "FILE_SYSTEM", "FILE_SYSTEM_TRADITIONAL", "FILE_SYSTEM_INCREMENTAL_FOREVER", "DB2", "EXCHANGE", "HYPER_V", "INTERNAL", "LOTUS", "NAS_DEVICE", "ORACLE", "SAP", "SHAREPOINT", "SQL", "SYBASE", "VMWARE", "UNKNOWN" ]
},
"tags" : {
"type" : "object",
"description" : "List of tags for the object",
"additionalProperties" : {
"type" : "string"
}
}
}
}
}
}
I am at a loss for what could be causing this beyond some sort of nasty/inconsistent interaction between Jackson and the JVM implementations. Have you seen anything like this before? Is there anything obvious I should try as a workaround?
The text was updated successfully, but these errors were encountered:
I have built from the latest source (jackson-module-jsonSchema-2.4.5-SNAPSHOT.jar) and my issue is no longer present. It would be interesting to know why the issue wasn't present on Macs originally, but for now my issue is resolved.
I'm using jackson to generate json schema strings from POJOs with some code that looks like this:
When I run this code on my linux machine for some POJOs (I'll use one as a specific example) I get the incomplete schema below:
{
"type" : "object",
"id" : "urn:jsonschema:com:emc:brs:policy:msg:ds:CreateDataSourceRequest",
"properties" : {
"className" : {
"type" : "string",
"required" : true
},
"messageVersion" : {
"type" : "string",
"required" : true,
"description" : "The version of this message",
"enum" : [ "1" ]
},
"dataSource" : {
"type" : "object",
"$ref" : "urn:jsonschema:com:emc:brs:policy:msg:DataSource",
}
}
}
When my co-worker runs the exact same code on his mac, he gets the desired output schema:
{
"type" : "object",
"id" : "urn:jsonschema:com:emc:brs:policy:msg:ds:CreateDataSourceRequest",
"properties" : {
"className" : {
"type" : "string",
"required" : true
},
"messageVersion" : {
"type" : "string",
"required" : true,
"description" : "The version of this message",
"enum" : [ "1" ]
},
"dataSource" : {
"type" : "object",
"id" : "urn:jsonschema:com:emc:brs:policy:msg:DataSource",
"properties" : {
"hosts" : {
"type" : "array",
"required" : true,
"description" : "Reference to the credentials object if applicable",
"items" : {
"type" : "object",
"id" : "urn:jsonschema:com:emc:brs:policy:msg:Host",
"properties" : {
"hostname" : {
"type" : "string"
},
"ipv6Address" : {
"type" : "string"
},
"name" : {
"type" : "string",
"description" : "Optional alias or name of the object"
},
"ipv4Address" : {
"type" : "string"
},
"osType" : {
"type" : "string"
},
"attributes" : {
"type" : "object",
"description" : "List of attributes for the object",
"additionalProperties" : {
"type" : "string"
}
},
"uuid" : {
"type" : "string",
"required" : true,
"description" : "Unique id of this object"
},
"tags" : {
"type" : "object",
"description" : "List of tags for the object",
"additionalProperties" : {
"type" : "string"
}
}
}
}
},
"paths" : {
"type" : "array",
"required" : true,
"description" : "List of paths and/or compound paths to back up",
"items" : {
"type" : "string"
}
},
"name" : {
"type" : "string",
"description" : "Optional alias or name of the object"
},
"options" : {
"type" : "object",
"id" : "urn:jsonschema:com:emc:brs:policy:msg:Options",
"properties" : {
"name" : {
"type" : "string",
"description" : "Optional alias or name of the object"
},
"flags" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
},
"attributes" : {
"type" : "object",
"description" : "List of attributes for the object",
"additionalProperties" : {
"type" : "string"
}
},
"pid" : {
"type" : "integer"
},
"uuid" : {
"type" : "string",
"required" : true,
"description" : "Unique id of this object"
},
"version" : {
"type" : "string"
},
"tags" : {
"type" : "object",
"description" : "List of tags for the object",
"additionalProperties" : {
"type" : "string"
}
}
}
},
"attributes" : {
"type" : "object",
"description" : "List of attributes for the object",
"additionalProperties" : {
"type" : "string"
}
},
"uuid" : {
"type" : "string",
"required" : true,
"description" : "Unique id of this object"
},
"creds" : {
"type" : "object",
"$ref" : "urn:jsonschema:com:emc:brs:policy:msg:Creds"
},
"dataSourceType" : {
"type" : "string",
"required" : true,
"description" : "The type of data source",
"enum" : [ "FILE_SYSTEM", "FILE_SYSTEM_TRADITIONAL", "FILE_SYSTEM_INCREMENTAL_FOREVER", "DB2", "EXCHANGE", "HYPER_V", "INTERNAL", "LOTUS", "NAS_DEVICE", "ORACLE", "SAP", "SHAREPOINT", "SQL", "SYBASE", "VMWARE", "UNKNOWN" ]
},
"tags" : {
"type" : "object",
"description" : "List of tags for the object",
"additionalProperties" : {
"type" : "string"
}
}
}
}
}
}
I am at a loss for what could be causing this beyond some sort of nasty/inconsistent interaction between Jackson and the JVM implementations. Have you seen anything like this before? Is there anything obvious I should try as a workaround?
The text was updated successfully, but these errors were encountered: