Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't manage to display double quotes without slashes #934

Closed
user3160 opened this issue Jun 4, 2019 · 2 comments
Closed

can't manage to display double quotes without slashes #934

user3160 opened this issue Jun 4, 2019 · 2 comments

Comments

@user3160
Copy link

user3160 commented Jun 4, 2019

example: |
          &filter={"company_id":"3"}

is rendered as
Example: "&filter={\"company_id\":\"3\"}\n"

how to get rid of escape slashes?

below is part of my spec

paths:
  /roles:
    get:
      parameters:
      - name: filter
        in: query
        required: false
        schema:
          type: object
          properties:
            company_id:
              type: string
            name:
              type: string
        example: |
          &filter={"company_id":"3"}
@RomanHotsiy
Copy link
Member

This is a bug in Redoc.

@RomanHotsiy
Copy link
Member

Implemented json serialization support.

See details here: https://swagger.io/docs/specification/describing-parameters/#schema-vs-content

In your case, use:

paths:
  /roles:
    get:
      parameters:
        - name: filter
          in: query
          required: false
          content:
            application/json:
              schema:
                type: object
                properties:
                  company_id:
                    type: string
                  name:
                    type: string
          example: {"company_id":"3"}

It will land in the upcoming version 2.0.0-rc.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants