@necessarylion/adonis-autoswagger 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto_swagger.js +1 -1
- package/dist/example.js +0 -2
- package/dist/schema.js +3 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +6 -3
- package/package.json +1 -1
package/dist/auto_swagger.js
CHANGED
|
@@ -74,7 +74,7 @@ class AutoSwagger {
|
|
|
74
74
|
return this.uiService.rapidoc(url, style);
|
|
75
75
|
}
|
|
76
76
|
scalar(url, proxyUrl = "https://proxy.scalar.com") {
|
|
77
|
-
return this.uiService.scalar(url, proxyUrl);
|
|
77
|
+
return this.uiService.scalar(url, proxyUrl, this.options);
|
|
78
78
|
}
|
|
79
79
|
stoplight(url, theme = "dark") {
|
|
80
80
|
return this.uiService.stoplight(url, theme);
|
package/dist/example.js
CHANGED
|
@@ -125,7 +125,6 @@ class ExampleGenerator {
|
|
|
125
125
|
content: {
|
|
126
126
|
"application/json": {
|
|
127
127
|
schema: paginated === "true" ? paginatedSchema : normalArraySchema,
|
|
128
|
-
example: paginated === "true" ? paginatedEx : [ex],
|
|
129
128
|
},
|
|
130
129
|
},
|
|
131
130
|
};
|
|
@@ -139,7 +138,6 @@ class ExampleGenerator {
|
|
|
139
138
|
schema: {
|
|
140
139
|
$ref: "#/components/schemas/" + rawRef,
|
|
141
140
|
},
|
|
142
|
-
example: ex,
|
|
143
141
|
},
|
|
144
142
|
},
|
|
145
143
|
};
|
package/dist/schema.js
CHANGED
|
@@ -37,7 +37,9 @@ class SchemaService {
|
|
|
37
37
|
async getSchemas() {
|
|
38
38
|
let schemas = {
|
|
39
39
|
Any: {
|
|
40
|
-
|
|
40
|
+
type: 'any',
|
|
41
|
+
description: "Any value",
|
|
42
|
+
examples: [true, false, 1, "foo", { foo: "bar" }],
|
|
41
43
|
},
|
|
42
44
|
};
|
|
43
45
|
schemas = {
|
package/dist/ui.d.ts
CHANGED
package/dist/ui.js
CHANGED
|
@@ -96,7 +96,7 @@ class UIService {
|
|
|
96
96
|
* @param proxyUrl string
|
|
97
97
|
* @returns
|
|
98
98
|
*/
|
|
99
|
-
scalar(url, proxyUrl = "https://proxy.scalar.com") {
|
|
99
|
+
scalar(url, proxyUrl = "https://proxy.scalar.com", options) {
|
|
100
100
|
return `
|
|
101
101
|
<!doctype html>
|
|
102
102
|
<html>
|
|
@@ -115,10 +115,13 @@ class UIService {
|
|
|
115
115
|
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
|
|
116
116
|
<script>
|
|
117
117
|
Scalar.createApiReference('#app', {
|
|
118
|
-
persistAuth:
|
|
118
|
+
persistAuth: ${options?.persistAuthorization},
|
|
119
119
|
url: '${url}',
|
|
120
120
|
proxyUrl: '${proxyUrl}',
|
|
121
|
-
|
|
121
|
+
expandAllResponses: true,
|
|
122
|
+
authentication: {
|
|
123
|
+
preferredSecurityScheme: '${options?.defaultSecurityScheme}',
|
|
124
|
+
}
|
|
122
125
|
})
|
|
123
126
|
</script>
|
|
124
127
|
</body>
|