Skip to content

Conversation

@rbygrave
Copy link
Contributor

Supports code generation for client API methods like the following:

@Client
public interface MyApi {

  @Get("/as/{id}")
  HttpResponse<Repo> getAs(UUID id);

  @Get("/as-list/{id}")
  HttpResponse<List<Repo>> getAsList(UUID id);

  @Get("/as-stream/{id}")
  HttpResponse<Stream<Repo>> getAsStream(UUID id);

  @Get("/call-as/{id}")
  HttpCall<HttpResponse<Repo>> getCallAs(UUID id);

  @Get("/call-as-list/{id}")
  HttpCall<HttpResponse<List<Repo>>> getCallAsList(UUID id);

  @Get("/call-as-stream/{id}")
  HttpCall<HttpResponse<Stream<Repo>>> getCallAsStream(UUID id);
}

…Response<E>, HttpResponse<List<E>>, HttpResponse<Stream<E>>
@rbygrave rbygrave added this to the 1.23 milestone Jan 18, 2023
@rbygrave rbygrave self-assigned this Jan 18, 2023
@rbygrave rbygrave merged commit 0439021 into master Jan 18, 2023
@rbygrave rbygrave deleted the feature/client-codegen-as-methods branch January 18, 2023 08: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