swagger-api/swagger-codegen

Array doesnt accept multiple entries in JAX-RS

Open

#2,961 opened on May 25, 2016

View on GitHub
 (4 comments) (0 reactions) (0 assignees)HTML (12,701 stars) (5,474 forks)batch import
Issue: BugServer: Javahelp wanted

Description

I recently opened a bug in swagger-ui, but now I think its a problem with swagger codegen. This is the related post: https://github.com/swagger-api/swagger-ui/issues/2175

When I build Code out of a spec which has an Array the Code seems to be right, but when I run I can have max. 1 entry. It doesnt recognize a "," with the collectionFormat csv. It also doesnt work with a "|" when i choose pipe as collection Format. Here is the spec:

"parameters": [
  {
    "name": "api_key",
    "in": "header",
    "description": "description",
    "required": true,
    "type": "array",
    "items": {
      "type": "string"
    },
    "collectionFormat": "csv"
  }
]

Im build a JAX-RS -Jersey server and the swagger Codegen version is 2.1.6 and I run the Code with this:

-i swaggerPolicy.json \
  -l jaxrs \
  -o D:\Dateien\swagger_restacl_integration\SwaggerRestaclIntegration

Contributor guide

Array doesnt accept multiple entries in JAX-RS · swagger-api/swagger-codegen#2961 | Good First Issue