Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nuxt-openapi-docs-module

on-org1.4kMIT5.2.13TypeScript support: included

A module for Nuxt.js to generate pages from OpenAPI specifications

nuxt, openapi, docs, panel, admin, indo, generator, nuxt2, nuxt3

readme

OpenApiDocs Nuxt Module Documentation

logo

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.

white image white image 2 black image mobile image

Installation

Quick Setup

  1. Add the module to your project:

    npx nuxi@latest module add nuxt-openapi-docs-module
  2. 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:
  2. Default folder: 'docs/openapi'
  3. 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.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[5.2.9] - 2024-07-24

Changed

  • update deps
  • fix array params in code example

[5.2.3] - 2024-05-24

Changed

  • update deps

Fixed

  • fix docs locales

[5.2.7] - 2024-05-05

Changed

  • add locales

[5.2.6] - 2024-05-05

Changed

  • add docs page
  • add plugin page to devtools
  • add types

[5.2.5] - 2024-05-04

Fixed

  • module without i18n

[5.2.4] - 2024-05-04

Changed

  • use lodash.template directly to compile template(#22) @danielroe

[5.2.3] - 2024-04-10

Changed

  • parser refactor
  • update deps

Added

Removed

[5.2.2] - 2024-03-26

Changed

  • Fix download from custom pages

[5.2.1] - 2024-03-26

Changed

  • Remove support for process.server/process.client #manniL
  • update deps

[5.1.15] - 2024-01-01

Changed

  • update deps

[5.1.9] - 2024-01-01

Added

  • example generate

[5.1.3] - 2023-12-18

Changed

  • change logo and footer

[5.1.1] - 2023-12-18

Changed

  • drop nitro support

[5.0.17] - 2023-11-30

Changed

  • fix perender

[5.0.14] - 2023-11-30

Changed

  • seo

[5.0.11] - 2023-11-30

Changed

  • fix styles
  • update deps

[5.0.9] - 2023-11-16

Changed

  • add chokidar for watch file changes

[5.0.4] - 2023-11-01

Changed

  • update deps

[5.0.1] - 2023-11-01

Changed

  • new version for nuxt 3 with nitro

[4.7.5] - 2023-08-28

Fixed

  • mobile submenu

[4.7.4] - 2023-08-25

Changed

  • add h4 anchors

[4.7.3] - 2023-08-25

Fixed

  • anchors copyToClipboard

[4.7.2] - 2023-08-25

Fixed

  • list link

[4.7.1] - 2023-08-25

Added

  • title link
  • title anchors
  • title scroll
  • copyToClipboard after a second returns the old text

Fixed

  • styles
  • list link

Changed

  • copyToClipboard moved to plugin

[4.6.1] - 2023-08-24

Added

  • add docs list(need enable)

[4.5.12] - 2023-08-24

Fixed

  • &br;

[4.5.11] - 2023-08-23

Fixed

  • popup click
  • styles

[4.5.10] - 2023-08-23

Added

  • &br; tag(new line)

Fixed

  • replace logic
  • styles

[4.5.9] - 2023-08-21

Changed

  • Restyle

[4.5.5] - 2023-08-16

Fixed

  • Search highlight

[4.5.4] - 2023-08-16

Added

  • Search highlight

[4.5.3] - 2023-08-16

Added

  • server detect from path

[4.5.2] - 2023-08-16

Added

  • get server url from variables

[4.5.1] - 2023-08-16

Added

  • server selector
  • log module info

Changed

  • change title to summary, if exist

Fixed

  • scroll

[4.4.12] - 2023-08-14

Changed

  • add url

[4.4.11] - 2023-08-14

Fixed

  • remove auth from components

[4.4.10] - 2023-08-09

Fixed

  • nuxt 3 localisation support

[4.4.7] - 2023-06-22

Fixed

  • image style
  • table style

[4.4.6] - 2023-06-06

Fixed

  • locale search

[4.4.5] - 2023-06-01

Fixed

  • p style

[4.4.4] - 2023-06-01

Fixed

  • new <> replacer
  • add 1.. to md parser

[4.4.3] - 2023-06-01

Fixed

  • fix reload

Changed

  • update deps

[4.4.2] - 2023-05-19

Fixed

  • fix not static routes

[4.4.1] - 2023-05-19

Changed

  • new routes generate logic

[4.3.3] - 2023-04-18

Changed

  • update deps

Fixed

  • locales

[4.3.1] - 2023-04-25

Changed

  • drop single vue version, make two versions
  • update styles

[4.3.2] - 2023-05-05

Changed

  • new logo
  • update deps

[4.2.9] - 2023-04-25

Changed

  • tr to plugin

Added

  • x-locales-reload in info(in true - full reload page, after change locale)

[4.2.7] - 2023-04-24

Fixed

  • bold menu
  • deprecated menu

[4.2.4] - 2023-04-24

Fixed

  • fix locale

[4.2.3] - 2023-04-22

Added

  • info style

[4.2.2] - 2023-04-22

Fixed

  • tag locale

[4.2.1] - 2023-04-22

Added

  • ref loader

[4.1.4] - 2023-04-22

Added

  • auth page

[4.1.1] - 2023-04-21

Changed

  • add full support i18n

[4.0.6] - 2023-04-20

Changed

  • new template build logic

Fixed

  • test fix i18n

[4.0.1] - 2023-04-20

Changed

Fixed

  • block title

[3.5.10] - 2023-04-19

Changed

  • update deps

Fixed

  • block title

[3.5.9] - 2023-04-17

Changed

  • add ref parser

Fixed

  • allOf

[3.5.8] - 2023-04-16

Added

  • add parser class
  • add external ref
  • webhooks

Fixed

  • allOf

[3.5.7] - 2023-04-14

Fixed

  • search
  • info and components path
  • nuxt 3 header

[3.5.2] - 2023-04-14

Fixed

  • nuxt locale path

[3.5.1] - 2023-04-14

Added

  • custom pages

Fixed

nuxt 3 auth

[3.4.3] - 2023-04-13

Removed

description in menu

[3.4.2] - 2023-04-13

Changed

  • add summary to menu(if exist)

[3.4.1] - 2023-04-13

Fixed

  • route logic
  • styles

[3.3.2] - 2023-04-12

Fixed

  • change tabs logic
  • update deps

[3.3.1] - 2023-04-12

Added

  • tabs

Fixed

  • fix style

[3.2.4] - 2023-04-11

Fixed

  • fix example

[3.2.4] - 2023-04-11

Added

  • add hide button

[3.2.3] - 2023-04-11

Added

  • add logo link

[3.2.2] - 2023-04-11

Changed

  • restyle

[3.2.1] - 2023-04-11

Changed

  • new tables

[3.1.5] - 2023-04-10

Added

  • info styles

[3.1.1] - 2023-04-10

Added

  • add nuxt-module-build

[3.0.1] - 2023-04-09

Added

  • universal version for nuxt 2 and 3
  • downloader

[1.8.1] - 2023-04-03

Added

  • plugin info
  • footer

Remover

  • ctx in file, need usr plugin - setAccess
  • params in config, need usr plugin - addParam

[1.7.5] - 2023-04-03

Added

  • plugin

Changed

  • more localization
  • localization files

[1.7.1] - 2023-04-03

Added

  • replace yaml to js-yaml
  • add @nuxt/kit for module
  • update code gen
  • update schemas
  • more examples
  • add layout
  • mere openapi standard generators
  • new locale system, see readme
  • new submenu
  • other... very big update

[1.6.1] - 2023-03-21

Added

  • search
  • ref replacer

[2.0.2] - 2023-03-21

Added

  • fix JQuery

[1.3.4] - 2023-03-21

Added

  • new self code gen

[2.0.1] - 2023-03-21

Added

  • add support nuxt 2

[1.3.4] - 2023-03-21

Added

  • add yaml dl button

[1.3.1] - 2023-03-17

Fixed

  • fixes

Changed

  • new build logic, data in template

[1.2.7] - 2023-03-17

Fixed

  • fix links

[1.2.6] - 2023-03-17

Fixed

  • fix style

[1.2.5] - 2023-03-17

Fixed

  • fix info gen

[1.2.4] - 2023-03-17

Added

  • example

[1.2.3] - 2023-03-17

Added

  • npmignore

[1.2.2] - 2023-03-17

Added

  • example

Fixed

  • code view
  • fix params
  • fix url

[1.2.0] - 2023-03-16

Added

  • add static target

Fixed

  • memory leak

Changed

  • drop express nnd use plugin
  • add css to template