Open robblovell opened 1 year ago
Hey, this looks good. Feel free to submit the PR whenever you are ready.
Can you share details about which Prisma generators you are using? I may want to add a note about it in the main docs, and keep the specifics of it in mind during the work I'm targeting for the next few months...
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
I am using a set of prisma generators which do not remove the plural endings for dtos or entities. I would like to leverage the generated dto's and entities of the other generator and overwrite the dto's and entites generated by this package and keep the controllers. However, when the 's' or 'es' is removed, the two generators are incompatible.
Describe the solution you'd like
Looking at the code:
in resource.schema.d.ts:
In src/lib/crud-resource/crud-resource.factory.ts: Change line 100 to:
in src/lib/resource/resource.factory.ts: Change line 137 to:
in src/lib/resource/schema.json and src/lib/crud_resource/
schema.json
resource.schema.d.ts and crud-resource.schema.d.ts
I am uncertain of any other changes that would be required for publishing. I am working on a pull request here: feature-branch
Teachability, documentation, adoption, migration strategy
I believe if the flag defaults to true, it will not be a breaking change.
What is the motivation / use case for changing the behaviour?
By setting the pluralize flag to false, I can use both generators together.