springdoc-openapi-demos icon indicating copy to clipboard operation
springdoc-openapi-demos copied to clipboard

Missing array type when using @ArraySchema with OpenAPI 3.1

Open taylortails opened this issue 8 months ago • 0 comments

If you run the example demo-spring-boot-3-webmvc

navigate to http://localhost:8081/v3/api-docs

you notice that:

    "/pet/findByTags": {
...
        "responses": {
...
          "200": {
...
              "application/json": {
                "schema": {
                  "type": "array", # <- this line is missing
                  "items": {
                    "$ref": "#/components/schemas/Pet"
                  }
                }

If you disable in application.yaml

springdoc:
  #api-docs:
    #version: openapi_3_1

the type isnt missing.

taylortails avatar Jun 06 '24 06:06 taylortails