Skip to content

Compatibility with exclusiveMinimum in OpenAPI 3.0.0 vs. 3.1.0 #22943

@raichuchuchu

Description

@raichuchuchu

We've encountered an issue when using openapi-generator with an OpenAPI specification that utilizes exclusiveMinimum for number properties. Specifically, the syntax for exclusiveMinimum differs between OpenAPI Specification 3.0.0 and 3.1.0, and openapi-generator currently only seems to support the 3.0.0 syntax.

In our file, for a property like PriceDTO.originalPrice, we need to define exclusiveMinimum.

OpenAPI 3.0.0 syntax for exclusiveMinimum:

type: number
exclusiveMinimum: true
minimum: 0

OpenAPI 3.1.0 syntax for exclusiveMinimum (as per specification):

type: number
exclusiveMinimum: 0

When our openapi.yaml uses the 3.1.0 style for exclusiveMinimum, openapi-generator fails to correctly process the schema, leading to generation errors or incorrect model definitions.

We would like to inquire if there are plans to update openapi-generator to fully support the OpenAPI 3.1.0 syntax for exclusiveMinimum, or if there's a recommended workaround for this compatibility issue.

This issue impacts our ability to seamlessly upgrade our OpenAPI specifications to 3.1.0 while continuing to use openapi-generator for client/server code generation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions