mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 09:42:25 +00:00
chore(open-api-explorer): fix engine defintion and swagger-ui imports
This commit is contained in:
@@ -13,7 +13,7 @@ export default class App extends Application {
|
||||
podModulePrefix = config.podModulePrefix;
|
||||
Resolver = Resolver;
|
||||
engines = {
|
||||
openApiExplorer: {
|
||||
'open-api-explorer': {
|
||||
dependencies: {
|
||||
services: ['auth', 'flash-messages', 'namespace', 'router', 'version'],
|
||||
},
|
||||
|
||||
@@ -114,6 +114,9 @@ module.exports = function (defaults) {
|
||||
{
|
||||
package: 'axe-core',
|
||||
},
|
||||
{
|
||||
package: 'swagger-ui-dist',
|
||||
},
|
||||
],
|
||||
packagerOptions: {
|
||||
webpackConfig: {
|
||||
|
||||
@@ -10,6 +10,7 @@ import { tracked } from '@glimmer/tracking';
|
||||
import parseURL from 'core/utils/parse-url';
|
||||
import config from 'open-api-explorer/config/environment';
|
||||
import { guidFor } from '@ember/object/internals';
|
||||
import SwaggerUIBundle from 'swagger-ui-dist/swagger-ui-bundle.js';
|
||||
|
||||
const { APP } = config;
|
||||
|
||||
@@ -84,8 +85,6 @@ export default class SwaggerUiComponent extends Component {
|
||||
|
||||
// using an action to bind the correct "this" context
|
||||
@action async swaggerInit() {
|
||||
const { default: SwaggerUIBundle } = await import('swagger-ui-dist/swagger-ui-bundle.js');
|
||||
// trim any slashes on the filter value
|
||||
const configSettings = this.CONFIG(SwaggerUIBundle, this);
|
||||
SwaggerUIBundle(configSettings);
|
||||
}
|
||||
|
||||
@@ -13,9 +13,6 @@ const EngineAddon = require('ember-engines/lib/engine-addon');
|
||||
module.exports = EngineAddon.extend({
|
||||
name: 'open-api-explorer',
|
||||
|
||||
babel: {
|
||||
plugins: [require.resolve('ember-auto-import/babel-plugin')],
|
||||
},
|
||||
included() {
|
||||
this._super.included && this._super.included.apply(this, arguments);
|
||||
// we want to lazy load the CSS deps, importing them here will result in them being added to the
|
||||
|
||||
Reference in New Issue
Block a user