UNPKG

@chord-ts/rpc

Version:

💎 Cutting edge transport framework vanishing borders between frontend and backend

183 lines • 4.39 kB
import type { InfoObject, Openrpc, MethodObject, Servers } from '@open-rpc/meta-schema'; import { MethodDescription } from '../types'; export declare class SchemaGenerator { private schema; constructor(config?: { openrpc?: Openrpc; info?: InfoObject; servers?: Servers; }); describeMethod(method: MethodDescription): MethodObject | undefined; render(): string; } export declare const example: { openrpc: string; info: { version: string; title: string; license: { name: string; }; }; servers: { url: string; }[]; methods: ({ name: string; summary: string; tags: { name: string; }[]; params: { name: string; description: string; required: boolean; schema: { type: string; minimum: number; }; }[]; result: { name: string; description: string; schema: { $ref: string; }; $ref?: undefined; }; errors: { code: number; message: string; }[]; examples: { name: string; description: string; params: { name: string; value: number; }[]; result: { name: string; value: { id: number; name: string; tag: string; }[]; }; }[]; } | { name: string; summary: string; tags: { name: string; }[]; params: ({ name: string; description: string; required: boolean; schema: { type: string; }; } | { name: string; description: string; schema: { type: string; }; required?: undefined; })[]; examples: { name: string; description: string; params: { name: string; value: string; }[]; result: { name: string; value: number; }; }[]; result: { $ref: string; name?: undefined; description?: undefined; schema?: undefined; }; errors?: undefined; } | { name: string; summary: string; tags: { name: string; }[]; params: { $ref: string; }[]; result: { name: string; description: string; schema: { $ref: string; }; $ref?: undefined; }; examples: { name: string; description: string; params: { name: string; value: number; }[]; result: { name: string; value: { name: string; tag: string; id: number; }; }; }[]; errors?: undefined; })[]; components: { contentDescriptors: { PetId: { name: string; required: boolean; description: string; schema: { $ref: string; }; }; }; schemas: { PetId: { type: string; minimum: number; }; Pet: { type: string; required: string[]; properties: { id: { $ref: string; }; name: { type: string; }; tag: { type: string; }; }; }; Pets: { type: string; items: { $ref: string; }; }; }; }; }; //# sourceMappingURL=index.d.ts.map