We need to provide the specification (or contract) by which users can interact with Warehouse Service.
In Java terms, we need only Interfaces and Dtos in the scope of this task.
Provide a contract for supplying to the existing inventory, e.g. when the merchant is going to supply new products to his inventory (for example +3 quantity of Harry Potter books).
Provide a contract for allocating the inventory, e.g. allocate a new space for the inventory in our warehouse that will be owned by a specific merchant.
Acceptance Criteria
The spec submodule is added
Defined the Request, Response objects
Defined the Interface for interacting with the Warehouse Service
Well-documented specification with JavaDoc and OpenApi
Ability to extend the contract in the future without impacting clients (versioning)
Technical Details
Explore versioning of REST API
Explore what is Specification Driven Development
Explore what is Api First Approach
Explore springdoc-openapi-starter-webflux-ui and springdoc-openapi-starter-webmvc-ui
Remember about SOLID (Interface Segregation Principle)
Context
supplying to the existing inventory
, e.g. when the merchant is going to supply new products to his inventory (for example+3
quantity of Harry Potter books).allocating the inventory
, e.g. allocate a new space for the inventory in our warehouse that will be owned by a specific merchant.Acceptance Criteria
spec
submodule is addedTechnical Details
springdoc-openapi-starter-webflux-ui
andspringdoc-openapi-starter-webmvc-ui