Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config "enumPropertyNaming" not working as expected #12385

Open
yog27ray opened this issue Apr 27, 2024 · 0 comments
Open

config "enumPropertyNaming" not working as expected #12385

yog27ray opened this issue Apr 27, 2024 · 0 comments

Comments

@yog27ray
Copy link

Description

Enum are generated without underscore

expected output

export enum ActionLogTypeEnum {
    REGIMEN_CHANGE = 'REGIMEN_CHANGE',
    INSTRUCTION_CHANGE = 'INSTRUCTION_CHANGE',
    INSTANT_CHECKUP_DELETE = 'INSTANT_CHECKUP_DELETE',
    INSTANT_CHECKUP_TYPE_CHANGED = 'INSTANT_CHECKUP_TYPE_CHANGED'
}

actual output

export enum ActionLogTypeEnum {
    REGIMENCHANGE = 'REGIMEN_CHANGE',
    INSTRUCTIONCHANGE = 'INSTRUCTION_CHANGE',
    INSTANTCHECKUPDELETE = 'INSTANT_CHECKUP_DELETE',
    INSTANTCHECKUPTYPECHANGED = 'INSTANT_CHECKUP_TYPE_CHANGED'
}

Yaml File

Swagger-codegen version

3.0.55

Swagger declaration file content or url
openapi: 3.0.3
info:
  title: Test Schema
  version: 0.0.1
paths: {}
components:
  schemas:
    ActionLog:
      type: object
      properties:
        type:
          type: string
          enum:
            - REGIMEN_CHANGE
            - INSTRUCTION_CHANGE
            - INSTANT_CHECKUP_DELETE
            - INSTANT_CHECKUP_TYPE_CHANGED
Command line used for generation

java -jar ./swagger-codegen-cli.jar generate -i ./test/test.schema.yaml -l typescript-axios -o ./test --additional-properties modelPropertyNaming=original enumPropertyNaming=original

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant