Update Swagger UI Library To Latest Major Version

Created on 15 December 2023, over 1 year ago

Problem/Motivation

The listed compatible version for this module is 3.x but the library goes up to 5.x now. I think we should attempt to update the library version.

Proposed resolution

Update the "swagger-api/swagger-ui" dependency to version 5.x.

User interface changes

In testing by manually placing the library vs. composer adding it, I didn't see a difference in the UI. The configuration docs also seem pretty similar. There might be UI changes, and it'd be nice to get some functional JS tests added to this repo.

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States afinnarn

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @afinnarn
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MariaDB 10.3.22
    last update over 1 year ago
    1 pass
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States afinnarn

    I updated the composer.json file to pull swagger-ui 5.x but didn't add any tests yet. Feel free to review, and hopefully, I can help add tests.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.2.1 + Environment: php8.3_mysql8
    last update about 1 year ago
    1 pass
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    1 pass
  • Status changed to RTBC about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vipin.mittal18 Greater Noida

    Hello @richgerdes,

    Swagger-api/swagger-ui have been updated from version 3 to version 5 with a number of bug fixes. so it would be good for us to use latest one.
    Thanks!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States afinnarn

    Hey @vipin.mittal18, are you getting the 5.x library with this patch? I thought I was, but when I look in the libraries directory, I still have 3.x . I think the patch might be applied after Composer installs and merges dependencies, but I'm not sure. I will continue to look into this and maybe try pointing Composer to the MR branch.

    If you aren't getting 5.x either, then maybe this MR has to be merged for us to pick it up or at least the issue should go back to "Needs Work".

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States afinnarn

    I will leave this at RTBC since I confirmed that once the patch is merged, it will update swagger-ui to 5.x. For now, I had to do the following:

    Update composer.json repositories section:

        "repositories": {
            "drupal": {
                "type": "composer",
                "url": "https://packages.drupal.org/8",
                "exclude": [
                    "drupal/openapi_ui_swagger"
                ]
            },
            "drupal/openapi_ui_swagger": {
                "type": "git",
                "url": "https://git.drupal.org/issue/openapi_ui_swagger-3409145.git"
            }
    

    Then run these commands:

    1. composer remove drupal/openapi_ui_swagger --no-update
    2. composer require drupal/openapi_ui_swagger:dev-3409145-update-swagger-ui#bd0b5aa612c5c49763e28f8d19dfef9940166f49 -W

    Now when you look, you should see swagger_ui 5.x loaded instead of 3.x.

  • ๐Ÿ‡ฏ๐Ÿ‡ดJordan Yasser Samman Amman, Jordan

    yassersamman โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฏ๐Ÿ‡ดJordan Yasser Samman Amman, Jordan

    Resolved conflict between this branch and 1.x

  • Pipeline finished with Success
    4 months ago
    Total: 147s
    #369833
  • Pipeline finished with Success
    4 months ago
    Total: 196s
    #369834
Production build 0.71.5 2024