Skip to content

Open Api fails to generate correct schema type for some properties #61407

Open
@mattiasnordqvist

Description

@mattiasnordqvist

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Image

Image

generates this schema

Image

Expected Behavior

I would expect this schema

"D": {
  "required": [
    "b",
    "c"
  ],
  "type": "object",
  "properties": {
    "b": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/B"
      }
    },
    "c": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/B"
      }
    }
  }
}

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

9.0.4

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions