redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Links on the sidebar won't work if the operation ID contains backslashes

Open ekisu opened this issue 5 years ago • 2 comments

When the operation IDs have backslashes, clicking on the operations in the sidebar won't take me to the operation details. It seems that it needs an extra backslash character, as adding it to the URL manually makes it work.

Tested with the following spec file, on the live demo

openapi: "3.0.0"
info:
  version: 1.0.0
  title: Backslash Example
servers:
  - url: http://example.com/v1
paths:
  /pets:
    get:
      summary: List all pets
      operationId: test\listPets
      tags:
        - pets
      responses:
        '200':
          description: A paged array of pets
          content:
            application/json:    
              schema:
                type: string
  /dogs:
    get:
      summary: List all dogs
      operationId: test\listDogs
      tags:
        - pets
      responses:
        '200':
          description: A paged array of dogs
          content:
            application/json:    
              schema:
                type: string

ekisu avatar Mar 02 '21 16:03 ekisu

I have the same issue, sent a PR to fix this.

aLLeXUs avatar Mar 07 '21 17:03 aLLeXUs

This was fixed in #1513 and is available in the current version of Redoc - I'll close this issue, but let us know if you need anything else.

lornajane avatar Jul 26 '23 16:07 lornajane