Nuxt OpenApi
This module adds a Tab to nuxt devtools. It shows your OpenApi spec.
Features
- ⛰ SwaggerUI or Redoc
- 🚠 Autoconfig for nuxt-drupal
Quick Setup
- Add
@woldtwerk/nuxt-openapi
dependency to your project
# Using pnpm
pnpm add -D @woldtwerk/nuxt-openapi
# Using yarn
yarn add --dev @woldtwerk/nuxt-openapi
# Using npm
npm install --save-dev @woldtwerk/nuxt-openapi
- Add
@woldtwerk/nuxt-openapi
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({
modules: [
'@woldtwerk/nuxt-openapi'
]
})
- Add your openapi url.
export default defineNuxtConfig({
openapi: {
url: 'https://myapi'
},
})
That's it! You can now use Nuxt OpenApi in your Nuxt app ✨
Drupal
If you use @woldtwerk/nuxt-drupal no configuration is needed. In your drupal you need to install openapi and openapi_ui.
Development
# Install dependencies
pnpm install
# Generate type stubs
pnpm run dev:prepare
# Develop with the playground
pnpm run dev
# Build the playground
pnpm run dev:build
# Run ESLint
pnpm run lint
# Run Vitest
pnpm run test
pnpm run test:watch
# Release new version
pnpm run release