Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Consumer Driven Contracts with OpenAPI
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Christian Fischer
October 27, 2020
Technology
890
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.9k
Fix my TDD - Patterns for effective Tests
cfisch3r
1
200
TDD sucks, but that does not have to be.
cfisch3r
1
280
Consumer Driven Contracts in Action
cfisch3r
1
230
Technische Schulden - Ursachen & Lösungsmuster
cfisch3r
0
270
Agile Code Reviews
cfisch3r
1
330
Agile Software Architecture - The missing Manual
cfisch3r
0
300
Other Decks in Technology
See All in Technology
The future of architectural work
ufried
0
170
AWS構成から考えるWebセキュリティ ― WordPressの構築経験から考える公開範囲と更新運用【JAWS FESTA 2026 in AKITA】
cscengineer
PRO
1
190
バックオフィスに染み出すTypeScript ── clasp で安全に仕組みを作る
nealle
1
180
AIコーディングはじめました
miso
0
150
AIエージェントの監視、思考を見るか行動を見るか / Monitoring AI Agents: Thoughts or Actions
yusukeshimizu
1
150
増え続けるプロダクトの品質をどう担保するか。ProductSpecとTypeScriptによる取り組み
joere
3
390
Software Engineering in an AI-Driven World
erikjhordan_rey
0
120
Microsoft Entra Kerberos で実現するクラウド デバイス管理
tamaiyutaro
2
470
詳解 never 型 - ボトム型の性質を深掘り
nealle
0
150
Technical Project Manager の役割とやりがい、少しだけ AI
yoshiiryo1
0
590
`go get`したらELFが降ってきた件
taiyow
0
170
Autonomous AI Lakehouse - Live AI Hubから始めるセキュアなAIデータ活用 -
oracle4engineer
PRO
3
190
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
590
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
560
My Coaching Mixtape
mlcsv
0
380
So, you think you're a good person
axbom
PRO
2
2.2k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
520
Side Projects
sachag
456
43k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
330
Chasing Engaging Ingredients in Design
codingconduct
0
390
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
800
How to build a perfect <img>
jonoalderson
1
6.2k
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