Skip to content

Conversation

@ahaigh1
Copy link

@ahaigh1 ahaigh1 commented Nov 15, 2019

Following the previous change, code may now be generated for endpoints with multiple authentication types. If an endpoint with multiple authentication types generates a Builder, this causes a naming collision and compilation error as we attempt to generate multiple builders with the same name

This change uses the existing prefix that was already applied to the Requests classes to Builders to avoid this issue

It is a breaking change for existing consumers though the effect is minimal as it only affects places where the calling code makes explicit reference to the builder's type

@greg-db greg-db requested a review from jiuyangzhao November 15, 2019 19:54
prefix = self._args.requests_classname_prefix or self._args.client_class
package = self.java_class(route).package
return JavaClass(package + '.' + classname(format_func_name(route) + '_builder'))
return JavaClass(package + '.' + classname(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is backward-incompatible. Like GetMetadataBuilder will become DbxUserGetMetadataBuilder. It would be great if we add prefix only for routes with multiple auth

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, updated

@jiuyangzhao jiuyangzhao merged commit 5751983 into dropbox:master Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants