Code Monkey home page Code Monkey logo

nuxt-open-fetch's Introduction

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.

⚠️ APIs are subject to change. All ideas/suggestions are welcome! :)

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

# Release new version
pnpm release

License

Made with 💚

Published under the MIT License.

nuxt-open-fetch's People

Contributors

enkot avatar hempflower avatar nuxt-studio[bot] avatar ilyasemenov avatar huang-julien avatar guibulator avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.