I'm generating a client for a 3rd party API that has arrays in the request 
body of POST and PUT requests. When I generated my client with 
swagger-codegen, the methods for these endpoints will have only 1 object in 
the request body, instead of an array of objects.

I am currently using this package to generate:
`compile group: 'io.swagger', name: 'swagger-codegen-maven-plugin', 
version: '3.0.0-rc0'`

Any news on when an update is coming?

Also for those same endpoints, it is generating the local accepts array 
incorrectly in both the code and the doc as such:

final String[] localVarAccepts = {
    "application/json""application/json"
};



Here is an example of my spec:

"post": {
  "operationId": "createMyModel",
  "summary": "Create one or more MyModel objects",
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/MyModel"
          }
        }
      }
    }
  },
  "responses": {
    "207": {
      "description": "Success response",
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/MyModel" }
          }
        }
      }
    }
  }
}


Here is what the Function signature ends up looking like:

public List<MyModel> createCampaign(MyModel body) throws ApiException


Here is what I want:

public List<MyModel> createCampaign(List<MyModel> body) throws ApiException


Any news on when the next release is? I see 3.0.0-rc0 was released about a 
month ago.

Thanks,
-Jason

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to