woldtwerk / nuxt-openapi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nuxt OpenApi

npm version npm downloads License Nuxt

This module adds a Tab to nuxt devtools. It shows your OpenApi spec.

nuxt-openapi

Features

  • ⛰  SwaggerUI or Redoc
  • 🚠  Autoconfig for nuxt-drupal

Quick Setup

  1. 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
  1. Add @woldtwerk/nuxt-openapi to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    '@woldtwerk/nuxt-openapi'
  ]
})
  1. 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

About


Languages

Language:TypeScript 90.7%Language:Vue 9.3%