spatial
4 years agoNew Contributor
Process workflow using API contract
Hello,
I have a question about a process workflow and its representation in the API contract. So, for example, I want to process a payment. I define a payment API. When the payment is received from another service, that service contacts a fraud detection system. My service will receive the payment but does not deliver the order. It waits for the fraud detection system to send a report. If the report is clean then I will deliver the order. This is the general idea of a workflow I have.
Is there a recommended way to model this swagger contract ? I am not asking about DDD principles here. That will be taken care by the backend code.
Can Open API model a workflow like this ? It is stateless and driven by API call events.
Thanks.