Skip to content

Support generic jsonb types #116

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 14 commits into from
Jan 6, 2023
Merged

Support generic jsonb types #116

merged 14 commits into from
Jan 6, 2023

Conversation

SentryMan
Copy link
Collaborator

@SentryMan SentryMan commented Dec 28, 2022

Now can do wacky stuff like this and have it work.

  @Get("/get3")
  Gen<RequestModel, String, Integer> getty3() {
    return new Gen<>(new RequestModel("This Model class isn't named that well"), "stringy", 0);
  }

  @Json
  public record Gen<T, T2, T3>(T o, @Ignore T2 ignored, T3 third) {}
  • Adds JsonB types to imports and uses the short name in the generated source
  • Enhance Client Processor to generate JsonB Parameterized types
  • Enhances UType to be able to retrieve the full generic type of a param for certain Generic Classes
  • Enhance JsonBUtil to write Parameterized Types for JsonB controllers

Has a dependency on this PR: avaje/avaje-jsonb#47
Has a dependency on this PR as well: avaje/avaje-http-client#56

@rbygrave rbygrave merged commit 83c579f into avaje:master Jan 6, 2023
@rbygrave rbygrave added this to the 1.21 milestone Jan 6, 2023
@rbygrave rbygrave added the enhancement New feature or request label Jan 6, 2023
@SentryMan SentryMan deleted the jsonbGeneric branch January 6, 2023 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants