mulesoft-labs / raml-jaxrs-codegen

Tools to enable RAML-first development in JAX-RS projects
Other
40 stars 44 forks source link

!include schema files cant be resolved #9

Closed apallen closed 10 years ago

apallen commented 10 years ago

I am using raml-jaxrs-codegen with the mavin plugin to generate code from a RAML spec I have written using the API Designer. My spec has a schema section which !includes schema files located in the same directory as the raml file from which I am generating code.

When I try to compile I keep getting Include cannot be resolved error messages from the generator and I don't see why. Here is an example of the output

[ERROR] 25 Include cannot be resolved schema.accountsummary.json [ERROR] 18 Include cannot be resolved schema.account.json [ERROR] 19 Include cannot be resolved schema.accounts.json [ERROR] 19 Include cannot be resolved schema.customer.json

I have ${basedir}/src/main/resources/raml set in my pom.xml. This directory contains all the RAML files and related schemas. Do all schemas have to be defined inline? The jersey example has only inline schemas.

If raml-jaxrs-codegen can't be used to generate code from my RAML spec, all there alternate solutions? Please advise. Any help will be greatly appreciated.

svacas commented 10 years ago

could you provide the directory structure of your packaged app and a snippet of your RAML where you use the !include directive?

apallen commented 10 years ago

Hi,

Thanks for getting back to me. The work you guys are doing with RAML is really cool and the code generation tool will save even more time with implementation.

I modified the jersey-example to include external schema files. The modified version produces the same errors as my RAML spec.

Thanks for your help, Ashley

On Apr 4, 2014, at 8:08 AM, svacas wrote:

could you provide the directory structure of your packaged app and a snippet of your RAML where you use the !include directive?

— Reply to this email directly or view it on GitHub.

petrochenko-pavel-a commented 10 years ago

Should be fixed now.