Extending the composite service API
In this section, we will see how we can extend the composite API with operations for creating and deleting composite entities. We will go through the following steps:
- Adding new operations to the composite service API
- Adding methods to the integration layer
- Implementing the new composite API operations
- Updating the composite service tests
Adding new operations to the composite service API
The composite versions of creating and deleting entities and handling aggregated entities are similar to the create and delete operations in the core service APIs. The major difference is that they have annotations added for OpenAPI-based documentation. For an explanation of the usage of the OpenAPI annotations @Operation
and @ApiResponse
, refer to Chapter 5, Adding an API Description Using OpenAPI, specifically the Adding API-specific documentation to the ProductCompositeService interface section.
The API operation...