There was an error while loading. Please reload this page.
1 parent d7ef06b commit f345f6eCopy full SHA for f345f6e
1 file changed
packages/generators-v2/src/transformer.js
@@ -2,6 +2,19 @@ import * as codeSamples from './code-samples/index.js';
2
3
export function transformSchema(schema, options) {
4
const updatedSchema = { ...schema };
5
+ if (!updatedSchema.components) {
6
+ updatedSchema.components = {};
7
+ }
8
+ updatedSchema.components = {
9
+ securitySchemes: {
10
+ 'access-token': {
11
+ scheme: 'bearer',
12
+ bearerFormat: '<YOUR_AIMLAPI_KEY>',
13
+ type: 'http',
14
+ description: 'Bearer key',
15
+ },
16
17
+ };
18
if (!options.hideTryItPanel || options.hideTryItPanel === true) {
19
Object.entries(updatedSchema.paths).map(([path, operation]) => {
20
for (const method of ['get', 'post']) {
0 commit comments