Skip to content

Upgrade version of swagger ui

Kyle Mulka requested to merge mulka/gitlab:upgrade_swagger_ui into master

What does this MR do and why?

Upgrading the version of Swagger UI to fix this bug: #365234 (closed)

Screenshots or screen recordings

Screen_Shot_2022-06-27_at_12.33.33_AM

How to set up and validate locally

  1. Set up an openapi.yml file in a GitLab project with JWT auth. For example:
openapi: 3.0.0

components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

security:
  - bearerAuth: []

paths:
  /users:
    get:
      summary: Returns a list of users.
      description: Optional extended description in CommonMark or HTML.
      responses:
        '200':    # status code
          description: A JSON array of user names
          content:
            application/json:
              schema: 
                type: array
                items: 
                  type: string
  1. View the file in the GitLab UI
  2. Click Authorize in the upper right
  3. Paste in a JWT token. For example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
  4. Click close
  5. Under the get_users method, click "Try it out", and "Execute".
  6. Notice that the JWT token shows up in the curl command instead of "[object Object]"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Hegman

Merge request reports

Loading