github enzonotario/vitepress-openapi v0.0.3-alpha.82

latest releases: v0.1.9, v0.1.8, v0.1.7...
2 months ago

   🚨 Breaking Changes

This release introduces a breaking change to improve the developer experience and flexibility of sidebar template functions. We've refactored the function signatures from multiple positional parameters to a single object parameter with named properties.

What Changed

Before (v0.0.3-alpha.81):

sidebarItemTemplate: (method: string, path: string): string => `[${method}] ${path}`,
sidebarGroupTemplate: (path: string, depth: number): string => path,

After (v0.0.3-alpha.82):

sidebarItemTemplate: ({ method, path, title }): string => `[${method}] ${title || path}`,
sidebarGroupTemplate: ({ path, depth }): string => path,

Migration Guide

To update your existing code:

  1. For sidebarItemTemplate: Replace (method, path) with ({ method, path, title })
  2. For sidebarGroupTemplate: Replace (path, depth) with ({ path, depth })
    View changes on GitHub

Don't miss a new vitepress-openapi release

NewReleases is sending notifications on new releases.