swagger-api / swagger-api/swagger-ui
Description of Path Item not shown
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
| Q | A |
|---|---|
| Bug or feature request? | bug |
| Which Swagger/OpenAPI version? | 3.0.0 |
| Which Swagger-UI version? | Swagger Editor online |
| How did you install Swagger-UI? | Swagger Editor online |
| Which browser & version? | Firefox 56.0 |
| Which operating system? | Ubuntu 16.04 |
Demonstration API definition
{
"info": {
"title": "Sample Pet Store App",
"description": "This is a sample server for a pet store.",
"version": "1.0.1"
},
"openapi": "3.0.0",
"paths": {
"/foo": {
"description": "This Should be Displayed!",
"get": {
"responses": {
"204": {
"description": "OK"
}
}
}
}
}
}
Expected Behavior
When there is no description on the Operation Object, the description from the Path Item Object should be shown instead. (Otherwise I would have to repeat my description for ever operation)
This would comply with the Specification:
An optional, string description, intended to apply to all operations in this path.
Current Behavior
The description, (in the above example This Should be Displayed! should be shown in the place where normally the Operation description is shown.
Context
I want to avoid to reduntantly paste the same description string to every Operation there is for a path.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the supplied OpenAPI 3.0.0 definition in Swagger Editor online to reproduce the missing Path Item description, then trace the Swagger UI path and operation rendering entry point. Done means a Path Item description is displayed when an operation has no description, without requiring the text to be repeated for every operation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100