fix(java): default values from allOfs are not correctly definied (#22200)

* fix: extend check for default values of integer and number schema

* add testcases to openapi specs

* generate java clients with the updated fix
This commit is contained in:
Marcel Jacek
2025-10-31 08:58:20 +01:00
committed by GitHub
parent 9b8ab659ac
commit 66b742038a
65 changed files with 3848 additions and 5 deletions

View File

@@ -2295,6 +2295,42 @@ components:
$ref: "#/components/schemas/Bar"
type: array
type: object
LongId:
description: Id as long
format: int64
type: integer
Weight:
description: Weight as float
format: float
type: number
Height:
description: Height as double
format: double
type: number
AllOfRefToLong:
description: Object with allOf ref to long
properties:
id:
allOf:
- $ref: "#/components/schemas/LongId"
default: 10
type: object
AllOfRefToFloat:
description: Object with allOf ref to float
properties:
weight:
allOf:
- $ref: "#/components/schemas/Weight"
default: 7.89
type: object
AllOfRefToDouble:
description: Object with allOf ref to double
properties:
height:
allOf:
- $ref: "#/components/schemas/Height"
default: 32.1
type: object
_foo_get_default_response:
example:
string: