Skip to content

Deep links to operations are broken when tags contain spaces and doc expansion is 'none' #5047

@pablocoberly

Description

@pablocoberly

Q&A

  • OS: macOS
  • Browser: Chrome
  • Version: 3.20
  • Swagger/OpenAPI version: Swagger 2.0

Content & configuration

Use example swagger spec with spaces in the operations:

https://raw.githubusercontent.com/pablocoberly/misc/master/swagger_spaces.json

Initialise swagger bundle with docexpansion set to 'none'

Describe the bug you're encountering

When a swagger spec contains tags that have spaces, and doc expansion is disabled, the deep links to operations don't work.

To reproduce...

Steps to reproduce the behavior:

  1. Use a spec that has a spaces in the tags, e.g. https://raw.githubusercontent.com/pablocoberly/misc/master/swagger_spaces.json
  2. Initialise the swagger setting:
docExpansion: 'none',
  1. Link to an operation that uses a tag with a space in it (e.g. #/Store%2520Space)
  2. The operation is not "scrolled to".

Expected behavior

The operation should be expanded be scrolled to even if the operation has a space in it.

Additional context or thoughts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions