merge upstream 2025-02-03

This commit is contained in:
Hazelnoot 2025-02-03 14:31:26 -05:00
commit a4e86758c1
264 changed files with 15775 additions and 4919 deletions

View file

@ -3,13 +3,15 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { deepClone } from '@/misc/clone.js';
import type { Schema } from '@/misc/json-schema.js';
import { refs } from '@/misc/json-schema.js';
export function convertSchemaToOpenApiSchema(schema: Schema, type: 'param' | 'res', includeSelfRef: boolean): any {
// optional, nullable, refはスキーマ定義に含まれないので分離しておく
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { optional, nullable, ref, selfRef, ...res }: any = schema;
const { optional, nullable, ref, selfRef, ..._res }: any = schema;
const res = deepClone(_res);
if (schema.type === 'object' && schema.properties) {
if (type === 'res') {