Skip to content
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

fix(java): add javadoc to all methods APIC-538 #704

Merged
merged 8 commits into from
Jun 16, 2022
Merged

fix(java): add javadoc to all methods APIC-538 #704

merged 8 commits into from
Jun 16, 2022

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Jun 15, 2022

🧭 What and Why

🎟 JIRA Ticket: APIC-538

Add the javadoc everywhere because we can and it's very useful when hovering methods.

🧪 Test

Hover a method in your favorite IDE

@netlify
Copy link

netlify bot commented Jun 15, 2022

Deploy Preview for api-clients-automation ready!

Name Link
🔨 Latest commit 41d55cd
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/62ab1c44f2b9690008cf9a1f
😎 Deploy Preview https://deploy-preview-704--api-clients-automation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@millotp millotp requested review from a team, damcou and shortcuts and removed request for a team June 15, 2022 17:05
@millotp millotp self-assigned this Jun 15, 2022
@algolia-bot
Copy link
Collaborator

algolia-bot commented Jun 15, 2022

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice

templates/java/api_javadoc.mustache Outdated Show resolved Hide resolved
@@ -155,19 +155,35 @@ public class {{classname}} extends ApiClient {
}

{{! This case only sets `requestOptions` as optional }}
/**
* {{&notes}}{{#allParams}}
* @param {{paramName}} {{&description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#returnType}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param {{paramName}} {{&description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#returnType}}
* @param {{paramName}} {{&description}} {{#required}}(required){{/required}}{{/allParams}}{{#returnType}}

wdyt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when it's optional that mean we can pass null and it will take the default value on the engine, I should add @Nullable annotations also.
If I put (required) everywhere might as well put it no where right ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I put (required) everywhere might as well put it no where right ?

It's more about putting it only where it's required, which was explicit enough to me, but it's up to you! (We can still remove the default to)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you want to remove the default to ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it the API default? It seems confusing to have it here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it's the api default, the same way we have it in the doc, I think it's okay to say it in the javadoc too

templates/java/libraries/okhttp-gson/api.mustache Outdated Show resolved Hide resolved
Base automatically changed from chore/fast-pre-commit to main June 16, 2022 10:17
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove the newline pls?

@millotp millotp requested a review from shortcuts June 16, 2022 12:04
@millotp millotp merged commit 90e531a into main Jun 16, 2022
@millotp millotp deleted the fix/javadoc branch June 16, 2022 14:34
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.

3 participants