Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Consumer Driven Contracts with OpenAPI
Search
Christian Fischer
October 27, 2020
Technology
870
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Consumer Driven Contracts with OpenAPI
Christian Fischer
October 27, 2020
More Decks by Christian Fischer
See All by Christian Fischer
The C4 Test Pyramid - An Architecture Driven Test Approach
cfisch3r
2
1.8k
Fix my TDD - Patterns for effective Tests
cfisch3r
1
190
TDD sucks, but that does not have to be.
cfisch3r
1
270
Consumer Driven Contracts in Action
cfisch3r
1
220
Technische Schulden - Ursachen & Lösungsmuster
cfisch3r
0
260
Agile Code Reviews
cfisch3r
1
310
Agile Software Architecture - The missing Manual
cfisch3r
0
270
Other Decks in Technology
See All in Technology
第67回コンピュータビジョン勉強会CVPR2026読会前編
tsukamotokenji
0
140
あなたの『Site』はどこですか? — xREという考え方
miyamu
0
1.2k
カードゲーム作りが教えてくれた プロダクトオーナーシップ
moritamasami
0
110
凡エンジニアがこの先生きのこるためには。〜TypeScript完全に理解したい〜
alchemy1115
2
310
DatabricksにおけるMCPソリューション
taka_aki
1
270
ヘルスケア領域における AI 活用と その安全性担保のための取り組み (Leveraging AI in Healthcare and Our Efforts to Ensure Its Safety) - Google I/O Extended Tokyo 2026, July 11, 2026
zettaittenani
0
420
Claude Code公式skillで 自分の仕事を少しずつ手放そう!(Claude Code開発ノウハウ大公開スペシャル by クラスメソッド)
kaym
1
480
Gen3R: 3D Scene Generation Meets Feed-Forward Reconstruction
spatial_ai_network
0
130
ソニー銀行におけるビジネスアジリティ向上のためのクラウドシフト戦略
srenext
0
720
壊して学ぶAWS CDK: そのcdk deployで消えるもの、残るもの
k_adachi_01
1
380
AI時代の開発生産性は、個人技からチーム設計へ
moongift
PRO
4
2.3k
知らん間に、回ってる
ming_ayami
0
710
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
The Language of Interfaces
destraynor
162
27k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
Designing Powerful Visuals for Engaging Learning
tmiket
1
450
Designing for humans not robots
tammielis
254
26k
Building AI with AI
inesmontani
PRO
1
1.1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
The SEO Collaboration Effect
kristinabergwall1
1
500
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
370
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
630
Transcript
Consumer Driven Contracts mit OPENAPI Christian Fischer @agiledojo
Cascading Changes Price Store Marketing Mobile
Consumer Driven Contracts Price Store Marketing Mobile
CDC Frameworks generates generates CDC Service Adapter REST Controller Consumer
Provider Provider Stub Adapter Test REST API Test BL Stub
What do we have to do now? 1. Write Contracts
in provided DSL 2. Switch to generated Mocks for Consumer 3. Integrate Contract Test for Provider Let‘s get started Hmm, isn‘t there an easier ways? We already have an OpenAPI Doc for our REST Service.
OPENAPI 3.0 info servers security paths tags externalDocs conponents OPENAPI
COMPONENTS schemas responses parameters requestBodies headers securitySchemes links callbacks
Swagger Request Validator Service Adapter REST Controller Consumer Provider Provider
Stub Adapter Test REST API Test BL Stub Request Validator Request Validator https://bitbucket.org/atlassian/swagger-request-validator/src/master/
Example: Provider and Consumers Store Backend Price Service Marketing Backend
POST /price [„I“,“II“] status: 200 {„inCent“: 152} POST /price [„I“,“II“] status: 200 {„inCent“: 152, „tax“: 32}
Example: The Contracts Store App Backend Price Service Marketing Portal
store.yml de.agiledojo.cdd:price-api-store marketing.yml de.agiledojo.cdd:price-api-marketing testimplementation testimplementation
Example: The Store Test Fixture Price Service [Wiremock] PriceServiceGatewayAdapter [Adapter
Class] PriceServiceGatewayAdapterIT [Junit Test] setup & start call & assert add OpenApiValidationListener [Wiremock Listener] validate store.yml [OPENAPI Contract]
Example: The Price Service Test Fixture CalculatorMock [Mockito Mock] PriceApiController
[Spring REST Controller Class] PriceApiControllerIT [Spring MockMVC Test] call & assert setup MockMvc [HTTP CLient] OpenApiInteractionValidator [Validator] store.yml [OPENAPI Contract] setup validate
CDC: Pact vs OPENAPI
CDC vs OPENAPI CDC (Pact) OPENAPI Specification Style Consumer First,
Interaction oriented Contract First, Syntax oriented Specification Format API JSON, YAML Languages JVM, JS, NET, Go, Python, Scala, PHP, Ruby, Rust,C++ JVM (Wiremock, RestAssured, MockMVC, Spring Webclient) Contract Broker Pact Server Artifact Repository
JS Pact Validation PriceServiceMock [Pact Mock] Api [Api Adapter Class]
swagger-mock-validator [npm module] create validate api.pact.spec.js [Pact Test] marketing.yml [OPENAPI Contract] call & assert setup Interactions marketing-priceservice.json [PactContract]
Christian Fischer Software Engineering Coach http://agiledojo.de @agiledojo