-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Configuration properties of type duration should include the unit when rendering the default value #10022
Comments
Hi @Sanne, in doc there is a tooltip for a description of Duration pattern with link to https://quarkus.io/guides/datasource#duration-note-anchor In this section, describe a duration have a default in seconds:
When time aren't in a second, the measure of time need explicit indicated like a javadoc of Duration show. |
I am beginner in this issue, Can you please suggest me, how to get started.. |
Hi @viveksahu26 thanks for your interest in this issue. This is part that you can look at: It should be possible to check that Ping me if you have something by opening a draft PR and we can iterate from there. |
since i am beginner. so can please explain me more about this issue.
…On Sat, Aug 8, 2020 at 7:36 PM Manyanda Chitimbo ***@***.***> wrote:
Hi @viveksahu26 <https://github.com/viveksahu26> thanks for your interest
in this issue. This is part that you can look at:
https://github.com/quarkusio/quarkus/tree/963519899db1691ca86fe4f278fdebf055b10204/core/processor/src/main/java/io/quarkus/annotation/processor/generate_doc/ConfigDoItemFinder.java#L296-L310
It should be possible to check that type is Duration.class.getName() and
do the needed logic for the default value.
Ping me if you have something by opening a draft PR and it we can iterate
from there.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10022 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APQTOUDF2P6R56CNBMEZ7XDR7VLXLANCNFSM4N6LKRGQ>
.
|
ContextQuarkus is able to automatically generate configuration values from code source by doing annotation scanning. IssueThe issue here is that, when a configuration know is of type The underlying default value will be |
The duration default values rendered in the documentation are now normalized by appending an `S` to any default value which is a number only. Additionally the duration values are all converted to upper-case. Fixes quarkusio#10022
We have the same issue with the documentation for our own Quarkus extensions, so I looked into this one. I hope you hadn't already put work into this, @viveksahu26. |
The duration default values rendered in the documentation are now normalized by appending an `S` to any default value which is a number only. Additionally the duration values are all converted to upper-case. Fixes quarkusio#10022
Description
Configuration properties such as
acquisition-timeout
onio.quarkus.agroal.runtime.DataSourceJdbcRuntimeConfig
are declared with a default value of "5".This gets rendered on documentation as type "Duration" and default value "5" but the docs don't clarify that this is to be interpreted as seconds:
Implementation ideas
Should be possible to patch the configuration documentation generation to explicitly document as seconds, when there's a default and it's numeric only.
The text was updated successfully, but these errors were encountered: