Skip to content

springdoc-openapi-starter-webmvc-ui 2.8.3 does not generate "required" properties #2871

Closed
@gertjanschouten

Description

@gertjanschouten

Since upgrading to springdoc-openapi-starter-webmvc-ui 2.8.3 (in combination with spring boot 3.4.1), properties are no longer marked as "required" in the generated openapi spec. All properties are still there, it's just that the entire "requires" list of required properties is no longer there.

For example, in 2.7.0, you would get this:

      "MyObject": {
        "type": "object",
        "properties": {
          "property1": {
            "type": "string"
          },
          "property2": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "property1"
        ]
      }

Then, in 2.8.3, it becomes this:

      "MyObject": {
        "type": "object",
        "properties": {
          "property1": {
            "type": "string"
          },
          "property2": {
            "type": "string",
            "format": "uuid"
          }
        }
      }

We had to revert to 2.7.0 for the time being.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions