title: Canonical data model in Microservice architecture
body: <p>Lets say i have 2 microservices (Service A, Service B) which can call each other both ways, lets say if A calls B then some parameters of response json of A will be consumed as some other parameter of request paramater of B</p>
  
  <p>now i realized, this problem can be better addressed by using Canonical data model, so that each service consume/produce a canonical data model,</p>
  
  <p>My question is how should a canonical model in this case(json) should look like</p>
  
  <p>suppose response of A looks like </p>
  
  <pre><code>{
    "A1": false,
    "A2": {
      "width": 5,
      "height": 10
    },
    "A3": "A green door"
  }
  </code></pre>
  
  <p>and there would be corresponding json schema, which i am not including here</p>
  
  <p>Similarly request of B looks like </p>
  
  <pre><code>{
        "B1": false,
        "B2": {
          "width": 5,
          "height": 10
        },
        "B3": "A green door",
        "B4": ""
         .
         .
  
      }
  </code></pre>
  
  <p>Attribute A1 is mapped to B1, should my canonical data model only include this first attribute with some name (business name: eg -->A1 is score B1 -->Report then buisness name might be --> Points) that commonly relates to both the microservice or should it be more of a aggregation of both json with each attribute replaced with corresponding business name?</p>