nuxt-openapi-docs-module

A module for Nuxt.js to generate pages from OpenAPI specifications
14,276 37
Install
npm install nuxt-openapi-docs-module
Latest Version:5.3.2
Vue:2 · 3
License:MIT
Last Updated:Aug 19, 2025
Links: GitHub  ·  npm
Maintainer: s00d

OpenApiDocs Nuxt Module Documentation

Introduction

The OpenApiDocs Nuxt Module is designed to seamlessly integrate OpenAPI documentation into Nuxt.js applications, supporting both Nuxt 2.x and 3.x. It utilizes Vue.js components to render the OpenAPI specifications dynamically. This module is ideal for developers looking to embed API documentation directly into their Nuxt.js projects.

work with static and server target

Package Version Information

Version Supported Nuxt Version
4.x 2.x and 3.x
5.0,5.1 3.x
>=5.2 >=3.7

Documentation and Support

Features

  • Support for Nuxt 2.x and 3.x: Works with both major versions of Nuxt.
  • Dynamic Documentation Rendering: Automatically renders OpenAPI specifications using Vue.js components.
  • Customizable: Offers several options to customize the documentation setup.
  • Localization Support: Integrates with the i18n plugin for multi-language support.
  • Development Tools: Includes tools and setups for development and customization of the module.

Installation

Quick Setup

  1. Add the module to your project:
  npx nuxi@latest module add nuxt-openapi-docs-module
  1. Configure the module in your Nuxt configuration:

For Nuxt 3:

export default defineNuxtConfig({
 modules: [
   'nuxt-openapi-docs-module'
 ]
})

For Nuxt 2:

module.exports = {
 modules: [
   'nuxt-openapi-docs-module',
 ],
}
  1. Create the OpenAPI documentation folder:
  • Default folder: 'docs/openapi'
  • Alternatively, specify a custom folder using the 'folder' option in the module configuration.

Configuration

Customize the module by modifying the 'nuxt.config.js' or 'nuxt.config.ts' file:

module.exports = {
  modules: [
    [
      'nuxt-openapi-docs-module',
      {
        folder: './docs/openapi',
        name: 'OpenApiDocs',
        files: function() { return { 'News-API': 'News API' } },
      }
    ],
  ],
  // Additional configurations...
}

Options

  • 'folder': Path to the folder containing OpenAPI specification files.
  • 'name': Name of the main component.
  • 'files': Function returning an object mapping file names to display names.
  • 'debug': Enable debug mode to print information to the console.
  • 'list': Toggle the display of document listings.
  • 'locales': Define supported locales.
  • 'logo': Custom logo in SVG format.
  • 'footer': Custom footer content.

Related Packages

mapomodule

Mapo is a nuxt module that helps in the creation of Administration Panels.

5,225 10
@mapomodule/core

This is part of Mapo nuxt module. Injects the core mapo plugin helpers.

2,908 10
@mapomodule/store

This is part of Mapo nuxt module. Injects mapo vuex store.

1,590 10
@habityzer/nuxt-openapi-composables

Generate type-safe Nuxt 3 & 4 composables from OpenAPI schemas

1,549 0
nuxt-healthz

Nuxt module - quick add healthcheck path: /healthcheck to Nuxt App project

2,536 1

Version History

Version Released License
5.3.2 MIT
5.3.1 MIT
5.3.0 MIT
5.2.13 MIT
5.2.12 MIT
Pre-releases (22)
Version Released License
5.0.0-beta.21 MIT
5.0.0-beta.20 MIT
5.0.0-beta.19 MIT
5.0.0-beta.18 MIT
5.0.0-beta.17 MIT