85 lines
1.6 KiB
TypeScript
85 lines
1.6 KiB
TypeScript
/**
|
|
* OpenAPI Module for SmartServe
|
|
*
|
|
* Provides:
|
|
* - Decorators for API documentation and validation
|
|
* - OpenAPI 3.1 specification generation
|
|
* - Swagger UI / ReDoc handlers
|
|
* - Request validation using JSON Schema
|
|
*/
|
|
|
|
// Type exports
|
|
export type {
|
|
// OpenAPI Spec types
|
|
IOpenApiSpec,
|
|
IOpenApiInfo,
|
|
IOpenApiContact,
|
|
IOpenApiLicense,
|
|
IOpenApiServer,
|
|
IOpenApiServerVariable,
|
|
IOpenApiPathItem,
|
|
IOpenApiOperation,
|
|
IOpenApiParameter,
|
|
IOpenApiRequestBody,
|
|
IOpenApiMediaType,
|
|
IOpenApiResponse,
|
|
IOpenApiExample,
|
|
IOpenApiComponents,
|
|
IOpenApiSecurityScheme,
|
|
IOpenApiSecuritySchemeApiKey,
|
|
IOpenApiSecuritySchemeHttp,
|
|
IOpenApiSecuritySchemeOAuth2,
|
|
IOpenApiSecuritySchemeOpenIdConnect,
|
|
IOpenApiOAuthFlows,
|
|
IOpenApiOAuthFlow,
|
|
IOpenApiSecurityRequirement,
|
|
IOpenApiTag,
|
|
IOpenApiExternalDocs,
|
|
// Options types
|
|
IOpenApiGeneratorOptions,
|
|
IOpenApiOptions,
|
|
} from './openapi.types.js';
|
|
|
|
export type {
|
|
IValidationError,
|
|
IValidationResult,
|
|
} from './openapi.validator.js';
|
|
|
|
// Decorators
|
|
export {
|
|
ApiOperation,
|
|
ApiParam,
|
|
ApiQuery,
|
|
ApiHeader,
|
|
ApiRequestBody,
|
|
ApiResponseBody,
|
|
ApiSecurity,
|
|
ApiTag,
|
|
} from './openapi.decorators.js';
|
|
|
|
// Generator
|
|
export { OpenApiGenerator } from './openapi.generator.js';
|
|
|
|
// Handlers
|
|
export {
|
|
createOpenApiHandler,
|
|
createSwaggerUiHandler,
|
|
createReDocHandler,
|
|
} from './openapi.handlers.js';
|
|
|
|
// Validation
|
|
export {
|
|
validateSchema,
|
|
validateParam,
|
|
validateRequest,
|
|
createValidationInterceptor,
|
|
createValidationErrorResponse,
|
|
} from './openapi.validator.js';
|
|
|
|
// Coercion
|
|
export {
|
|
coerceValue,
|
|
coerceQueryParams,
|
|
coercePathParams,
|
|
} from './openapi.coerce.js';
|