quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.74k stars 2.67k forks source link

Rest Client codestart (in java and kotlin) #20555

Closed ia3andy closed 2 years ago

ia3andy commented 3 years ago

Description

As Rest Client is one of the most used extension, we should find a good codestart for it (in java and kotlin).

Implementation ideas

We should first discuss the content of this codestart. The goal is to have code:

What is the piece of code that you nearly always start with when using the extension.. Make it compile, and it's the perfect codestart!

The guide to create an extension codestart https://quarkus.io/guides/extension-codestart

quarkus-bot[bot] commented 3 years ago

/cc @evanchooly, @michalszynkiewicz, @quarkusio/devtools

ia3andy commented 3 years ago

@evanchooly do you want to have a look into this (It shouldn't take more than 1h), I can assist you by all means :-)

michalszynkiewicz commented 3 years ago

I think it should focus on REST Client Reactive, we can do REST Client too later, but we want to attract people to the reactive space more now.

For me the problematic part is having some API to call from the client, IMO we have the following options:

michalszynkiewicz commented 3 years ago

Hmm... maybe we could use some of our own endpoints, e.g. something from code.quarkus.io?

ia3andy commented 3 years ago

Hmm... maybe we could use some of our own endpoints, e.g. something from code.quarkus.io?

@michalszynkiewicz yes we could use this endpoint: https://code.quarkus.io/api/extensions

For the model, I would either suggest using a flexible structure, or use an internal data class so we stay with one file per codestart.

Regarding usage, a test is fine, a simple comment in the interface saying how to inject it or configure would be fine too IMO.

To decide, we should find what is the closest to where the users will start from. The goal is not to teach them, but give some hints to people who already used it so they don't have to go back to the guide to remember the starting point.

ia3andy commented 3 years ago

@michalszynkiewicz are you up to create this one (can I assign it to you)?

michalszynkiewicz commented 3 years ago

I'm not sure I'll have time soon. I just wanted to drop some thoughts

ia3andy commented 3 years ago

@michalszynkiewicz a few hours on it (2 or 3 hours) will benefit many people using the extension..

@evanchooly are you up to it? or could you guys find someone?