Skip to content

[Bug]: [OpenAPI3] Inconsistent constraints for generic type vs concrete type #6368

Open
@albertxavier100

Description

@albertxavier100

Describe the bug

In the example, B.x has constraint maxLength: 100 while BB.x has constraint maxLength: 1

e.g. Since BB use allOf and validation will pass the maxLength: 100 but when validating '#/components/schemas/AA', it will failed.

The constraint should be intersection.
The problem should caused by inline the properties from generic types. We use $ref for concrete types which doesn't produce the problem.

Reproduction

playground

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions