$ go list -m github.com/ogen-go/ogen
github.com/ogen-go/ogen v1.4.1
Can this issue be reproduced with the latest version?
Yes
What did you do?
Creating a custom type and referencing that with $ref, then using keywords such as default, x-ogen-name, minimum etc. will apply these keywords to all instances.
See the following example where I create the custom type Decimal and then use this for both price and gratuity, but only set a default value on gratuity.
What version of ogen are you using?
Can this issue be reproduced with the latest version?
Yes
What did you do?
Creating a custom type and referencing that with
$ref
, then using keywords such asdefault
,x-ogen-name
,minimum
etc. will apply these keywords to all instances.See the following example where I create the custom type
Decimal
and then use this for bothprice
andgratuity
, but only set a default value ongratuity
.What did you expect to see?
I expected
gratuity
to have the default value5.00
andprice
to not have a default value.What did you see instead?
Both
price
andgratuity
have the default value5.00
.