Skip to content

Commit

Permalink
fix: response type is not valid openapi object
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Feb 15, 2024
1 parent 41be5a3 commit 42e0261
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
import { DI } from '@/di-symbols.js';
import { ApiError } from '@/server/api/error.js';
import { QueryService } from '@/core/QueryService.js';
import {IEndpointMeta} from "@/server/api/endpoints.js";

export const meta = {
tags: ['admin'],
Expand All @@ -25,8 +26,16 @@ export const meta = {
},
},

res: { type: 'any' }, // no type data
} as const;
res: {
oneOf: [
{ type: "object" },
{
type: 'array',
items: { type: 'object' },
},
]
},
} as const satisfies IEndpointMeta;

export const paramDef = {
type: 'object',
Expand Down

0 comments on commit 42e0261

Please sign in to comment.