3.1.x implementation of exclusiveMinimum/exclusiveMaximum not working
Roobxyz opened this issue · 1 comments
Roobxyz commented
Describe the bug
It looks like the 3.1.x exclusiveMaximum and exclusiveMimimum aren't working properly.
They appear to use the 3.0.x definition of bool instead of the numeric value in 3.1.x implementations (link in additional data below).
OpenAPI Spec File
openapi: 3.1.0
info:
title: Minimal Schema with exclusiveMinimum
version: "1.0.0"
paths: {}
components:
schemas:
ExampleNumber:
type: number
exclusiveMinimum: 5
Desktop (please complete the following information):
- OS: macOS 14.6.1
- Python Version: 3.12.5
- openapi-python-client version: 0.19.1
Additional context
OpenAPI Documentation
https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0
Search for exclusiveMinimum
Command run
❯ openapi-python-client generate --path "min.yaml"
Error(s) encountered while generating, client was not created
Failed to parse OpenAPI document
2 validation errors for OpenAPI
components.schemas.ExampleNumber.Reference.$ref
Field required [type=missing, input_value={'type': 'number', 'exclusiveMinimum': 5}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.7/v/missing
components.schemas.ExampleNumber.function-after[handle_nullable(), Schema].exclusiveMinimum
Input should be a valid boolean, unable to interpret input [type=bool_parsing, input_value=5, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/bool_parsing
Roobxyz commented
updated the tool and it works...