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
I have a Java api and I use swagger-maven-plugin to generate an api-file.yaml.
Then I use ng-openapi-gen and the api-file.yaml to generate the api in my angular application.
The problem is that I cannot reuse my Java enum as type in my angular application.
Here is the api-file.yaml content :
openapi: 3.0.1paths:
/users:
get:
operationId: getUserresponses:
default:
description: default responsecontent:
application/json:
schema:
type: arrayitems:
$ref: '#/components/schemas/UserDto'/users/{userId}/etiquettes:
get:
operationId: getEtiquettesparameters:
- name: userIdin: pathrequired: trueschema:
type: integerformat: int64responses:
default:
description: default responsecontent:
application/json:
schema:
type: arrayitems:
$ref: '#/components/schemas/EtiquetteDto'components:
schemas:
UserDto:
type: objectproperties:
userId:
type: stringetiquettes:
type: arrayitems:
type: stringenum:
- WHITE
- GREY
- BLACK
- RED
- GREEN
- BLUE
- YELLOW
- ORANGEEtiquetteDto:
type: objectproperties:
color:
type: stringenum:
- WHITE
- GREY
- BLACK
- RED
- GREEN
- BLUE
- YELLOW
- ORANGEname:
type: string
Hello,
I have a Java api and I use swagger-maven-plugin to generate an api-file.yaml.
Then I use ng-openapi-gen and the api-file.yaml to generate the api in my angular application.
The problem is that I cannot reuse my Java enum as type in my angular application.
Here is the api-file.yaml content :
And the generated models using ng-openapi-gen :
Is there any way to also generate an
export type Color
so I can use it in the angular application ?Thanks in advance,
The text was updated successfully, but these errors were encountered: