Skip to content

Lengthen Inner Type short names #55

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

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Lengthen Inner Type short names #55

merged 1 commit into from
Jan 30, 2023

Conversation

SentryMan
Copy link
Collaborator

Change generation to use expanded short name (to avoid name conflicts when inner types have the same name)

public class AuthProvider  {
  @Json
  public record Oauth2Token(
      @Property("expires_in") int expiresIn,
      @Property("access_token") String value,
      @Property("token_type") String tokenType) {}
}

now in the GeneratedJsonComponent class, will generate like this

    builder.add(AuthProvider.Oauth2Token.class, AuthProvider$Oauth2TokenJsonAdapter::new);

@rbygrave rbygrave added this to the 1.2 milestone Jan 30, 2023
@rbygrave rbygrave merged commit a00daa8 into avaje:main Jan 30, 2023
@SentryMan SentryMan deleted the inner branch January 30, 2023 21:28
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