github enzonotario/vitepress-openapi v0.1.14

9 hours ago

   🚀 Features

  • codeSamples: Replace hardcoded language maps with extensible central LanguageConfig  -  by @JulianVallee in #317 (891b5)

Refactor code samples to use a single, extensible LanguageConfig interface as the source of truth for language definitions. Each language now declares its own target, client, highlighter, and display metadata, removing the need for separate hardcoded mapping dictionaries.

Shiki now loads only core languages (json, xml, markdown) on init and loads additional highlighter languages on demand via ensureLanguage(), reducing initial bundle overhead.

BREAKING CHANGES:

  • codeSamples.langs config option has been removed; the set of displayed is now driven entirely by codeSamples.availableLanguages.
  • getCodeSamplesLangs() has been removed from the useTheme composable.
  • LanguageConfig interface now requires target and client properties used by @scalar/snippetz for code generation).
  • The GeneratorFunction signature changed from (lang: string, request: OARequest) to
      (langConfig: LanguageConfig, request: OARequest).
  • The codeSamples prop has been removed from the OACodeSamples component.
    View changes on GitHub

Don't miss a new vitepress-openapi release

NewReleases is sending notifications on new releases.