Closed enzonotario closed 4 weeks 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 22, 2024 1:19am |
The pull request introduces significant modifications to the vitepress-openapi
project, primarily focusing on how the OpenAPI specification is integrated and utilized across various components and files. Key changes include the removal of the useTheme
function, updates to the enhanceApp
method, and the introduction of a new createOpenApiInstance
function. The handling of OpenAPI instances is streamlined, with components now accepting an openapi
prop instead of a spec
, enhancing flexibility and simplifying the overall architecture.
File Path | Change Summary |
---|---|
dev/.vitepress/theme/index.ts | Removed useTheme imports and updated theme.enhanceApp to include openapi . |
package.json | Updated version to 0.0.3-alpha.43 , modified dev script, reordered peerDependencies , added openapi-types , and moved vitepress to devDependencies . |
src/components/Common/OAInfo.vue | Added openapi prop to defineProps , updated initialization logic to use openapi prop or fallback to getOpenApiInstance . |
src/components/Common/OAOperation.vue | Imported inject and getOpenApiInstance , created openapi constant, updated template bindings to use openapi . |
src/components/Common/OAServers.vue | Added openapi prop, updated initialization logic to check for props.openapi . |
src/components/Common/OASpec.vue | Removed OpenApi and useOpenapi imports, updated to use getOpenApiInstance , modified child components to accept openapi prop. |
src/components/Path/OAPath.vue | Removed spec and parsedSpec , added openapi , simplified initialization logic. |
src/components/Path/OAPaths.vue | Replaced spec with openapi , removed parsedSpec , updated template bindings. |
src/components/Path/OAPathsByTags.vue | Renamed spec to openapi , removed parsedSpec , updated method for obtaining OpenAPI instance. |
src/components/Path/OAPathsSummary.vue | Removed spec , added isDark property. |
src/composables/useOpenapi.ts | Replaced OpenApi import with types from openapi-types , updated structure to use mainSchema , modified return object. |
src/index.ts | Updated enhanceApp method to accept openapi parameter and register it with the Vue application. |
src/lib/OpenApi.ts | Removed transformSpec , added transformedSpec parameter, simplified error handling in getParsedSpec . |
src/lib/createOpenApiInstance.ts | Introduced createOpenApiInstance function for transforming and parsing OpenAPI specifications. |
src/lib/getOpenApiInstance.ts | Updated function signature to include new parameters and modified logic for handling custom . |
src/lib/parseSpec.ts | Added parseSpec function for merging and dereferencing OpenAPI specifications with error handling. |
src/lib/transformSpec.ts | Introduced transformSpec function for processing OpenAPI specifications. |
docs/.vitepress/theme/index.ts | Updated import from useOpenapi to vitepressOpenAPI , modified enhanceApp method for OpenAPI integration. |
docs/guide/getting-started.md | Updated documentation to reflect changes in OpenAPI integration, replacing useOpenapi with vitepressOpenAPI . |
dev/operations/[operationId].paths.js | Changed import from OpenApi to useOpenapi , updated instantiation logic. |
docs/example/operations/[operationId].md | Removed useOpenapi import and related variable initialization. |
docs/example/operations/[operationId].paths.js | Simplified logic in paths method by directly calling openapi.getPathsByVerbs() . |
dev/.vitepress/theme/index.ts
file to remove useTheme
, impacting sidebar configuration and internationalization.OAInfo
and OAServers
components, relevant to updates in handling OpenAPI instances in the main PR.useTheme
in the main PR.OASpec
component.scrollIntoView
functionality, enhancing user experience in OpenAPI documentation.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@97
pnpm add https://pkg.pr.new/vitepress-openapi@97
commit: fc1639e
Description
Related issues/external references
Types of changes