raml-for-jax-rs icon indicating copy to clipboard operation
raml-for-jax-rs copied to clipboard

How to handle XSD imports

Open justjacksonn opened this issue 10 years ago • 3 comments

Hi all,

I may be doing something wrong, but I have an XSD in path1/name.xsd that uses the xsd:import feature to import a relative path XSD ../path2/name2.xsd. The import is used due to the path2/name2.xsd having a different target namespace. When using the java code to run jax-rs generation, it seems that the use of the imported xsd fails due to what I assume is not able to find/load the relative path imported xsd.. which makes me wonder if this is an issue with how the jax-rs is using the jackson library (I think it's using jackson) to generate pojos from xsds. Anyone have any insight on this?

Mind you.. we can't change the use of ../path2 in our XSD import statement as it would break our build system and how it finds the XSDs to build things. I am looking in to converting this to Json Schema as well to see if that will solve the problem, but would like to understand better how the JAX-RS generator works with XSDs importing other XSDs.

justjacksonn avatar Jan 29 '15 23:01 justjacksonn

Hi This feature depends from https://github.com/raml-org/raml-java-parser/pull/51

As soon as it will integrated we will get it automatically.

Regards, Pavel

petrochenko-pavel-a avatar Feb 05 '15 21:02 petrochenko-pavel-a

Hi Pavel,

Will this also help in case I use a reference in a JSON schema to another JSON schema?

Regards, Jeroen

jeroenver avatar Jul 03 '15 11:07 jeroenver

Ping - any progress on this?

davidkarlsen avatar Aug 17 '15 12:08 davidkarlsen