Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generate zero-overhead, typed OpenAPI clients for Nuxt.

License

NotificationsYou must be signed in to change notification settings

Norbiros/nuxt-open-fetch

Repository files navigation

Nuxt Open Fetch

Nuxt Open Fetch

npm versionLicenseNuxt

Generate zero-overhead, 100% typed OpenAPI clients for Nuxt.

In other words -$fetch anduseFetch on steroids. Uses awesomeopenapi-typescript generator under the hood.

Warning

APIs are subject to change beforev1.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 likediscriminators)
  • 🌲  Uses runtime-free types that outperform old-school codegen
  • 📡  Load schemas from YAML or JSON, locally or remotely
  • 🥞  Works with NuxtLayers

Quick Setup

  1. Addnuxt-open-fetch dependency to your project
# Using pnpmpnpm add -D nuxt-open-fetch# Using yarnyarn add --dev nuxt-open-fetch# Using bunbun add -D nuxt-open-fetch# Using npmnpm install --save-dev nuxt-open-fetch
  1. Addnuxt-open-fetch to themodules section ofnuxt.config.ts
exportdefaultdefineNuxtConfig({modules:['nuxt-open-fetch']})

That's it! You can now usenuxt-open-fetch in your Nuxt app ✨

Development

# Install dependenciespnpm install# Generate type stubspnpm dev:prepare# Develop with the playgroundpnpm dev# Build the playgroundpnpm dev:build# Run ESLintpnpm lint# Run Vitestpnpmtestpnpm test:watch# Release new versionpnpm release

License

Made with 💚

Published under theMIT License.

About

Generate zero-overhead, typed OpenAPI clients for Nuxt.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors15


[8]ページ先頭

©2009-2025 Movatter.jp