UNPKG

@ahoo-wang/fetcher-openapi

Version:

OpenAPI Specification TypeScript types for Fetcher - A modern, ultra-lightweight HTTP client for browsers and Node.js. Provides complete TypeScript support with type inference for OpenAPI 3.x schemas.

57 lines 1.78 kB
import { Schema } from './schema'; import { Reference } from './reference'; import { MediaType } from './parameters'; import { Extensible } from './extensions'; /** * HTTP methods as defined in the OpenAPI specification */ export type HTTPMethod = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace'; /** * Supported parameter locations in HTTP requests */ export type ParameterLocation = 'query' | 'header' | 'path' | 'cookie'; /** * Primitive data types supported by JSON Schema */ export type SchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object' | 'null'; /** * Additional external documentation * * @property description - A description of the target documentation * @property url - The URL for the target documentation */ export interface ExternalDocumentation extends Extensible { description?: string; url: string; } /** * Example object * * @property summary - Short description for the example * @property description - Long description for the example * @property value - Embedded literal example * @property externalValue - A URL that points to the literal example */ export interface Example extends Extensible { summary?: string; description?: string; value?: any; externalValue?: string; } /** * The Header Object follows the structure of the Parameter Object */ export interface Header extends Extensible { description?: string; required?: boolean; deprecated?: boolean; allowEmptyValue?: boolean; style?: string; explode?: boolean; allowReserved?: boolean; schema?: Schema | Reference; example?: any; examples?: Record<string, Example | Reference>; content?: Record<string, MediaType>; } //# sourceMappingURL=base-types.d.ts.map