quarkusio / quarkus

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

Improve Qute documentation #44261

Open neon-dev opened 4 days ago

neon-dev commented 4 days ago

ItemResource should be HelloResource here: https://github.com/quarkusio/quarkus/blob/37873c448298a526ffca4f1a70f14f0384e011e5/docs/src/main/asciidoc/qute.adoc?plain=1#L148-L149

quarkus-bot[bot] commented 4 days ago

/cc @mkouba (qute)

mkouba commented 1 day ago

Well, it's just an example so it's not necessarily wrong but I agree that HelloResource would be better. @neon-dev Would you care to send a pull request?

neon-dev commented 1 day ago

It is wrong because the example continues with HelloResource.java, so the build would fail as the file paths won't match. Also goodbye.txt isn't declared in the class, so this section maybe should be revised too? I'd prefer to not create a pull request myself, but I can if you insist.

melloware commented 1 day ago

@neon-dev PR submitted please review: https://github.com/quarkusio/quarkus/pull/44289

mkouba commented 1 day ago

It is wrong because the example continues with HelloResource.java, so the build would fail as the file paths won't match. Also goodbye.txt isn't declared in the class, so this section maybe should be revised too?

But this paragraph is merely describing the convention for type-safe templates. And then the correct steps to rewrite the example from the previous section follow. That said, I don't mind if we use HelloResource in this paragraph. It's more clear.

I'd prefer to not create a pull request myself, but I can if you insist.

Of course I don't insist but contributions are welcome 😉.

@neon-dev PR submitted please review: #44289

@melloware 👍 Thanks, I'll take a look.

neon-dev commented 1 day ago

But this paragraph is merely describing the convention for type-safe templates. And then the correct steps to rewrite the example from the previous section follow. That said, I don't mind if we use HelloResource in this paragraph. It's more clear.

I see. Thanks for clarifying, I hadn't thought about that.
The way it is written strongly implies everything is already appropriately named for the example code that follows just a few lines after, otherwise it wouldn't make sense to showcase exactly the two *.txt files that are used within the same section.

Of course I don't insist but contributions are welcome 😉.

I'm sorry, maybe next time :) Thx @melloware

mkouba commented 1 day ago

otherwise it wouldn't make sense to showcase exactly the two *.txt files that are used within the same section.

The thing is we actuallly do not showcase two txt files in the same section. It's one template used in two resources...

neon-dev commented 1 day ago

With section I was referring to the section of the documentation.