--
You received this message because you are subscribed to the Google Groups "jsonschema2pojo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema2pojo-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks for the detailed answer.
{
"title" : "A",
"description" : "A",
"$schema": "http://json-schema.org/draft-03/schema",
"id": "com.example.common.A",
"type": "object",
"properties": {
"Name": {
"type": "string",
"required": true
}
}
}
{
"$schema": "http:\/\/json-schema.org\/draft-04\/schema#",
"title": "B",
"description": "B",
"type": "object",
"properties": {
"A": {
"javaType" : "com.example.common.A",
"$ref" : "../../../../../A/src/main/resources/schema/A.json"
}
}
}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>B</groupId>
<artifactId>B</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>B</name>
<description>B</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
<version>0.4.5</version>
<configuration>
<sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory>
<targetPackage>com.example.specific</targetPackage>
</configuration>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>A</groupId>
<artifactId>A</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
</project>
Tested and works (classpath handling). Looking forward the .json handling in 0.3.5Thanks for the detailed answer.
Yes, jsonschema2pojo does support resource: type URIs to read from the classpath.
Regarding refs and javaType, remember that the ref replaces THE ENTIRE content at that node, so none of the properties alongside the ref have any effect. Hopefully this makes the behavior easier for you to understand.
--
You received this message because you are subscribed to the Google Groups "jsonschema2pojo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema2pojo-...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsonschema2pojo-users.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema2pojo-users+unsub...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsonschema2pojo-users.
For more options, visit https://groups.google.com/d/optout.
"title": "B",
"description": "B",
"type": "object",
"properties": {
"A": {
"$ref" : "resource:/schema/A.json"
}
}
}
{
"title" : "A",
"description" : "A",
"$schema": "http://json-schema.org/draft-03/schema",
"id": "com.example.common.A",
"type": "object",
"javaType":"com.example.common.A",
"properties": {
"Name": {
"type": "string",
"required": true
}
}
}
{
"schema": "http://json-schema.org/draft-03/schema",
"title": "B",
"description": "B",
"type": "object",
"properties": {
"A": {
"$ref" : "resource:/schema/A.json"
}
}
}
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema2pojo-...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "jsonschema2pojo-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsonschema2pojo-users/b7QOQuIXuGE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsonschema2pojo-...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsonschema2pojo-users.
For more options, visit https://groups.google.com/d/optout.
Daniel Chaffee
Sr. Software Architect, NG7
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema2pojo-users+unsubscri...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsonschema2pojo-users.
For more options, visit https://groups.google.com/d/optout.
This message, and any documents attached hereto, may contain confidential or proprietary information intended only for the use of the addressee(s) named above or may contain information that is legally privileged. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message and any copies immediately thereafter. Thank you for your cooperation.
This message, and any documents attached hereto, may contain confidential or proprietary information intended only for the use of the addressee(s) named above or may contain information that is legally privileged. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message and any copies immediately thereafter. Thank you for your cooperation. --
You received this message because you are subscribed to the Google Groups "jsonschema2pojo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema2pojo-users+unsub...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsonschema2pojo-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "jsonschema2pojo-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsonschema2pojo-users/b7QOQuIXuGE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsonschema2pojo-users+unsub...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsonschema2pojo-users.
For more options, visit https://groups.google.com/d/optout.
--Daniel Chaffee
NEXTGEN HEALTHCARE
Sr. Software Architect, NG7
Solutions for: Ambulatory, Inpatient and Community Connectivity
12301-B Riata Trace Pkwy., Suite 200, Austin, TX 78727
(321) 271-9096 [o]
dcha...@nextgen.com or dcha...@mirthcorp.comNOTICE: This email and its attachments, if any, may contain confidential or proprietary information and are intended solely for authorized use by the intended recipient(s) only. Any other use of this email is prohibited. If you have received this email in error, you are hereby notified that any retention, disclosure, copying, forwarding, distribution (in whole or in part and whether electronically, written and/or orally) and/or taking of any action in reliance on this email, its contents and/or any attachments thereto is strictly prohibited. If you received this email in error, please notify the sender by replying to this message and permanently delete this email, and any attachments thereto, from your system immediately.