This commit is contained in:
tamaina
2023-05-10 17:48:21 +00:00
parent 3324f3fa15
commit ac99cdce8b
8 changed files with 20 additions and 20 deletions

View File

@@ -102,8 +102,8 @@
"jsdom": "21.1.1",
"json5": "2.2.3",
"jsonld": "8.1.1",
"meilisearch": "0.32.3",
"jsrsasign": "10.8.6",
"meilisearch": "0.32.3",
"mfm-js": "0.23.3",
"mime-types": "2.1.35",
"misskey-js": "workspace:*",
@@ -210,6 +210,7 @@
"eslint-plugin-import": "2.27.5",
"execa": "6.1.0",
"jest": "29.5.0",
"jest-mock": "29.5.0"
"jest-mock": "29.5.0",
"schema-type": "github:misskey-dev/schema-type"
}
}

View File

@@ -1,3 +1,6 @@
export type Packed<x extends keyof typeof refs> = SchemaType<typeof refs[x]>;
import {
packedUserLiteSchema,
packedUserDetailedNotMeOnlySchema,
@@ -64,8 +67,6 @@ export const refs = {
Flash: packedFlashSchema,
};
export type Packed<x extends keyof typeof refs> = SchemaType<typeof refs[x]>;
type TypeStringef = 'null' | 'boolean' | 'integer' | 'number' | 'string' | 'array' | 'object' | 'any';
type StringDefToType<T extends TypeStringef> =
T extends 'null' ? null :

View File

@@ -1,6 +1,6 @@
import * as fs from 'node:fs';
import Ajv from 'ajv';
import type { Schema, SchemaType } from '@/misc/json-schema.js';
import type { JSONSchema7, SchemaType } from 'schema-type';
import type { LocalUser } from '@/models/entities/User.js';
import type { AccessToken } from '@/models/entities/AccessToken.js';
import { ApiError } from './error.js';

View File

@@ -5,7 +5,7 @@ import type { UsersRepository, NotesRepository } from '@/models/index.js';
import type { Note } from '@/models/entities/Note.js';
import type { LocalUser, User } from '@/models/entities/User.js';
import { isActor, isPost, getApId } from '@/core/activitypub/type.js';
import type { SchemaType } from '@/misc/json-schema.js';
import type { SchemaType } from 'schema-type';
import { ApResolverService } from '@/core/activitypub/ApResolverService.js';
import { ApDbResolverService } from '@/core/activitypub/ApDbResolverService.js';
import { MetaService } from '@/core/MetaService.js';

View File

@@ -1,5 +1,5 @@
import type { Schema } from '@/misc/json-schema.js';
import { refs } from '@/misc/json-schema.js';
import { refs } from 'misskey-js';
export function convertSchemaToOpenApiSchema(schema: Schema) {
const res: any = schema;