Files
documenso/packages/api/v1/openapi.ts
T
ephraimduncan fd94a403af docs: mark all v1 API endpoints as deprecated
Add deprecated flag and migration message to all 19 v1 API endpoints
to signal users should migrate to the v2 API.
2026-01-20 14:36:35 +00:00

44 lines
888 B
TypeScript

import { generateOpenApi } from '@ts-rest/open-api';
import { NEXT_PUBLIC_WEBAPP_URL } from '@documenso/lib/constants/app';
import { ApiContractV1 } from './contract';
export const OpenAPIV1 = Object.assign(
generateOpenApi(
ApiContractV1,
{
info: {
title: 'Documenso API',
version: '1.0.0',
description:
'[DEPRECATED] The Documenso API for retrieving, creating, updating and deleting documents. Please migrate to the v2 API.',
},
servers: [
{
url: NEXT_PUBLIC_WEBAPP_URL(),
},
],
},
{
setOperationId: true,
},
),
{
components: {
securitySchemes: {
authorization: {
type: 'apiKey',
in: 'header',
name: 'Authorization',
},
},
},
security: [
{
authorization: [],
},
],
},
);