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 🎉
nuxt-open-fetch dependency 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
nuxt-open-fetch to the modules section of nuxt.config.tsexport default defineNuxtConfig({
modules: [
'nuxt-open-fetch'
]
})
That's it! You can now use nuxt-open-fetch in your Nuxt app ✨
# 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
# Release new version
pnpm release
Made with 💚
Published under the MIT License.