swagger-api/swagger-codegen

Array doesnt accept multiple entries in JAX-RS

オープン

#2,961 opened on 2016/05/25

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)HTML (5,474 件のフォーク)batch import
Issue: BugServer: Javahelp wanted

Repository metrics

Stars
 (12,701 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド