feat(db): add phase1 device role, links, and commands schema
This commit is contained in:
@@ -405,8 +405,7 @@ registry.registerPath({
|
||||
|
||||
export function buildOpenApiDocument() {
|
||||
const generator = new OpenApiGeneratorV3(registry.definitions);
|
||||
|
||||
return generator.generateDocument({
|
||||
const document = generator.generateDocument({
|
||||
openapi: '3.0.3',
|
||||
info: {
|
||||
title: 'Backend API',
|
||||
@@ -419,19 +418,23 @@ export function buildOpenApiDocument() {
|
||||
{ name: 'Videos', description: 'Authenticated video object operations' },
|
||||
{ name: 'Admin', description: 'Basic-auth protected admin operations' },
|
||||
],
|
||||
components: {
|
||||
securitySchemes: {
|
||||
cookieAuth: {
|
||||
type: 'apiKey',
|
||||
in: 'cookie',
|
||||
name: 'better-auth.session_token',
|
||||
description: 'Better Auth session cookie',
|
||||
},
|
||||
basicAuth: {
|
||||
type: 'http',
|
||||
scheme: 'basic',
|
||||
},
|
||||
});
|
||||
|
||||
document.components = {
|
||||
...(document.components ?? {}),
|
||||
securitySchemes: {
|
||||
cookieAuth: {
|
||||
type: 'apiKey',
|
||||
in: 'cookie',
|
||||
name: 'better-auth.session_token',
|
||||
description: 'Better Auth session cookie',
|
||||
},
|
||||
basicAuth: {
|
||||
type: 'http',
|
||||
scheme: 'basic',
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return document;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user