mirror of
https://github.com/hanzoai/trpc-openapi.git
synced 2026-10-30 18:18:55 +00:00
14 lines
463 B
TypeScript
14 lines
463 B
TypeScript
import { generateOpenApiDocument } from 'trpc-to-openapi';
|
|
|
|
import { appRouter } from './router';
|
|
|
|
// Generate OpenAPI schema document
|
|
export const openApiDocument = generateOpenApiDocument(appRouter, {
|
|
title: 'Example CRUD API',
|
|
description: 'OpenAPI compliant REST API built using tRPC with Next.js',
|
|
version: '1.0.0',
|
|
baseUrl: 'http://localhost:3000/api',
|
|
docsUrl: 'https://github.com/mcampa/trpc-to-openapi',
|
|
tags: ['auth', 'users', 'posts'],
|
|
});
|