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
Christian Fischer
October 27, 2020
Technology
880
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
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
260
Agile Code Reviews
cfisch3r
1
320
Agile Software Architecture - The missing Manual
cfisch3r
0
290
Other Decks in Technology
See All in Technology
おい、エージェントを使って終わらせろ
nwiizo
2
750
LLMに渡さなかった仕事
nanaism
0
1.1k
WordPressの脆弱性対策何をすべき?
masakawai
0
120
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
160
JSONataとAWS Step Functionsで目指すRuntimelessな世界
mu7889yoon
0
280
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
5
470
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
4
3.3k
ソフトウェアDNAとクラウドエージェントのススメ
cloudace
0
120
AI時代、データエンジニアが一番おもろい
genshun9
0
670
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
1
2.9k
30座EKS, 180次升級淬煉的EKS Upgrade Skill 的歷程
eric8230
0
180
AI de Idea
kawaguti
PRO
2
130
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
280
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
WCS-LA-2024
lcolladotor
0
830
Odyssey Design
rkendrick25
PRO
2
810
A Modern Web Designer's Workflow
chriscoyier
699
190k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
870
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
460
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
530
Git: the NoSQL Database
bkeepers
PRO
432
67k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
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