-
Notifications
You must be signed in to change notification settings - Fork 57
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
Generate Client for Specific Entities with in an EDMX #4931
Comments
Hi @nsathya2010 , Thank you for raising this. This would indeed be a nice feature in both the generators. |
Hi @deekshas8, Thanks for the acknowledgement. Do you know any workaround for this. We are deploying 450 + files including transpiled JS. However, we only need 15 files max. |
Hi @deekshas8 , I have a fork and I added few lines of code to filter the entities, could you please take a look if it is any good. I had added only of the OData Generator for now. Thanks, |
Hi @nsathya2010 , Did you try this out for your service? Is it working the way you expect? I briefly looked at the fork, and while having a list of string for entities to ignore would be the way to go, I see some potential issues.
You can use the changes the at you have made if it's working for your use-case and create a PR contribution if you'd like to work on this further. Regarding maybe reducing the number of transpiled files, you can skip generation of declaration and source map files (if you don't need them) by passing your own tsconfig. The SDK by default generates them. |
Hi @deekshas8 , It did work for me and the generated/transpiled files are now in production as it reduced 250+files. However, my service was OData V4. I made it work my copying the /dist and generated the files programmatically (not via CLI). Thanks for the feedback. I will go through the v2 API name mapping and think about reversing the parameter I will try and make more tests and raise a PR if it is ready. Thanks, |
Is your feature request related to a problem? Please describe.
I’m always cumbersome to handle too many files when I need to generate OData clients for services with multiple entities, but I only require a client for a specific entity The current generator does not support generating clients for individual entities, leading to unnecessary code and increased complexity.
Describe the solution you’d like
I would like the SAP Cloud SDK OData client generator to support an option to generate clients for specific entities only. This could be achieved by providing an --include-entity/--exclude-entity flag or similar, allowing users to specify the entities they need.
Describe alternatives you’ve considered
I have considered manually editing the generated code to remove unwanted entities, but this is time-consuming and error-prone. Another alternative is to use the include option to specify files, but this does not address the need to filter entities within a single service specification.
Impact / Priority Affected development phase: Development, increased deployment size
Impact: Inconvenience
Additional context: This feature would greatly streamline the development process by reducing the amount of unnecessary code and simplifying the client generation process. It would also help in maintaining cleaner and more manageable codebases.
The text was updated successfully, but these errors were encountered: