Releases: enzonotario/vitepress-openapi
Releases · enzonotario/vitepress-openapi
v0.0.3-alpha.43
🚀 Features
- OAParameter: Show example/s value/s - by @enzonotario in #94 (5c71d)
View changes on GitHub
v0.0.3-alpha.42
🚨 Breaking Changes
- OAPath: Remove
end-top
slot - by @enzonotario (5ab61)
🚀 Features
- openapi: Add getOpenApiInstance to manage between custom/injected/global specs - by @enzonotario (23a20)
View changes on GitHub
If using have configured the Theme to use a Global Spec, it's recommended to update your configuration to:
import DefaultTheme from 'vitepress/theme'
import type { Theme } from 'vitepress'
import { theme, useOpenapi } from 'vitepress-openapi'
import 'vitepress-openapi/dist/style.css'
import spec from '../../public/openapi.json' assert { type: 'json' }
export default {
extends: DefaultTheme,
async enhanceApp({ app, router, siteData }) {
// Set the OpenAPI specification.
const openapi = useOpenapi({ spec })
app.provide('openapi', openapi) // <--- provide openapi instance
// Use the theme.
theme.enhanceApp({ app })
}
} satisfies Theme
See more: https://vitepress-openapi.vercel.app/guide/getting-started.html#theme-configuration
v0.0.3-alpha.41
🐞 Bug Fixes
- hasExample: Consider
examples
- by @enzonotario (0662f) - openapi: Avoid parsing spec on every Operation, for better performance when using
OASpec
- by @enzonotario (e07cd)
View changes on GitHub
v0.0.3-alpha.40
🐞 Bug Fixes
- OAPaths: Correctly display
hr
line after every Operation - by @enzonotario (c5b6a) - OpenApi: Default securitySchemes object - by @enzonotario (c3072)
View changes on GitHub
v0.0.3-alpha.39
🚀 Features
- Spec: Group by tags - by @enzonotario (1c09b)
🐞 Bug Fixes
- playground variables: Handle Boolean parameters with Checkbox - by @enzonotario (b9fd4)
View changes on GitHub
v0.0.3-alpha.38
🚀 Features
- components: OAInfo and OAServers - by @enzonotario in #80 (4aad3)
🐞 Bug Fixes
- i18n: Locale and fallbackLocale setup - by @enzonotario (f0f67)
- openapi parser: Handle exceptions gracefully - by @enzonotario (a33ef)
- schema property value: Wrap text - by @enzonotario in #77 (b938d)
- sidebar: Avoid SSR hydration mismatch - by @enzonotario (49481)
View changes on GitHub
v0.0.3-alpha.37
🚨 Breaking Changes
- operation title: Use operationId as heading id - by @enzonotario in #76 (a0346)
🚀 Features
- schemas: Handle schemas with content types - by @enzonotario (2bb84)
View changes on GitHub
v0.0.3-alpha.36
🚨 Breaking Changes
- sidebar style: Match VitePress default style - by @enzonotario in #74 (739de)
If anyone prefers the previous style, can create a style.css
file and import it after import 'vitepress-openapi/dist/style.css'
, with the following styles:
.VPSidebarItem:has(.OASidebarItem) .is-link:hover, .VPSidebarItem:has(.OASidebarItem) .is-active {
@apply bg-gray-200 text-gray-900 dark:bg-gray-800 dark:text-gray-100 rounded;
}
.VPSidebarItem:has(.OASidebarItem) .is-link {
@apply text-gray-500 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-800 rounded;
}
.VPSidebarItem:has(.OASidebarItem) .is-active .OASidebarItem-text {
@apply font-semibold;
}
.OASidebarItem-text {
@apply truncate max-w-[170px] text-gray-800 dark:text-gray-100;
}
🚀 Features
- operation: Allows to specify which Badges include to Operation Header (deprecated, operationId) - by @enzonotario (5c02d)
- useTheme: Allows to configure i18n - by @enzonotario (a28f5)
View changes on GitHub
v0.0.3-alpha.35
🚨 Breaking Changes
- Rename package to
vitepress-openapi
- by @enzonotario in #70 (317a6)
View changes on GitHub
Migration Guide
- Uninstall the old package:
npm uninstall vitepress-theme-openapi
pnpm uninstall vitepress-theme-openapi
yarn remove vitepress-theme-openapi
bun uninstall vitepress-theme-openapi
- Install the new package:
npm install vitepress-openapi
pnpm add vitepress-openapi
yarn add vitepress-openapi
bun install vitepress-openapi
- Replace all occurrences of
vitepress-theme-openapi
withvitepress-openapi
in your project:
# Replace all occurrences of `vitepress-theme-openapi` with `vitepress-openapi` in your project
find . -type f -exec sed -i 's/vitepress-theme-openapi/vitepress-openapi/g' {} +
v0.0.3-alpha.34
🚀 Features
- Authorizations: Allows to switch via Select - by @enzonotario in #66 (ef8502f)
🐞 Bug Fixes
- Try section: avoid SSR - by @enzonotario in #67 (02c4fc)