Skip to content

Codegen javadoc enhancement, compare with getallmodels-description branch #3

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

Open
wants to merge 7 commits into
base: getallmodels-description
Choose a base branch
from

Conversation

haolingdong-msft
Copy link
Owner

@haolingdong-msft haolingdong-msft commented May 21, 2024

impacts:

  1. we will not fallback to use parameter/model property's schema's description, if the description is not found on property or parameter.
  2. we will not have extra default description when summary is not empty.

haolingdong-msft and others added 2 commits May 21, 2024 14:58
@haolingdong-msft haolingdong-msft changed the title Codegen javadoc enhancement, remove the fallback to summary and description logics, also only use dummy description when both summary and description are empty Codegen javadoc enhancement, compare with getallmodels-description branch May 21, 2024
Comment on lines 123 to 121
* @param input The input parameter. Allowed values: "value1", "value2".
* @param input . Allowed values: "value1", "value2".

Choose a reason for hiding this comment

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

We probably want "The input parameter. Allowed values: "value1", "value2"." here.

The ". Allowed .." likely added by codegen. Swagger prorbably have no description on this param.

Copy link
Owner Author

@haolingdong-msft haolingdong-msft May 21, 2024

Choose a reason for hiding this comment

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

Thanks for the catch! I'm fixing.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Fixed in 7b1bc2e

* @param model I am root, and I ref a model with no meta.
* @param model The model parameter.

Choose a reason for hiding this comment

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

As long as this is what Swagger defines, this should be fine.

Copy link
Owner Author

@haolingdong-msft haolingdong-msft May 21, 2024

Choose a reason for hiding this comment

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

The change is because we don't fallback to param's schema's description. So default description is generated.

Choose a reason for hiding this comment

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

The change is because we don't fallback to param's schema's description. So default description is generated.

I am asking you to at least check 1 or 2 places in https://github.com/Azure/autorest.testserver/blob/main/swagger, that this assertion is true.

Copy link

@weidongxu-microsoft weidongxu-microsoft left a comment

Choose a reason for hiding this comment

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

LGTM

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