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

Add names to Enums #52

Closed
Serpentarius13 opened this issue Sep 13, 2024 · 2 comments
Closed

Add names to Enums #52

Serpentarius13 opened this issue Sep 13, 2024 · 2 comments

Comments

@Serpentarius13
Copy link

Serpentarius13 commented Sep 13, 2024

According to that, for reusable enum generation (which would fix generating tons of exactly-the-same-not-compatible-with-eachother-enums on frontend), we need to add enumName property to ApiProperty. I think we can do it now fairly easily, because the name of enums could match import exactly. Otherwise, on every route there's a new enum and its literally unusable

p.s. I wonder what should I do to contribute? What's the process? @Brakebein

@Brakebein
Copy link
Owner

enumName is now added to ApiProperty. Please checkout 1.24.0-beta1.

@Serpentarius13
Copy link
Author

Thanks!

Brakebein added a commit that referenced this issue Sep 30, 2024
ablyeom added a commit to ablyeom/prisma-generator-nestjs-dto that referenced this issue Jan 21, 2025
* brakebein/main:
  version 1.24.1
  fix Decimal type definition Brakebein#63
  version 1.24.0
  update readme
  deprecate outputApiPropertyType
  fix @DtoRelationRequired Brakebein#54
  change DtoApiOverrideType to DtoOverrideApiPropertyType Brakebein#54
  fix encapsulateString for null Brakebein#58
  fix encapsulateString for date strings Brakebein#58
  add @DtoCreateRequired decorator Brakebein#55
  replace DtoCastType with DtoOverrrideType Brakebein#54
  fix don't generate enums.ts if there are no enums defined
  add flag to show fields with default attribute by default Brakebein#51
  add enumName to ApiProperty Brakebein#52
  generate enums if noDependencies = true Brakebein#48
  wrap relations as type to fix circular dependencies Brakebein#49
  shorten duplicate code checks on double imports
  sort all imports
  shorten duplicate code to make class-validator imports
  fix ApiProperty default value if field is a list
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

2 participants