Skip to content
Proyek

Norbiros/nuxt-open-fetch

Lihat di GitHub

Tentang

Generate zero-overhead, typed OpenAPI clients for Nuxt.

Pengembangan web dan aplikasi

Cara angka ini diukur

Yang dapat Anda lakukan

  • 🍹 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

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
0
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Nuxt Open Fetch

Nuxt Open Fetch

npm version License Nuxt

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

  1. Add 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
  1. Add nuxt-open-fetch to the modules section of nuxt.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.

Jelajahi proyek terkait

Memuat…