Closed pmg1991 closed 1 year ago
You have embedded your enum, so the class is embedded as it is local to the OpenAPI type. If you want to make a global enum, create a first class object, e.g.:
components:
schemas:
OrderStatusType:
type: string
enum:
- NONE
- PENDING
- ...
-
and then use it as a $ref
@rvowles Thanks, this got resolved by https://github.com/springdoc/springdoc-openapi/issues/232#issuecomment-748607672
Describe the bug With given yaml below two enums are created which are local to each class
Expected behavior single OrderStatus enum created
To Reproduce Sample yaml OrderStatusUpdateReq: type: object properties: orderId: type: integer format: int64 orderStatus: type: string enum: