nuxt-open-fetch
Nuxt Open Fetch
Generate zero-overhead, 100% typed OpenAPI clients for Nuxt.
In other words - $fetch and useFetch on steroids. Uses awesome openapi-typescript generator under the hood.
[!WARNING] APIs are subject to change before
v1.0.0. All ideas/suggestions are welcome!
[!IMPORTANT] Special thanks to @enkot for creating the original module - this project wouldn't be possible without your work 🎉
Features
- 🍹 No manual typing of your API
- 🍋 Supports OpenAPI 3.0 and 3.1 (including advanced features like discriminators)
- 🌲 Uses runtime-free types that outperform old-school codegen
- 📡 Load schemas from YAML or JSON, locally or remotely
- 🥞 Works with Nuxt Layers
Quick Setup
- Add
nuxt-open-fetchdependency to your project
# Using pnpm
pnpm add -D nuxt-open-fetch
# Using yarn
yarn add --dev nuxt-open-fetch
# Using bun
bun add -D nuxt-open-fetch
# Using npm
npm install --save-dev nuxt-open-fetch
- Add
nuxt-open-fetchto themodulessection ofnuxt.config.ts
export default defineNuxtConfig({
modules: [
'nuxt-open-fetch'
]
})
That's it! You can now use nuxt-open-fetch in your Nuxt app ✨
Development
# Install dependencies
pnpm install
# Generate type stubs
pnpm dev:prepare
# Develop with the playground
pnpm dev
# Build the playground
pnpm dev:build
# Run ESLint
pnpm lint
# Run Vitest
pnpm test
pnpm test:watch
pnpm test --project nuxt
pnpm test --project types
# Release new version
pnpm release
License
Made with 💚
Published under the MIT License.
Related Packages
Auto-generated composables for any API, typed from OpenAPI and never exposing yo...
Generate type-safe Nuxt 3 & 4 composables from OpenAPI schemas
Nuxt module for generating an OpenAPI SDK, composables, server routes, and headl...
Version History
| Version | Released | License |
|---|---|---|
| 1.13.8 | MIT | |
| 0.13.9 | MIT | |
| 0.13.8 | MIT | |
| 0.13.7 | MIT | |
| 0.13.6 | MIT | |
| 0.13.5 | MIT | |
| 0.13.4 | MIT | |
| 0.13.3 | MIT | |
| 0.13.2 | MIT | |
| 0.13.1 | MIT | |
| 0.13.0 | MIT | |
| 0.12.2 | MIT | |
| 0.12.1 | MIT | |
| 0.12.0 | MIT | |
| 0.9.5 | MIT | |
| 0.9.4 | MIT | |
| 0.9.3 | MIT | |
| 0.9.2 | MIT | |
| 0.9.1 | MIT | |
| 0.9.0 | MIT | |
| 0.8.0 | MIT | |
| 0.7.0 | MIT | |
| 0.6.5 | MIT | |
| 0.6.4 | MIT | |
| 0.6.3 | MIT | |
| 0.6.2 | MIT | |
| 0.6.1 | MIT | |
| 0.6.0 | MIT | |
| 0.5.2 | MIT | |
| 0.5.1 | MIT |
Showing the latest 30 of 53. See every release on npm
