mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +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;
|
podModulePrefix = config.podModulePrefix;
|
||||||
Resolver = Resolver;
|
Resolver = Resolver;
|
||||||
engines = {
|
engines = {
|
||||||
openApiExplorer: {
|
'open-api-explorer': {
|
||||||
dependencies: {
|
dependencies: {
|
||||||
services: ['auth', 'flash-messages', 'namespace', 'router', 'version'],
|
services: ['auth', 'flash-messages', 'namespace', 'router', 'version'],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -114,6 +114,9 @@ module.exports = function (defaults) {
|
|||||||
{
|
{
|
||||||
package: 'axe-core',
|
package: 'axe-core',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
package: 'swagger-ui-dist',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
packagerOptions: {
|
packagerOptions: {
|
||||||
webpackConfig: {
|
webpackConfig: {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { tracked } from '@glimmer/tracking';
|
|||||||
import parseURL from 'core/utils/parse-url';
|
import parseURL from 'core/utils/parse-url';
|
||||||
import config from 'open-api-explorer/config/environment';
|
import config from 'open-api-explorer/config/environment';
|
||||||
import { guidFor } from '@ember/object/internals';
|
import { guidFor } from '@ember/object/internals';
|
||||||
|
import SwaggerUIBundle from 'swagger-ui-dist/swagger-ui-bundle.js';
|
||||||
|
|
||||||
const { APP } = config;
|
const { APP } = config;
|
||||||
|
|
||||||
@@ -84,8 +85,6 @@ export default class SwaggerUiComponent extends Component {
|
|||||||
|
|
||||||
// using an action to bind the correct "this" context
|
// using an action to bind the correct "this" context
|
||||||
@action async swaggerInit() {
|
@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);
|
const configSettings = this.CONFIG(SwaggerUIBundle, this);
|
||||||
SwaggerUIBundle(configSettings);
|
SwaggerUIBundle(configSettings);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ const EngineAddon = require('ember-engines/lib/engine-addon');
|
|||||||
module.exports = EngineAddon.extend({
|
module.exports = EngineAddon.extend({
|
||||||
name: 'open-api-explorer',
|
name: 'open-api-explorer',
|
||||||
|
|
||||||
babel: {
|
|
||||||
plugins: [require.resolve('ember-auto-import/babel-plugin')],
|
|
||||||
},
|
|
||||||
included() {
|
included() {
|
||||||
this._super.included && this._super.included.apply(this, arguments);
|
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
|
// 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