Skip to content

Docstrings used to concatenate title + description, now use only description #978

@dpwatrous

Description

@dpwatrous

I'm not sure if this was an intentional behavior change or a regression, but historically we (Azure Batch) have used both the title and description fields on properties for descriptive purposes, and relied on the fact that they would be displayed together in docstrings.

The new behavior leads to some very confusing docstrings. I'm trying to determine if we should switch to using the description field only, or if this is simply a bug. (Either way it does look like a breaking change). For more context, see the discussion on this PR about the usage of title vs description.

Here is an example of the old vs new behavior:

Swagger:

"results": {
  "type": "string",
  "title": "The final values of all variables used in the evaluation of the autoscale formula.",
  "description": "Each variable value is returned in the form $variable=value, and variables are separated by semicolons."
}

Old docstring behavior:

:param results: The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are

New docstring behavior:

:param results: Each variable value is returned in the form $variable=value, and variables are separated by semicolons.

Note: I'm not sure when this behavior changed, but I'm seeing it both when using the latest autorest extensions, and when specifying version 4.0.73 of the Python extension, and 3.0.6351 of autorest core.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions