-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add modules and config for Swagger UI
- Loading branch information
1 parent
6e2af1c
commit 66f1179
Showing
5 changed files
with
292 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", | ||
"This file is @generated automatically" | ||
], | ||
"content-hash": "58b8d1517a64990d5e5c614a54eabc98", | ||
"content-hash": "0cba3a7279e9faa20cc7a2d6cb05cf96", | ||
"packages": [ | ||
{ | ||
"name": "asm89/stack-cors", | ||
|
@@ -10541,6 +10541,100 @@ | |
"source": "https://git.drupalcode.org/project/openapi_jsonapi" | ||
} | ||
}, | ||
{ | ||
"name": "drupal/openapi_ui", | ||
"version": "1.0.0-rc4", | ||
"source": { | ||
"type": "git", | ||
"url": "https://git.drupalcode.org/project/openapi_ui.git", | ||
"reference": "8.x-1.0-rc4" | ||
}, | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://ftp.drupal.org/files/projects/openapi_ui-8.x-1.0-rc4.zip", | ||
"reference": "8.x-1.0-rc4", | ||
"shasum": "11f8cc945a2e6eb45dad512077a42ea9024fb4fc" | ||
}, | ||
"require": { | ||
"drupal/core": "^8.8 || ^9 || ^10" | ||
}, | ||
"type": "drupal-module", | ||
"extra": { | ||
"drupal": { | ||
"version": "8.x-1.0-rc4", | ||
"datestamp": "1670512625", | ||
"security-coverage": { | ||
"status": "not-covered", | ||
"message": "RC releases are not covered by Drupal security advisories." | ||
} | ||
} | ||
}, | ||
"notification-url": "https://packages.drupal.org/8/downloads", | ||
"license": [ | ||
"GPL-2.0-or-later" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "richgerdes", | ||
"homepage": "https://www.drupal.org/user/3437973" | ||
} | ||
], | ||
"description": "Provides plugin system for OpenAPI/Swagger Interface libraries.", | ||
"homepage": "http://drupal.org/project/openapi_ui", | ||
"support": { | ||
"source": "https://git.drupalcode.org/project/openapi_ui" | ||
} | ||
}, | ||
{ | ||
"name": "drupal/openapi_ui_swagger", | ||
"version": "1.0.0", | ||
"source": { | ||
"type": "git", | ||
"url": "https://git.drupalcode.org/project/openapi_ui_swagger.git", | ||
"reference": "8.x-1.0" | ||
}, | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://ftp.drupal.org/files/projects/openapi_ui_swagger-8.x-1.0.zip", | ||
"reference": "8.x-1.0", | ||
"shasum": "32478822e27fc02193f2179c752fbbfd092cf366" | ||
}, | ||
"require": { | ||
"drupal/core": "^8 || ^9 || ^10", | ||
"drupal/openapi_ui": "^1.0", | ||
"swagger-api/swagger-ui": "^3.0.17" | ||
}, | ||
"type": "drupal-module", | ||
"extra": { | ||
"drupal": { | ||
"version": "8.x-1.0", | ||
"datestamp": "1696427728", | ||
"security-coverage": { | ||
"status": "covered", | ||
"message": "Covered by Drupal's security advisory policy" | ||
} | ||
} | ||
}, | ||
"notification-url": "https://packages.drupal.org/8/downloads", | ||
"license": [ | ||
"GPL-2.0-or-later" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "richgerdes", | ||
"homepage": "https://www.drupal.org/user/3437973" | ||
} | ||
], | ||
"description": "Creates OpenAPI specification for Drupal REST resources.", | ||
"homepage": "https://www.drupal.org/project/openapi_ui_swagger", | ||
"keywords": [ | ||
"Drupal" | ||
], | ||
"support": { | ||
"source": "http://cgit.drupalcode.org/openapi_ui_swagger", | ||
"issues": "http://drupal.org/project/issues/openapi_ui_swagger" | ||
} | ||
}, | ||
{ | ||
"name": "drupal/override_node_options", | ||
"version": "2.7.0", | ||
|
@@ -16848,6 +16942,62 @@ | |
}, | ||
"time": "2016-07-25T17:07:32+00:00" | ||
}, | ||
{ | ||
"name": "mnsami/composer-custom-directory-installer", | ||
"version": "2.0.0", | ||
"source": { | ||
"type": "git", | ||
"url": "https://github.com/mnsami/composer-custom-directory-installer.git", | ||
"reference": "85f66323978d0b1cb0e6acc7f69b3e7b912f82d9" | ||
}, | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://api.github.com/repos/mnsami/composer-custom-directory-installer/zipball/85f66323978d0b1cb0e6acc7f69b3e7b912f82d9", | ||
"reference": "85f66323978d0b1cb0e6acc7f69b3e7b912f82d9", | ||
"shasum": "" | ||
}, | ||
"require": { | ||
"composer-plugin-api": "^1.0 || ^2.0", | ||
"php": ">=5.3" | ||
}, | ||
"type": "composer-plugin", | ||
"extra": { | ||
"class": [ | ||
"Composer\\CustomDirectoryInstaller\\LibraryPlugin", | ||
"Composer\\CustomDirectoryInstaller\\PearPlugin", | ||
"Composer\\CustomDirectoryInstaller\\PluginPlugin" | ||
], | ||
"branch-alias": { | ||
"dev-master": "1.1.x-dev" | ||
} | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"Composer\\CustomDirectoryInstaller": "src/" | ||
} | ||
}, | ||
"notification-url": "https://packagist.org/downloads/", | ||
"license": [ | ||
"MIT" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Mina Nabil Sami", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"description": "A composer plugin, to help install packages of different types in custom paths.", | ||
"keywords": [ | ||
"composer", | ||
"composer-installer", | ||
"composer-plugin" | ||
], | ||
"support": { | ||
"issues": "https://github.com/mnsami/composer-custom-directory-installer/issues", | ||
"source": "https://github.com/mnsami/composer-custom-directory-installer/tree/2.0.0" | ||
}, | ||
"time": "2020-08-18T11:00:11+00:00" | ||
}, | ||
{ | ||
"name": "monolog/monolog", | ||
"version": "2.9.2", | ||
|
@@ -21835,6 +21985,67 @@ | |
}, | ||
"time": "2023-09-08T16:15:47+00:00" | ||
}, | ||
{ | ||
"name": "swagger-api/swagger-ui", | ||
"version": "v3.52.5", | ||
"source": { | ||
"type": "git", | ||
"url": "https://github.com/swagger-api/swagger-ui.git", | ||
"reference": "f1ad60dc92e7edb0898583e16c3e66fe3e9eada2" | ||
}, | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/f1ad60dc92e7edb0898583e16c3e66fe3e9eada2", | ||
"reference": "f1ad60dc92e7edb0898583e16c3e66fe3e9eada2", | ||
"shasum": "" | ||
}, | ||
"type": "library", | ||
"notification-url": "https://packagist.org/downloads/", | ||
"license": [ | ||
"Apache-2.0" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Anna Bodnia", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Buu Nguyen", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Josh Ponelat", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Kyle Shockey", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Robert Barnwell", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Sahar Jafari", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"description": " Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.", | ||
"homepage": "http://swagger.io", | ||
"keywords": [ | ||
"api", | ||
"documentation", | ||
"openapi", | ||
"specification", | ||
"swagger", | ||
"ui" | ||
], | ||
"support": { | ||
"issues": "https://github.com/swagger-api/swagger-ui/issues", | ||
"source": "https://github.com/swagger-api/swagger-ui/tree/v3.52.5" | ||
}, | ||
"time": "2021-10-14T14:25:14+00:00" | ||
}, | ||
{ | ||
"name": "symfony/browser-kit", | ||
"version": "v6.4.0", | ||
|
@@ -26947,6 +27158,7 @@ | |
"drupal/mimemail": 15, | ||
"drupal/no_table_drag": 15, | ||
"drupal/openapi": 5, | ||
"drupal/openapi_ui": 5, | ||
"drupal/paragraphs_features": 10, | ||
"drupal/password_strength": 20, | ||
"drupal/pathologic": 15, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
namespace tests\phpunit\API; | ||
|
||
use Tests\Support\Classes\VaGovExistingSiteBase; | ||
|
||
/** | ||
* Tests to confirm JSON:API Explorer UI works as expected. | ||
* | ||
* @group functional | ||
* @group all | ||
*/ | ||
class JsonApiExplorerUiTest extends VaGovExistingSiteBase { | ||
|
||
/** | ||
* Test JSON:API Explorer UI loads. | ||
* | ||
* @group services | ||
* @group all | ||
*/ | ||
public function testJsonApiExplorerUiLoads() { | ||
$user = $this->createUser(); | ||
$user->addRole('content_api_consumer'); | ||
$user->save(); | ||
|
||
$this->drupalLogin($user); | ||
$this->drupalGet('/admin/config/services/openapi/swagger/jsonapi'); | ||
|
||
// Confirm that the page is accessible. | ||
$this->assertSession()->statusCodeEquals(200); | ||
|
||
// Assert that ".page-title" is "OpenAPI Documentation". | ||
$this->assertSession()->elementTextContains( | ||
'css', | ||
'.page-title', | ||
'OpenAPI Documentation' | ||
); | ||
|
||
// Any further assertions would need to be done with JavaScript test bases, | ||
// such as Nightwatch. Or this test could be moved to Cypress. | ||
// But this is a good start... | ||
} | ||
|
||
} |