Files
vault/ui/lib/open-api-explorer/addon/routes/index.js
Angel Garbarino e5d1a0f9e6 Backport 1.15.x Update packages and OpenApi styling (#23700) (#23833)
* Update packages and OpenApi styling (#23700)

* update packages

* changelog

* wip better

* clean up

* and it works, it always worked we just hid it working :/

* clean up

* playing around with adding the queryparam, not working

* the fix no queryparams

* lets just see how this works out.

* maybe this will help

* remove copy/pasta

* Update ui/lib/open-api-explorer/addon/components/swagger-ui.js

Co-authored-by: Jordan Reimer <zofskeez@gmail.com>

---------

Co-authored-by: Jordan Reimer <zofskeez@gmail.com>

* Update swagger-ui-test.js

---------

Co-authored-by: Jordan Reimer <zofskeez@gmail.com>
2023-10-26 11:45:55 -06:00

24 lines
689 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class OpenApiExplorerIndex extends Route {
@service flashMessages;
afterModel() {
const warning = `The "Try it out" functionality in this API explorer will make requests to this Vault server on your behalf.
IF YOUR TOKEN HAS THE PROPER CAPABILITIES, THIS WILL CREATE AND DELETE ITEMS ON THE VAULT SERVER.
Your token will also be shown on the screen in the example curl command output.`;
this.flashMessages.warning(warning, {
sticky: true,
preformatted: true,
});
}
}