Skip to content

[http-client] Add code generation for the as() methods returning HttpResponse<E> etc #140

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 18, 2023

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.

1 participant