OpenAPI & Swagger UI
Generate an API reference straight from your actions
The problem: a mobile or partner team needs to consume your endpoints, but hand-written API docs drift out of sync the moment you change a schema.
The fix: enable the openapi module option. nuxt-actions emits an OpenAPI 3.1 document from your action schemas, with an optional Swagger UI — always in step with the code.
Live endpoints
Both routes are served by the module — no extra handlers needed.
How it works
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-actions'],
actions: {
openapi: {
ui: true, // serves Swagger UI at /_actions/openapi
info: { title: 'nuxt-actions example API', version: '1.4.0' },
},
},
})