Closed tbrannam closed 3 years ago
I haven't a clue on how to make a PR for the Wiki
@Crud({
...
crudRoutesFactory?: typeof CrudRoutesFactory
...
})
Optional
Allow customization of the CrudRoutesFactory to allow for specialization of Swagger documentation. Callers should subclass CrudRoutesFactory and pass the Class to the options.
This is awesome. We need this! It is not a very big change either. Can anybody please approve this?
@tbrannam Can we also export the crud
dir from root index.ts
? BR
@zMotivat0r your 5.0.0-alpha.0
release does not seem to contain this change...
Can neither find it in my node_modules
nor in the downloaded zip from the release page. It is also not contained in master nor v5 source...
e.g. https://github.com/nestjsx/crud/blob/v5/packages/crud/src/interfaces/crud-options.interface.ts
Did you revert it by any chance?
@cschuff sorry for that but I have no idea why this happened. As you can see it says that it merged bit it's very weird. I'll fix it
It's an alpha, so who cares 😜
Thanks man 🙏🏻
@cschuff fixed in 5.0.0-alpha.1
@zMotivat0r Thanks.
Sorry to bother you again, but:
Unfortunately the methods in CrudRoutesFactory are still private
while most of them should be protected
according to
https://github.com/nestjsx/crud/pull/629/files#diff-1b3296236a76cc2e63c59fed4251b70162913dd6dc759629f6aad1bf6e6fabfcL44
@cschuff please double check it. Here is the brand new test project with the latest @nestjsx/crud
package installed
🙈 you are right, my fault...
Sorry for bothering!
CrudRoutesFactory has a number of important elements related to Swagger generation that is generally hidden. By providing a subclass of CrudRoutesFactory to @Crud options, one is able to expose hooks to allow customization of Swagger documentation.
The author is primarily concerned with being able to customize the opererationId to reduce the length of identifiers used by common Code-generation tools.