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

Wrong schema generation of `Object[]` for OpenAPI 3.1

Open ML-Marco opened this issue 11 months ago • 0 comments

Schema generation for object array is broken in OpenAPI 3.1.

Create a class with an object array field and resolve the schema for it:

private Object[] objectArray;

Set a breakpoint here and inspect the schema before and after. After the call items of the ArraySchema has no more information (e.g. type = object).

The serialized schema looks like this:

          "objectArray": {
            "type": "array",
            "items": {

            }
          }

ML-Marco avatar Nov 07 '24 15:11 ML-Marco