swagger-codegen-tooling icon indicating copy to clipboard operation
swagger-codegen-tooling copied to clipboard

Generation does not work with splitted files

Open jbellmann opened this issue 9 years ago • 9 comments

Have a look on #21 last comment.

jbellmann avatar Dec 08 '15 09:12 jbellmann

any news on this ? i also have this problem

XtreZz avatar Dec 11 '15 08:12 XtreZz

Not yet. Had no time to look into it the last 3 days. Sorry.

But could you provide a simple 2 file example swagger-definition please. That could improve speed when resolving this issue ;-)

jbellmann avatar Dec 11 '15 10:12 jbellmann

Hi,

I am also having this issue. The generation is working but not for collections with generics:

"fooList": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },

Should look like this:

private Map<String, String> fooList;

but generates this:

private String fooList;

stephenlynch avatar Dec 16 '15 15:12 stephenlynch

Any idea if this will be fixed.

jbadeau avatar Feb 09 '16 16:02 jbadeau

Hi, I had a look into the code-generator documentation and did not found any hint that it is possible to use more than one spec-file (it's the -i parameter, right?). So we only could build a custom file-merge and present that to the code-generator.

Do you have more information about using multiple spec-files for the code-generator?

jbellmann avatar Feb 26 '16 10:02 jbellmann

In swagger specs you have the option to reference external elements like:

$ref: '../common/Definitions.yaml#/Error'

jbadeau avatar Feb 26 '16 10:02 jbadeau

Yes I read that also somewhere in the net, and also that the 'swagger-editor' supports that. But the 'code-generator' only supports one, right? And we only delegate to that generator. I will try it.

jbellmann avatar Feb 26 '16 10:02 jbellmann

The swagger generator supports it. Yes, I think you need only delegate.

jbadeau avatar May 13 '16 12:05 jbadeau

I'm also interested on this fix

gitLinda avatar Jun 22 '16 13:06 gitLinda