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

Syntax highlighting does not work in OAS3 parameters #6240

Closed
hkosova opened this issue Jul 20, 2020 · 1 comment
Closed

Syntax highlighting does not work in OAS3 parameters #6240

hkosova opened this issue Jul 20, 2020 · 1 comment

Comments

@hkosova
Copy link
Contributor

hkosova commented Jul 20, 2020

Q&A (please complete the following information)

  • OS: Windows 10
  • Browser: Chrome latest
  • Method of installation: dist assets
  • Swagger-UI version: 3.30.0
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

Example Swagger/OpenAPI definition:

openapi: 3.0.0
info:
  title: Objects in parameters
  version: 1.0.0
servers:
  - url: https://httpbin.org
paths:
  /get:
    get:
      parameters:
        - in: query
          name: params
          schema:
            type: object
            properties:
              foo:
                type: string
              bar:
                type: integer
      responses:
        '200':
          description: OK

Describe the bug you're encountering

This is a follow-up to PR #6236. The syntax highlighting feature added in that PR does not apply to object parameters in OAS3 definitions.

To reproduce...

  1. Create a gist containing the definition above and load it into https://petstore.swagger.io.
  2. Expand the operation and see how the params parameter is displayed.

Expected behavior

Code examples in parameters should use the same syntax highlighting as request/response bodies.

Screenshots

image

@tim-lai
Copy link
Contributor

tim-lai commented Apr 21, 2021

PR #7199 should resolve this issue.

@tim-lai tim-lai closed this as completed Apr 21, 2021
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