Reusable components of the API operations.
This contains schemas, parameters, responses, and other reusable elements referenced throughout the API operations. It corresponds to the components section in an OpenAPI document.
CRITICAL: Components MUST include type definitions for EVERY TABLE in the Prisma schema. The AI generation process MUST create schema components for ALL database entities without exception, regardless of how many tables are in the database.
IMPORTANT: For all component types and their properties:
All request and response bodies must reference named types defined in this components section. This ensures consistency and reusability across the API.
When defining schema components, follow these standardized naming patterns for consistency and clarity:
IEntityName
IShoppingSale
, IShoppingOrder
)IEntityName.ICreate
IEntityName.IUpdate
IEntityName.IRequest
search
, sort
, page
, and limit
propertiesIEntityName.ISummary
IEntityName.IAbridge
: Intermediate view with more details than Summary
but less than full entity
IEntityName.IInvert
: Alternative representation of an entity from a
different perspective
IPageIEntityName
pagination
and data
propertiesThese naming conventions create a self-documenting API where the purpose of each schema is immediately clear from its name. This helps both developers and AI tools understand and maintain the API structure.
List of API operations.
This array contains all the API endpoints with their HTTP methods, descriptions, parameters, request/response structures, etc. Each operation corresponds to an entry in the paths section of an OpenAPI document.
CRITICAL: This array MUST include operations for EVERY TABLE defined in the Prisma schema. The AI generation MUST NOT skip or omit any tables when creating operations. The operations array MUST be complete and exhaustive, covering all database entities without exception.
IMPORTANT: For each API operation, ensure that:
Note that, combination of AutoBeOpenApi.IOperation.path and AutoBeOpenApi.IOperation.method must be unique.
Also, never forget any specification that is listed on the requirement analysis report and DB design documents. Every feature must be implemented in the API operations.
Document of the Restful API operations.
This interface serves as the root document for defining Restful API operations and components. It corresponds to the top-level structure of an OpenAPI specification document, containing all API operations and reusable components.
This simplified version focuses only on the operations and components, omitting other OpenAPI elements like info, servers, security schemes, etc. to keep the structure concise for AI-based code generation.
IMPORTANT: When creating this document, you MUST ensure that:
Type Naming Conventions
When defining component schemas, follow these naming conventions for consistency:
Main Entity Types: Use
IEntityName
format for main entity with detailed information (e.g.,IShoppingSale
)Related Operation Types: Use
IEntityName.IOperation
format with these common suffixes:IEntityName.ICreate
: Request body for creation operations (POST)IEntityName.IUpdate
: Request body for update operations (PUT)IEntityName.ISummary
: Simplified response version with essential propertiesIEntityName.IRequest
: Request parameters for list operations (often with search/pagination)IEntityName.IInvert
: Alternative view of an entity from a different perspectiveIPageIEntityName
: Paginated results container withpagination
anddata
propertiesThese consistent naming patterns create a predictable and self-documenting API that accurately reflects the underlying Prisma schema, making it easier for developers to understand the purpose of each schema and its relationship to the database model.