reqに$refを許可しない

This commit is contained in:
tamaina 2023-05-22 03:20:49 +00:00
parent 810d065d21
commit e689dcdd73
1 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import type { JSONSchema7, SchemaType } from 'schema-type';
import type { References } from './schemas';
import type { endpoints } from './endpoints';
import type { DeepOmit } from 'ts-essentials';
export type RolePolicies = {
gtlAvailable: boolean;
@ -22,7 +23,10 @@ export type RolePolicies = {
rateLimitFactor: number;
};
export type EndpointDefines = ReadonlyArray<{ req: JSONSchema7 | undefined; res: JSONSchema7 | undefined; }>;
export type EndpointDefines = ReadonlyArray<{
req: DeepOmit<JSONSchema7, { $ref: never }> | undefined;
res: JSONSchema7 | undefined;
}>;
export interface IEndpointMeta {
readonly stability?: 'deprecated' | 'experimental' | 'stable';
@ -37,7 +41,7 @@ export interface IEndpointMeta {
};
};
readonly defines: ReadonlyArray<{ req: JSONSchema7 | undefined; res: JSONSchema7 | undefined; }>;
readonly defines: EndpointDefines;
/**
*