Files
tom goriunovandGitHub 83067139a3 Use Semi-Automatic OpenAPI Specs of the Backend API (#3300)
* Use Semi-Automatic OpenAPI Specs of the Backend API

Resolves #3204

* review fixes
2026-02-26 17:54:09 +01:00

13 lines
400 B
TypeScript

import * as yup from 'yup';
import { replaceQuotes } from 'configs/app/utils';
import type { ApiDocsTabId } from 'types/views/apiDocs';
import { API_DOCS_TABS } from 'types/views/apiDocs';
export const apiDocsSchema = yup
.object()
.shape({
NEXT_PUBLIC_API_DOCS_TABS: yup.array()
.transform(replaceQuotes)
.json()
.of(yup.string<ApiDocsTabId>().oneOf(API_DOCS_TABS)),
});