prisma-generator-nestjs-dto icon indicating copy to clipboard operation
prisma-generator-nestjs-dto copied to clipboard

Wishes / Ideas

Open weihsth opened this issue 3 years ago • 6 comments

Good Morning,

I have two ideas for extension:

FIRST: Maybe I just did not see it, but how can I set the import path of prisma client? I use a different path of prisma client and need to set this as option to nestjsDto generator.

have: import {Enum_UserSalutation} from '@prisma/client

want: import {Enum_UserSalutation} from '@db'

SECOND: Would be nice to have an generated index.ts file with all exports, like:

export { default as A } from "./a";
export { default as B } from "./b";
[...]

Have a great day!

weihsth avatar Nov 11 '21 08:11 weihsth

I believe your SECOND request is what the reExport option is there for.

For the FIRST: PR welcome

benkroeger avatar Nov 11 '21 09:11 benkroeger

Ohh sorry, you're right.. should have searched for "index"... I'll try my best to get the import path of prisma client done an do a PR =)

weihsth avatar Nov 11 '21 10:11 weihsth

Coming up with Wishes/Ideas I taught I will chip in, what would you think about adding formatting command to config @benkroeger ? So that after generating files it would automatically align them to project code-style because right now I'd have to go trigger something like npm run format after each regeneration of DTOs

bmxpiku avatar Jan 25 '22 11:01 bmxpiku

re formatting see #92

benkroeger avatar Mar 17 '22 13:03 benkroeger

Would wish to see the following feature(s) but please do at a pace that maintainers are comfortable in:

  • Automatic Swagger inclusion in generated Classes

hengnee avatar Apr 20 '22 12:04 hengnee

I wish for more examples of the usage of annotations.

Manugr21 avatar Apr 27 '22 01:04 Manugr21