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

Tapiro generation bug when there are duplicate names for commands in different controllers #349

Closed
tpetrucciani opened this issue Mar 4, 2021 · 0 comments · Fixed by #350
Assignees
Labels
BE maint bug Something isn't working 🐭tapiro

Comments

@tpetrucciani
Copy link
Contributor

The *RequestPayload classes that are autogenerated by tapiro (introduced by #212) are named (CommandName)RequestPayload and are all placed in the same package.

As a result, if there are two different controllers that use the same command name (e.g. AController and BController both with @command create(...)), tapiro generates two classes CreateRequestPayload in the same package, and the code does not compile.

Solution: disambiguate the class names or, probably better, generate the classes inside object *TapirEndpoints so they are in different namespaces.

cc @stefanosambruna

@tpetrucciani tpetrucciani added bug Something isn't working 🐭tapiro BE maint labels Mar 4, 2021
@tpetrucciani tpetrucciani self-assigned this Mar 4, 2021
tpetrucciani added a commit that referenced this issue Mar 8, 2021
#349: Tapiro generation bug when there are duplicate names for commands in different controllers
@kanbanbot kanbanbot removed the WIP label Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE maint bug Something isn't working 🐭tapiro
Projects
None yet
2 participants