backend/source/api/actions/meta_spec.ts

38 lines
718 B
TypeScript
Raw Normal View History

2024-09-12 00:03:29 +02:00
namespace _zeitbild.api
{
/**
*/
export function register_meta_spec(
2024-10-30 07:20:13 +01:00
rest_subject : lib_plankton.rest_caldav.type_rest
2024-09-12 00:03:29 +02:00
) : void
{
2024-10-30 07:20:13 +01:00
lib_plankton.rest_caldav.register<
2024-09-12 00:03:29 +02:00
null,
any
>
(
rest_subject,
lib_plankton.http.enum_method.get,
_zeitbild.conf.get().server.path_base + "/meta/spec",
{
2024-11-28 23:08:24 +01:00
"description": () => "gibt die API-Spezifikation im OpenAPI-Format aus",
2024-09-12 00:03:29 +02:00
"input_schema": () => ({
"nullable": true,
}),
"output_schema": () => ({
}),
2024-11-28 23:08:24 +01:00
"restriction": () => restriction_none,
"execution": () => () => {
2024-09-12 00:03:29 +02:00
return Promise.resolve({
"status_code": 200,
2024-10-30 07:20:13 +01:00
"data": lib_plankton.rest_caldav.to_oas(rest_subject),
2024-09-12 00:03:29 +02:00
});
},
}
);
}
}