hippofish/packages/backend/src/server/api/endpoints/test.ts

26 lines
590 B
TypeScript
Raw Normal View History

2023-01-13 05:40:33 +01:00
import define from "../define.js";
export const meta = {
2023-01-13 05:40:33 +01:00
tags: ["non-productive"],
2023-01-13 05:40:33 +01:00
description: "Endpoint for testing input validation.",
requireCredential: false,
} as const;
export const paramDef = {
2023-01-13 05:40:33 +01:00
type: "object",
properties: {
2023-01-13 05:40:33 +01:00
required: { type: "boolean" },
string: { type: "string" },
default: { type: "string", default: "hello" },
nullableDefault: { type: "string", nullable: true, default: "hello" },
id: { type: "string", format: "misskey:id" },
},
2023-01-13 05:40:33 +01:00
required: ["required"],
} as const;
export default define(meta, paramDef, async (ps, me) => {
return ps;
});