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

[HTML2] Undefined response schema when is of type array

Open GrzegorzKowalik opened this issue 7 years ago • 2 comments

Description

API documentation generated used HTML2 language gives 'undefined' schema when it's of type array. To see the schema you need to wind and unwind it, as shown on photos.

image image image

Swagger-codegen version

2.3.1

Swagger declaration file content or url
     responses:
        200:
          description: "Some description"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/SomeDefinition"
Command line used for generation
java -jar webservice/docs/swagger-codegen-cli.jar generate \
    -i webservice/swagger/swagger.yaml \
    -l html2 \
    -o webservice/docs/API_docs
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

I have 3 responses of array type and each one has this problem, returning response as object works fine, so I'm sure it's because of the array response

GrzegorzKowalik avatar Feb 23 '18 13:02 GrzegorzKowalik

This issue also applies on Swagger-codegen version 3.0.5.

Janos-Sur avatar Feb 25 '19 16:02 Janos-Sur

Hey team, how come this one doesn't have more activity? Feels like an issue that should be resolved?

lcardito avatar Oct 27 '23 09:10 lcardito