Template of integration contract - muhamed-hassan/safe_planet GitHub Wiki

Can be applied when designing:

  • RESTful web service(s) (providers)

    • Implemented as a set of RESTful endpoints
  • RESTful web service(s) (consumers)

    • Implemented as a set of RESTful clients

  • Controller / Client: ControllerName / ClientName Hint
  • HttpMethod Endpoint-URI Hint
  • Request:
    • Query string if any: key_1=value_1& ..& key_N=value_N Hint
      • key_1 => data type
      • ..
      • key_N => data type
    • Body as a JSON if any: {fieldName_1: fieldDataType_1, .., fieldName_N: fieldDataType_N} Hint
      • Validation requirements per field if any: as a list
    • Headers: as a list
    • Media type
  • Response:
  • Data storage READ/ WRITE[TX] Hint
    • Details about required operations over the data storage
      • READ => No need to use DB transactions
      • WRITE => You have to use a DB transaction. Hint
        • It's recommended to use optimistic locking mechanism during data-write(update) process
  • Semi data storage WRITE using message brokers => Used for asynchronous processing purposes AKA unblocking behavior to avoid holding end-user that uses frontend-channels 📱 💻 for a long time
    • WRITE => You have to produce a message to a message broker to be processed later (Request/Reply Pattern).

Endpoint request example: curl is used

Endpoint response example: curl is used


Nice to check this regarding data types.



faroeislands_landscapephotography_6