Skip to content

Swagger replaces quotes with angled quotes in documentation #5060

@veqryn

Description

@veqryn

In our documentation we have example curl calls and other things using single ' and double " quotes.

For whatever reason, when Swagger pulls in this documentation it insists on replacing the quotes with single ‘’ and double “” angled quotes.

Here is an example of what it looks like:
image

This is a bug because when our users copy and paste these commands into their shell, they don't work because of the angled quotes.

We are using swagger docker image: swaggerapi/swagger-ui:v3.19.3

And it is the API_URLS environment variable to pull the swagger json from another url.

The contents of the swagger json start with:

{
  "swagger": "2.0",
  "info": {
    "title": "Foobar Service",
    "description": "\u003cbr\u003e\u003cp\u003eExample of a simple GET request via curl with bearer HTTP Authentication:\u003c/p\u003e\u003cpre\u003ecurl -X GET \"https://foobar.com/stuff\" -H \"Accept: application/json\" -H \"Authorization: Bearer abc123.xyz.789\"\u003c/pre\u003e",
    "version": "2.0"
  },
  "paths": {}
}

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