You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@NotNull(message = "discount type must not be null") @Schema(type = SchemaType.STRING, description = "Discount type", example = "INVOICE_EXPENSE",
enumeration = {"INVOICE_EXPENSE", "CONTRIBUTION_MARGIN", "INVESTMENT"})
private DiscountType type;
the DiscountType is enum
however when I run the build the yaml generates like this:
roperties:
type:
allOf:
- $ref: '#/components/schemas/DiscountType'
- description: Discount type
enum:
- INVOICE_EXPENSE
- CONTRIBUTION_MARGIN
- INVESTMENT
example: INVOICE_EXPENSE
nullable: false
if I set the object type then the type is set in the yaml correctly, but with string it does not generate and with that I am having problems importing the yaml in the redocly, apparently it is ignoring the STRING type and if I put it in the yaml manually it works, how can i fix this
Expected behavior
when I put the type STRING the yaml is generated like this:
It's a workaround, but instead of type = SchemaType.STRING you can try implementation = String.class and it should give the expected results. You should not see the $ref in that case.
Describe the bug
i have the following code:
@NotNull(message = "discount type must not be null")
@Schema(type = SchemaType.STRING, description = "Discount type", example = "INVOICE_EXPENSE",
enumeration = {"INVOICE_EXPENSE", "CONTRIBUTION_MARGIN", "INVESTMENT"})
private DiscountType type;
the DiscountType is enum
however when I run the build the yaml generates like this:
roperties:
type:
allOf:
- $ref: '#/components/schemas/DiscountType'
- description: Discount type
enum:
- INVOICE_EXPENSE
- CONTRIBUTION_MARGIN
- INVESTMENT
example: INVOICE_EXPENSE
nullable: false
if I set the object type then the type is set in the yaml correctly, but with string it does not generate and with that I am having problems importing the yaml in the redocly, apparently it is ignoring the STRING type and if I put it in the yaml manually it works, how can i fix this
Expected behavior
when I put the type STRING the yaml is generated like this:
roperties:
type:
allOf:
- $ref: '#/components/schemas/DiscountType'
- description: Discount type
enum:
- INVOICE_EXPENSE
- CONTRIBUTION_MARGIN
- INVESTMENT
example: INVOICE_EXPENSE
nullable: false
type: string
Actual behavior
roperties:
type:
allOf:
- $ref: '#/components/schemas/DiscountType'
- description: Discount type
enum:
- INVOICE_EXPENSE
- CONTRIBUTION_MARGIN
- INVESTMENT
example: INVOICE_EXPENSE
nullable: false
How to Reproduce?
No response
Output of
uname -a
orver
Linux 09VM9QBRB05627 5.19.0-50-generic #50-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 18:24:29 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux uilliampiva@09VM9QBRB05627
Output of
java -version
openjdk version "11.0.19" 2023-04-18 LTS
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.9.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: