Guide
This guide documents the current Nuxt-only workflow for nuxt-openapi-hyperfetch.
The module reads a local OpenAPI document during Nuxt builds, generates an SDK into openapi/, and optionally adds useFetch, useAsyncData, nuxtServer, and connector layers on top of that SDK.
Start Here
- What is Nuxt OpenAPI Hyperfetch? - Product overview and generated outputs
- Getting Started - Minimal setup in
nuxt.config.ts - Use as Nuxt Module - Full module configuration reference
- Core Concepts - How generation, runtimes, and composables fit together
- Generating Composables - What gets generated and when
- Choosing a Generator - Decide between
useFetch,useAsyncData,nuxtServer, andconnectors
Quick Start
ts
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-openapi-hyperfetch'],
openapi: {
input: './swagger.yaml',
output: './openapi',
generators: ['useFetch', 'useAsyncData'],
},
})Run npx nuxt dev or npm run dev and the module will generate the selected outputs before the build starts.
What You Get
- Type-safe SDK files generated from your OpenAPI schema
- Nuxt-friendly composables built on top of the SDK
- Optional server route generation for BFF-style flows
- Optional headless connectors for
useAsyncData - Auto-import support for generated composables
Suggested Reading Order
- Read What is Nuxt OpenAPI Hyperfetch?
- Follow Getting Started
- Keep Use as Nuxt Module open while configuring the module
- Read Core Concepts before customizing generated behavior
- Use Choosing a Generator to trim your output to what you actually need
