Skip to content

[OpenAPI] integers have additional string type with pattern #61038

Open
@martincostello

Description

@martincostello

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

It might be this is a feature, and I just haven't seen the change documentation for it.

For integer properties in OpenAPI 3.0 documents, the schema has gained string and a pattern. For example:

age: {
+ pattern: ^-?(?:0|[1-9]\d*)$,
  type: [
    null,
-   integer
+   integer,
+   string
  ],
  description: The age of the dog, if known.,
  format: int32
}

Expected Behavior

If this isn't intentional, then the string typeandpattern` should not be emitted.

Steps To Reproduce

  1. Clone martincostello/openapi-extensions@e660bb4
  2. Run dotnet test from the root of the repository

Exceptions (if any)

No response

.NET Version

10.0.100-preview.2.25164.34

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions