Closed enzonotario closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
vitepress-openapi | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 25, 2024 10:28pm |
[!CAUTION]
Review failed
The pull request is closed.
The pull request introduces significant changes to the handling of OpenAPI specifications across various components and files. Key modifications include the restructuring of the enhanceApp
method to incorporate an openapi
parameter, the introduction of a new usePaths
function, and the removal of the useOpenapi
function in favor of a more streamlined approach. Additionally, several components have been updated to utilize the new openapi
instance, enhancing their integration with OpenAPI data. Documentation has also been revised to reflect these changes and improve clarity.
File | Change Summary |
---|---|
dev/.vitepress/theme/index.ts |
Updated enhanceApp method to include openapi parameter; removed useTheme logic. |
dev/operations/[operationId].paths.js |
Replaced OpenApi import with usePaths ; modified paths method to use new structure. |
docs/.vitepress/theme/index.ts |
Updated enhanceApp method to pass openapi directly; removed previous app.provide method. |
docs/example/operations/[operationId].md |
Removed useOpenapi import and associated variable. |
docs/example/operations/[operationId].paths.js |
Replaced useOpenapi with usePaths ; streamlined path processing logic. |
docs/guide/getting-started.md |
Revised documentation for enhanceApp and useOpenapi to reflect new usage patterns. |
docs/layouts/one-operation.md |
Updated example code to use usePaths instead of useOpenapi . |
package.json |
Updated version and modified dev script for debugging; adjusted peerDependencies order. |
src/components/Common/OAInfo.vue |
Added openapi prop; modified logic for obtaining OpenAPI instance. |
src/components/Common/OAOperation.vue |
Updated to use openapi prop instead of spec . |
src/components/Common/OAServers.vue |
Added openapi prop; modified initialization logic. |
src/components/Common/OASpec.vue |
Updated to use openapi instance; modified prop passing in template. |
src/components/Path/OAPath.vue |
Removed spec and parsedSpec props; added openapi prop. |
src/components/Path/OAPaths.vue |
Renamed spec to openapi and removed parsedSpec . |
src/components/Path/OAPathsByTags.vue |
Updated to use openapi instead of spec ; removed parsedSpec . |
src/components/Path/OAPathsSummary.vue |
Removed spec prop; retained paths and isDark . |
src/lib/OpenApi.ts |
Removed transformSpec ; added optional transformedSpec parameter. |
src/lib/createOpenApiInstance.ts |
Introduced createOpenApiInstance function for OpenAPI instantiation. |
src/lib/getOpenApiInstance.ts |
Updated function signature to include id parameter; refined instantiation logic. |
src/lib/parseSpec.ts |
Added parseSpec function for processing OpenAPI specifications. |
src/lib/transformSpec.ts |
Introduced transformSpec function for modifying OpenAPI specifications. |
test/composables/openapi.test.ts |
Updated tests to use createOpenApiInstance instead of OpenApi . |
src/composables/useOpenapi.ts |
Removed previous implementation; introduced new structure for OpenAPI handling. |
src/composables/usePaths.ts |
Added usePaths function for managing OpenAPI paths. |
src/composables/useTheme.ts |
Restructured theme configuration; added new interfaces for type safety. |
eslint.config.js |
Added rules to disable "no use before define" for JavaScript and TypeScript. |
src/lib/deepUnref.ts |
Introduced utility functions for deeply unreferencing Vue Ref types. |
enhanceApp
method in docs/.vitepress/theme/index.ts
, related to OpenAPI integration.OAInfo
and OAServers
components, relevant to the handling of the openapi
instance.enhanceApp
method in dev/.vitepress/theme/index.ts
and docs/.vitepress/theme/index.ts
, aligning with updates in the main PR.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
pnpm add https://pkg.pr.new/vitepress-openapi@98
pnpm add https://pkg.pr.new/vitepress-openapi@98
commit: c900554
Description
useOpenapi
instance to support multiple schemasusePaths
composable to build pathsuseTheme
composable to be able to config it via object likeuseTheme({ i18n: { ... } })
Related issues/external references
Types of changes