GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Contribute
  • Docs
  • Getting Started
  • Installation
  • Usage
  • How does it work?
  • FAQ
  • Upgrading from v4 to v5
  • Authentication
  • Parameters and Payloads
  • Server Configurations
  • Making Requests
  • Suggest Edits

This view

  • Original page
  • New address

GeezerVison is showing api.readme.dev — Getting Started

Magical SDK generation from an OpenAPI definition 🪄

NPM Version Node Version MIT License Build status

  • Installation
  • Usage
    • Authentication
    • Parameters and Payloads
    • Making requests
    • Server configurations
  • How does it work?
  • FAQ

api is a library that facilitates creating an SDK from an OpenAPI definition. You can use its codegen offering to create an opinionated SDK for TypeScript or JS (+ TypeScript types).

$ npx api install https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json
const petstore = require('@api/petstore');

petstore.listPets().then(({ data }) => {
  console.log(`My pets name is ${data[0].name}!`);
});

The ESM syntax is supported as well:

import petstore from '@api/petstore';

petstore.listPets().then(({ data }) => {
  console.log(`My pets name is ${data[0].name}!`);
});

Updated over 2 years ago


You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.