swagger-api / swagger-api/swagger-ui

Description of Path Item not shown

Open
#4,179 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

cat: rendering needs: UX/design input type: feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.