@mednours/backon 0.5.0 → 0.6.0
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/package.json +1 -1
- package/src/openapi-core.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mednours/backon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Opinionated backend framework wrapper for Bun. Wraps Hono (default) or Express (via @mednours/backon/express) with the same baked-in security, logging, and validation defaults.",
|
|
6
6
|
"license": "MIT",
|
package/src/openapi-core.ts
CHANGED
|
@@ -98,6 +98,11 @@ export function buildOpenApiDocument(routes: CollectedRoute[], options: OpenApiO
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
function pageShell(title: string, config: Record<string, unknown>): string {
|
|
101
|
+
// showDeveloperTools defaults to "localhost" in Scalar itself, which shows
|
|
102
|
+
// a Configure/Share/Deploy toolbar above the reference — promotion for
|
|
103
|
+
// Scalar's own hosted account, unrelated to this document. Off by default
|
|
104
|
+
// here since it renders whether or not the project uses Scalar's service.
|
|
105
|
+
const fullConfig = { showDeveloperTools: "never", ...config };
|
|
101
106
|
return `<!doctype html>
|
|
102
107
|
<html>
|
|
103
108
|
<head>
|
|
@@ -109,7 +114,7 @@ function pageShell(title: string, config: Record<string, unknown>): string {
|
|
|
109
114
|
<div id="api-reference"></div>
|
|
110
115
|
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
|
|
111
116
|
<script>
|
|
112
|
-
Scalar.createApiReference("#api-reference", ${JSON.stringify(
|
|
117
|
+
Scalar.createApiReference("#api-reference", ${JSON.stringify(fullConfig)});
|
|
113
118
|
</script>
|
|
114
119
|
</body>
|
|
115
120
|
</html>
|