Skip to content

Releases: enzonotario/vitepress-openapi

v0.0.3-alpha.43

16 Oct 23:26
5c71dc9
Compare
Choose a tag to compare

   🚀 Features

    View changes on GitHub

v0.0.3-alpha.42

16 Oct 22:17
Compare
Choose a tag to compare

   🚨 Breaking Changes

   🚀 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

13 Oct 22:17
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v0.0.3-alpha.40

13 Oct 17:38
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v0.0.3-alpha.39

12 Oct 14:52
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v0.0.3-alpha.38

11 Oct 21:56
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v0.0.3-alpha.37

08 Oct 22:42
Compare
Choose a tag to compare

   🚨 Breaking Changes

   🚀 Features

    View changes on GitHub

v0.0.3-alpha.36

08 Oct 02:20
Compare
Choose a tag to compare

   🚨 Breaking Changes

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

06 Oct 14:56
317a6b8
Compare
Choose a tag to compare

   🚨 Breaking Changes

    View changes on GitHub

Migration Guide

  1. Uninstall the old package:
npm uninstall vitepress-theme-openapi

pnpm uninstall vitepress-theme-openapi

yarn remove vitepress-theme-openapi

bun uninstall vitepress-theme-openapi
  1. Install the new package:
npm install vitepress-openapi 

pnpm add vitepress-openapi

yarn add vitepress-openapi

bun install vitepress-openapi
  1. Replace all occurrences of vitepress-theme-openapi with vitepress-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

05 Oct 23:25
ef8502f
Compare
Choose a tag to compare

🚀 Features

🐞 Bug Fixes

    View changes on GitHub