Skip to content

Add visual indicator for deprecated path parameter #245

@Krismix1

Description

@Krismix1

If a path parameter is marked as deprecated there is no visual indicator in the UI. I think having some indicator to be useful, as that would prevent new consumers of an API from using a field/param that is meant to be deleted.

image

Version: 0.6.4
Commit: 0beb11b
Reproduction spec (taken from the Petstore spec):

openapi: 3.0.0
servers: []
info:
  description: |
    Example
  version: 1.0.0
  title: Swagger Petstore YAML
tags:
  - name: pet
    description: Everything about your Pets
paths:
  "/pet/{petId}":
    get:
      tags:
        - pet
      summary: Find pet by ID
      description: Returns a single pet
      operationId: getPetById
      parameters:
        - name: petId
          in: path
          description: ID of pet to return
          required: false
          deprecated: true
          schema:
            type: integer
            format: int64
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Pet"
components:
  schemas:
    Pet:
      type: object
      properties:
        name:
          description: The name given to a pet
          type: string
          example: Guru

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions