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

Override description from operation template #1844

Closed
Tracked by #1850
pshao25 opened this issue Nov 12, 2024 · 1 comment
Closed
Tracked by #1850

Override description from operation template #1844

pshao25 opened this issue Nov 12, 2024 · 1 comment
Assignees

Comments

@pshao25
Copy link
Member

pshao25 commented Nov 12, 2024

Currently when we use a template, e.g., ArmResourceRead, its responses have its own description like

"responses": {
  "200": {
    "description": "Azure operation completed successfully.",
    "schema": {
      "$ref": "#/definitions/EmployeeListResult"
    }
  },
  "default": {
    "description": "An unexpected error response.",
    "schema": {
      "$ref": "../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
    }
  }
}

But brownfield service defined its own description. We should have a way to override these descriptions.

@markcowl
Copy link
Member

@pshao25 We should not try to match the response description for existing swaggers. This should be a non-goal. Descriptions of response models make sense, but the descriptions of response status codes in swagger are of limited value.

If there is a need in some very strange case to do this, you can use the Response parameter in each operation template to replace the responses and add your own documentation like this

But again matching the description of the status code responses in swagger should be an explicit non-goal of conversion

@markcowl markcowl closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants