@lark-apaas/devtool-kits 0.1.0-alpha.0 → 0.1.0-alpha.1
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/README.md +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,7 +160,7 @@ Enhances OpenAPI/Swagger documentation with source code information.
|
|
|
160
160
|
- Caching support for better performance
|
|
161
161
|
|
|
162
162
|
**Routes:**
|
|
163
|
-
- `GET /dev/openapi` - Get enhanced OpenAPI documentation
|
|
163
|
+
- `GET /dev/openapi.json` - Get enhanced OpenAPI documentation
|
|
164
164
|
|
|
165
165
|
**Example:**
|
|
166
166
|
```typescript
|
package/dist/index.cjs
CHANGED
|
@@ -28660,7 +28660,7 @@ __name(createOpenapiHandler, "createOpenapiHandler");
|
|
|
28660
28660
|
function createOpenapiRouter(openapiFilePath, enableEnhancement, context) {
|
|
28661
28661
|
const router = import_express.default.Router();
|
|
28662
28662
|
const handler = createOpenapiHandler(openapiFilePath, enableEnhancement);
|
|
28663
|
-
router.get("/", (req, res) => handler(req, res, context));
|
|
28663
|
+
router.get("/openapi.json", (req, res) => handler(req, res, context));
|
|
28664
28664
|
return router;
|
|
28665
28665
|
}
|
|
28666
28666
|
__name(createOpenapiRouter, "createOpenapiRouter");
|
|
@@ -28669,7 +28669,7 @@ __name(createOpenapiRouter, "createOpenapiRouter");
|
|
|
28669
28669
|
var OPENAPI_ROUTES = [
|
|
28670
28670
|
{
|
|
28671
28671
|
method: "GET",
|
|
28672
|
-
path: "/",
|
|
28672
|
+
path: "/openapi.json",
|
|
28673
28673
|
description: "Serve enhanced OpenAPI specification with source code references"
|
|
28674
28674
|
}
|
|
28675
28675
|
];
|
|
@@ -28677,7 +28677,7 @@ function createOpenapiMiddleware(options) {
|
|
|
28677
28677
|
const { openapiFilePath, enableEnhancement = true } = options;
|
|
28678
28678
|
return {
|
|
28679
28679
|
name: "openapi",
|
|
28680
|
-
mountPath: "/
|
|
28680
|
+
mountPath: "/dev",
|
|
28681
28681
|
routes: OPENAPI_ROUTES,
|
|
28682
28682
|
enabled: /* @__PURE__ */ __name((context) => context.isDev, "enabled"),
|
|
28683
28683
|
createRouter: /* @__PURE__ */ __name((context) => {
|