Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contract Driven Development - API Specification...

Contract Driven Development - API Specifications as Executable Contracts

Topic: Contract-Driven Development with Specmatic by leveraging API Specifications (Ex: OpenAPI, WSDL) as Executable Contracts to reduce time-to-market by allowing teams to build, test and deploy their MicroServices and MicroFrontends independently. Shift-Left the identification of compatibility issues between Components / Services in complex interdependent systems such as those built with MicroServices architecture to reduce / remove the need for Integration Testing.
Conference: API Specifications Conference 2022, SOUTH SAN FRANCISCO, CALIFORNIA, Organised by OpenAPI Initiative #APISPECS2022

HariKrishnan

September 21, 2022
Tweet

More Decks by HariKrishnan

Other Decks in Programming

Transcript

  1. © 2022 All Rights Reserved Workflow Tests / Need for

    Dynamic Mocks • Step 1 - POST /products – Request: {data} – Response: productId • Step 2 - GET /products/{productId} Output of Step 1 = Input of Step 2
  2. © 2022 All Rights Reserved POP-QUIZ Which of these changes

    are backward compatible? • In Request – Add a mandatory / required field • In Request – Change Optional Nullable field to Optional Non-Nullable • What if I change a schema component that is referenced – in request and response? – at various levels of hierarchy as part of other schema components – across multiple specification files (remote references)
  3. © 2022 All Rights Reserved Contract Versioning Major – Backward

    Incompatible Change Minor – Backward Compatible Change Patch – Structure Change Only. Example: Extracting common schema to components section
  4. © 2022 All Rights Reserved Credits • Team – Naresh

    Jain @nashjain – Joel Rosario @finalprefix – Hari Krishnan @harikrishnan83 – and thanks to all Specmatic Contributors, Early Adopters • Third party marks and brands are the property of their respective holders