Skip to main content
Home
This package has been archived, and as such it is read-only.

latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
47%
Published
a year ago (0.14.10)

Smallweb openapi types

Usage with feTS

import { createClient, type NormalizeOAS } from 'npm:fets'
import type openapi from 'jsr:@smallweb/openapi'

const client = createClient<NormalizeOAS<typeof openapi>>({
    endpoint: 'https://<your-domain>',
    globalParams: {
        headers: {
            Authorization: 'Bearer <your-token>'
        }
    }
})

const response = await client['/v0/apps/{app}'].get({
    params: {
        app: "demo" // params are automatically typed
    }
})
if (!response.ok) {
    throw new Error("Failed to fetch app")
}

const app = await response.json() // typed as App
console.log(app)

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@smallweb/openapi

Import symbol

import * as openapi from "@smallweb/openapi";
or

Import directly with a jsr specifier

import * as openapi from "jsr:@smallweb/openapi";

Add Package

pnpm i jsr:@smallweb/openapi
or (using pnpm 10.8 or older)
pnpm dlx jsr add @smallweb/openapi

Import symbol

import * as openapi from "@smallweb/openapi";

Add Package

yarn add jsr:@smallweb/openapi
or (using Yarn 4.8 or older)
yarn dlx jsr add @smallweb/openapi

Import symbol

import * as openapi from "@smallweb/openapi";

Add Package

vlt install jsr:@smallweb/openapi

Import symbol

import * as openapi from "@smallweb/openapi";

Add Package

npx jsr add @smallweb/openapi

Import symbol

import * as openapi from "@smallweb/openapi";

Add Package

bunx jsr add @smallweb/openapi

Import symbol

import * as openapi from "@smallweb/openapi";