5

I am using swagger codegen (on this Zoura swagger) to create a Java/rest template client. I am using the swagger Gradle plugin:

id "org.hidetake.swagger.generator" version "2.11.0"

Here is the config for it:

{
  "library": "resttemplate",
  "dateLibrary": "java8",
  "hideGenerationTimestamp": true,
  "modelPackage": "zuora.model",
  "apiPackage": "zuora.api",
  "invokerPackage": "zuora",
  "clientPackage" : "zuora.client"
}

The client does get generated, however even though there are many optional fields they are not getting created as such and everything is required. Am I missing something?

Alexey
  • 5,898
  • 9
  • 44
  • 81
codesalsa
  • 882
  • 5
  • 18
  • As per the code generation doc "For all the unspecified options default values will be used." Try to add "configPackage" to your configuration https://github.com/swagger-api/swagger-codegen/issues/7601 – Rizwan May 18 '18 at 10:37
  • Thanks @Rizwan, that looks to talk about the server. I am trying to create a client. All generated content is appropriately packaged. – codesalsa May 18 '18 at 17:04

1 Answers1

0

I just had this issue and solved it like this:

<configOptions>
     <fullJavaUtil>false</fullJavaUtil>
</configOptions>

If you look at the code, you will find that the condition is inverted.

Stefa
  • 656
  • 5
  • 13