springdoc / springdoc-openapi-demos

Demo for OpenAPI 3 with spring-boot
http://springdoc.org
Apache License 2.0
511 stars 274 forks source link

Missing array type when using @ArraySchema with OpenAPI 3.1 #68

Open taylortails opened 4 months ago

taylortails commented 4 months ago

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.