SlideShare uma empresa Scribd logo
1 de 71
Baixar para ler offline
JAMES NAVIN | PRINCIPAL DEVELOPER | ATLASSIAN | @JFNAVIN
Spec-first API development
Build better APIs faster
{REST}
{REST}
Swagger
THINK API FIRST
Picture this…
Lets go on a journey together
We need this super awesome
feature built.
YOUR PM
YOUR STRESS LEVEL
It needs a new REST API.
YOUR PM
YOUR STRESS LEVEL
We have internal and external
teams lined up already to use it.
YOUR PM
YOUR STRESS LEVEL
Oh - and it has to be done in the next
6 weeks in time for #summit
YOUR PM
YOUR STRESS LEVEL
Implementation-first
Pre-warp era
API Impl Consumer
Spec
Generates…
Generate from…
Validate mocks from…
Test against…
Feedback to…
PROVIDER CONSUMER
1. Some initial Confluence API design
1. Some initial Confluence API design
Collaborative
Get your input from your
team and iterate on an API
design.
1. Some initial Confluence API design
Collaborative
Get your input from your
team and iterate on an API
design.
Its just text
You can’t use it in your dev
process. And neither can
your consumers.
1. Some initial Confluence API design
Collaborative
Get your input from your
team and iterate on an API
design.
Its just text
You can’t use it in your dev
process. And neither can
your consumers.
Not a great
format for specs
Tables?
Code blocks (no comments)?
Dot points?
2. Dev time!
2. Dev time!
Its Alive!
The effort here results in a
working implementation.
2. Dev time!
Its Alive!
The effort here results in a
working implementation.
Slow feedback
Could take days to get to
prod-ready code into PR.
2. Dev time!
Its Alive!
The effort here results in a
working implementation.
Slow feedback
Could take days to get to
prod-ready code into PR.
Framework
leakage
Easy for frameworks to leak
into and influence your API
design at this point.
3. Review
3. Review
Wisdom of the
masses
3. Review
Wisdom of the
masses
Noise for
reviewers
Your API is now spread
across multiple source
files. No easy way to grasp
the final API.
3. Review
Wisdom of the
masses
Noise for
reviewers
Your API is now spread
across multiple source
files. No easy way to grasp
the final API.
Low-value
feedback
Likely to get feedback on
implementation details/style
more than API design.
4. Test and validate
4. Test and validate
Get your consumers
involved
If you are generating a Swagger/
OpenAPI spec, now you can
access it.
4. Test and validate
Get your consumers
involved
If you are generating a Swagger/
OpenAPI spec, now you can
access it.
Hard to validate
How do you validate that
your implementation
matches your original
design?
4. Test and validate
Get your consumers
involved
If you are generating a Swagger/
OpenAPI spec, now you can
access it.
Hard to validate
How do you validate that
your implementation
matches your original
design?
Something
broken?
Start that dev-review-deploy
loop again.
4. Test and validate
Get your consumers
involved
If you are generating a Swagger/
OpenAPI spec, now you can
access it.
Hard to validate
How do you validate that
your implementation
matches your original
design?
Something
broken?
Start that dev-review-deploy
loop again.
This may be the first time your consumers get
access to your API…
Design
Implement
Implement Review Test
Feedback
Implement Review Test
PROVIDER
CONSUMER
Review
Integration
Blocked
Spec-first
The next generation
API Impl Consumer
Spec
Feedback to…
Generate from…
Validate mocks from…
Build against…
Validate with…
Generate from…
Feedback to…
CONSUMERPROVIDER
1. Design your API as an OpenAPI spec
Usable artefact
Validate your implementation.
Consumers can validate theirs.
1. Design your API as an OpenAPI spec
Usable artefact
Validate your implementation.
Consumers can validate theirs.
Industry standard
Atlassian is a signatory to the
OpenAPI initiative.
1. Design your API as an OpenAPI spec
Usable artefact
Validate your implementation.
Consumers can validate theirs.
Industry standard
Atlassian is a signatory to the
OpenAPI initiative.
Tooling support
Editors, viewers, codegen,
validators.
1. Design your API as an OpenAPI spec
2. Encode example interactions
Validated
examples
Interaction examples can be
validated against your spec,
creating a tight feedback
loop.
2. Encode example interactions
Validated
examples
Interaction examples can be
validated against your spec,
creating a tight feedback
loop.
Documentation
by example
These examples will help
your reviewers and your
consumers understand
your API.
2. Encode example interactions
Validated
examples
Interaction examples can be
validated against your spec,
creating a tight feedback
loop.
Documentation
by example
These examples will help
your reviewers and your
consumers understand
your API.
Usable artefacts
Can be used for contract
testing.
2. Encode example interactions
3. Get review feedback
Tight feedback
loop
Measured in hours, not days.
3. Get review feedback
Tight feedback
loop
Measured in hours, not days.
Effective
feedback
Feedback is about your
API design, not your
implementation details.
3. Get review feedback
Tight feedback
loop
Measured in hours, not days.
Effective
feedback
Feedback is about your
API design, not your
implementation details.
Consumer
feedback
The spec is a great vehicle to
seek feedback from your
consumers - internal and
external.
3. Get review feedback
4. Dev time!
Validate your
implementation
Use your spec to validate
that your implementation is
correct.
4. Dev time!
Validate your
implementation
Use your spec to validate
that your implementation is
correct.
Generate your
implementation
Tooling exists to generate
an implementation
direction from the spec.
4. Dev time!
Validate your
implementation
Use your spec to validate
that your implementation is
correct.
Generate your
implementation
Tooling exists to generate
an implementation
direction from the spec.
Gnarly
implementation
You may have unwittingly
made an API design decision
that is tricky to implement.
4. Dev time!
Design
Implement
ImplementReview Test
Feedback
Implement Review Test
Review
Integration
PROVIDER
CONSUMER
What is contract testing?
A 2-slide primer
Test against the API contract.
Not the real thing.
Consumer-driven
Consumer defines their
expectations.

Provider validates that the
implementation meets
expectations.
Provider-driven
Provider defines the API
contract. 

Consumers validate their
usage against the contract.
Contract testing
The tools
Are here. Now.
https://tinyurl.com/spec-first
CREATE YOUR SPEC
IDE Plugins
VSCode, IDEA etc.
Syntax highlighting, schema
validation, code completion.
Swagger Editor
Purpose-built tool for editing
and previewing your spec
https://swagger.io/tools/swagger-editor/
https://github.com/arjun-g/vs-swagger-viewer
ENCODE YOUR EXAMPLES
Pact
JSON format for describing
request/response interactions.
Supported by the Atlassian
Contract Testing CLI.
https://docs.pact.io/
GENERATE YOUR IMPLEMENTATIONS
Swagger Codegen
Community-contributed
generators.
Generate implementation
skeletons and clients.
https://swagger.io/tools/swagger-codegen/
VALIDATE YOUR IMPLEMENTATION
Atlassian Contract Testing CLI
Language agnostic CLI tool for contract testing.
Validate mocks against an API spec.
https://bitbucket.org/atlassian/contract-testing-cli
Swagger Request Validator
Java library for validating request-response
interactions against an API spec.
Adapters for Pact, WireMock, RestAssured and
Spring MVC.
https://bitbucket.org/atlassian/swagger-request-validator
A quick recap
YOUR API IS THE THING
YOU’RE GOING TO HAVE TO
SUPPORT FOR A LONG TIME.
NOT YOUR
IMPLEMENTATION.
API Impl Consumer
Spec
PROVIDER CONSUMER
Feedback to…
Generate from…
Validate mocks from…
Build against…
Validate with…
Generate from…
Feedback to…
Tight feedback
loop
Measured in hours,
not days.
Effective
feedback
Focused on the API,
not implementation
details.
Minimal
wasted effort
All artefacts are
useful, and iterate
fast before large
investment.
Contract testing
Validate your
consumer mocks and
provider
implementation
The key benefits
Think API first. Do spec-first.
Emoji icons by Smashicons from www.flaticon.com; Licensed CC 3.0 BY.
Thank you!
JAMES NAVIN | PRINCIPAL DEVELOPER | ATLASSIAN | @JFNAVIN

Mais conteúdo relacionado

Mais procurados

Declaring Server App Components in Pure Java
Declaring Server App Components in Pure JavaDeclaring Server App Components in Pure Java
Declaring Server App Components in Pure JavaAtlassian
 
4 Changes We're Making to Help you be Successful in the Cloud
4 Changes We're Making to Help you be Successful in the Cloud4 Changes We're Making to Help you be Successful in the Cloud
4 Changes We're Making to Help you be Successful in the CloudAtlassian
 
Updates on the Data Center Apps Program
Updates on the Data Center Apps ProgramUpdates on the Data Center Apps Program
Updates on the Data Center Apps ProgramAtlassian
 
Integrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software CloudIntegrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software CloudAtlassian
 
What's New in AUI 8 and Why you Should Care!
What's New in AUI 8 and Why you Should Care!What's New in AUI 8 and Why you Should Care!
What's New in AUI 8 and Why you Should Care!Atlassian
 
The New & Improved Confluence Server and Data Center
The New & Improved Confluence Server and Data CenterThe New & Improved Confluence Server and Data Center
The New & Improved Confluence Server and Data CenterAtlassian
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge TriggersAtlassian
 
The User Who Must Not be Named: GDPR and Your Jira App
The User Who Must Not be Named: GDPR and Your Jira AppThe User Who Must Not be Named: GDPR and Your Jira App
The User Who Must Not be Named: GDPR and Your Jira AppAtlassian
 
What's New in Jira Cloud for Developers
What's New in Jira Cloud for DevelopersWhat's New in Jira Cloud for Developers
What's New in Jira Cloud for DevelopersAtlassian
 
An Exploration of Cross-product App Experiences
An Exploration of Cross-product App ExperiencesAn Exploration of Cross-product App Experiences
An Exploration of Cross-product App ExperiencesAtlassian
 
What Does Jira Next-Gen Mean for Cloud Apps?
What Does Jira Next-Gen Mean for Cloud Apps?What Does Jira Next-Gen Mean for Cloud Apps?
What Does Jira Next-Gen Mean for Cloud Apps?Atlassian
 
Technical Deep Dive Into Atlassian's New Apps Performance Testing Framework
Technical Deep Dive Into Atlassian's New Apps Performance Testing FrameworkTechnical Deep Dive Into Atlassian's New Apps Performance Testing Framework
Technical Deep Dive Into Atlassian's New Apps Performance Testing FrameworkAtlassian
 
Building Secure Apps in the Cloud
Building Secure Apps in the CloudBuilding Secure Apps in the Cloud
Building Secure Apps in the CloudAtlassian
 
Building Faster With Your Team's UI Kit
Building Faster With Your Team's UI KitBuilding Faster With Your Team's UI Kit
Building Faster With Your Team's UI KitAtlassian
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge RuntimeAtlassian
 
Creating Your Own Server Add-on that Customizes Confluence or JIRA
Creating Your Own Server Add-on that Customizes Confluence or JIRACreating Your Own Server Add-on that Customizes Confluence or JIRA
Creating Your Own Server Add-on that Customizes Confluence or JIRAAtlassian
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAtlassian
 
Discover the Possibilities of the Jira Cloud Asset API
Discover the Possibilities of the Jira Cloud Asset APIDiscover the Possibilities of the Jira Cloud Asset API
Discover the Possibilities of the Jira Cloud Asset APIAtlassian
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the HoodAtlassian
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemAtlassian
 

Mais procurados (20)

Declaring Server App Components in Pure Java
Declaring Server App Components in Pure JavaDeclaring Server App Components in Pure Java
Declaring Server App Components in Pure Java
 
4 Changes We're Making to Help you be Successful in the Cloud
4 Changes We're Making to Help you be Successful in the Cloud4 Changes We're Making to Help you be Successful in the Cloud
4 Changes We're Making to Help you be Successful in the Cloud
 
Updates on the Data Center Apps Program
Updates on the Data Center Apps ProgramUpdates on the Data Center Apps Program
Updates on the Data Center Apps Program
 
Integrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software CloudIntegrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software Cloud
 
What's New in AUI 8 and Why you Should Care!
What's New in AUI 8 and Why you Should Care!What's New in AUI 8 and Why you Should Care!
What's New in AUI 8 and Why you Should Care!
 
The New & Improved Confluence Server and Data Center
The New & Improved Confluence Server and Data CenterThe New & Improved Confluence Server and Data Center
The New & Improved Confluence Server and Data Center
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge Triggers
 
The User Who Must Not be Named: GDPR and Your Jira App
The User Who Must Not be Named: GDPR and Your Jira AppThe User Who Must Not be Named: GDPR and Your Jira App
The User Who Must Not be Named: GDPR and Your Jira App
 
What's New in Jira Cloud for Developers
What's New in Jira Cloud for DevelopersWhat's New in Jira Cloud for Developers
What's New in Jira Cloud for Developers
 
An Exploration of Cross-product App Experiences
An Exploration of Cross-product App ExperiencesAn Exploration of Cross-product App Experiences
An Exploration of Cross-product App Experiences
 
What Does Jira Next-Gen Mean for Cloud Apps?
What Does Jira Next-Gen Mean for Cloud Apps?What Does Jira Next-Gen Mean for Cloud Apps?
What Does Jira Next-Gen Mean for Cloud Apps?
 
Technical Deep Dive Into Atlassian's New Apps Performance Testing Framework
Technical Deep Dive Into Atlassian's New Apps Performance Testing FrameworkTechnical Deep Dive Into Atlassian's New Apps Performance Testing Framework
Technical Deep Dive Into Atlassian's New Apps Performance Testing Framework
 
Building Secure Apps in the Cloud
Building Secure Apps in the CloudBuilding Secure Apps in the Cloud
Building Secure Apps in the Cloud
 
Building Faster With Your Team's UI Kit
Building Faster With Your Team's UI KitBuilding Faster With Your Team's UI Kit
Building Faster With Your Team's UI Kit
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge Runtime
 
Creating Your Own Server Add-on that Customizes Confluence or JIRA
Creating Your Own Server Add-on that Customizes Confluence or JIRACreating Your Own Server Add-on that Customizes Confluence or JIRA
Creating Your Own Server Add-on that Customizes Confluence or JIRA
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIs
 
Discover the Possibilities of the Jira Cloud Asset API
Discover the Possibilities of the Jira Cloud Asset APIDiscover the Possibilities of the Jira Cloud Asset API
Discover the Possibilities of the Jira Cloud Asset API
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the Hood
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI System
 

Semelhante a Spec-first API Design for Speed and Safety

From API-First to SDK-First
From API-First to SDK-FirstFrom API-First to SDK-First
From API-First to SDK-FirstNordic APIs
 
Rebooting APIs at scale
Rebooting APIs at scaleRebooting APIs at scale
Rebooting APIs at scaleRahul Dighe
 
Space Camp June 2022 - API First.pdf
Space Camp June 2022 - API First.pdfSpace Camp June 2022 - API First.pdf
Space Camp June 2022 - API First.pdfPostman
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPIScott Triglia
 
API Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value ChainAPI Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value ChainApigee | Google Cloud
 
Why You Should Be Doing Contract-First API Development
Why You Should Be Doing Contract-First API DevelopmentWhy You Should Be Doing Contract-First API Development
Why You Should Be Doing Contract-First API DevelopmentDevenPhillips
 
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...apidays
 
Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsAxway
 
I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015Mike McNeil
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Pain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywherePain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywhereNordic APIs
 
INTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API FirstINTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API Firstapidays
 
A Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdfA Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdfiDataScientists
 
API-Consumption compressed (1)
API-Consumption compressed (1)API-Consumption compressed (1)
API-Consumption compressed (1)Rahul Ghai
 
Apidays Paris 2023 - How to Scale APIs-as-a-Product for Future Success, Samir...
Apidays Paris 2023 - How to Scale APIs-as-a-Product for Future Success, Samir...Apidays Paris 2023 - How to Scale APIs-as-a-Product for Future Success, Samir...
Apidays Paris 2023 - How to Scale APIs-as-a-Product for Future Success, Samir...apidays
 
How to Scale APIs-as-Product for Future Success
How to Scale APIs-as-Product for Future SuccessHow to Scale APIs-as-Product for Future Success
How to Scale APIs-as-Product for Future SuccessPostman
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Atlassian
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Atlassian
 

Semelhante a Spec-first API Design for Speed and Safety (20)

From API-First to SDK-First
From API-First to SDK-FirstFrom API-First to SDK-First
From API-First to SDK-First
 
Rebooting APIs at scale
Rebooting APIs at scaleRebooting APIs at scale
Rebooting APIs at scale
 
Space Camp June 2022 - API First.pdf
Space Camp June 2022 - API First.pdfSpace Camp June 2022 - API First.pdf
Space Camp June 2022 - API First.pdf
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPI
 
API Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value ChainAPI Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value Chain
 
Why You Should Be Doing Contract-First API Development
Why You Should Be Doing Contract-First API DevelopmentWhy You Should Be Doing Contract-First API Development
Why You Should Be Doing Contract-First API Development
 
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
APIdays Paris 2019 - API Descriptions as Product Code by Phil Sturgeon, Stopl...
 
Api tools overview
Api tools overviewApi tools overview
Api tools overview
 
Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortals
 
I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Pain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywherePain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re Everywhere
 
INTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API FirstINTERFACE, by apidays - How to Win Friends and Influence People with API First
INTERFACE, by apidays - How to Win Friends and Influence People with API First
 
A Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdfA Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdf
 
API-Consumption compressed (1)
API-Consumption compressed (1)API-Consumption compressed (1)
API-Consumption compressed (1)
 
Apidays Paris 2023 - How to Scale APIs-as-a-Product for Future Success, Samir...
Apidays Paris 2023 - How to Scale APIs-as-a-Product for Future Success, Samir...Apidays Paris 2023 - How to Scale APIs-as-a-Product for Future Success, Samir...
Apidays Paris 2023 - How to Scale APIs-as-a-Product for Future Success, Samir...
 
How to Scale APIs-as-Product for Future Success
How to Scale APIs-as-Product for Future SuccessHow to Scale APIs-as-Product for Future Success
How to Scale APIs-as-Product for Future Success
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
 
Web API Design
Web API DesignWeb API Design
Web API Design
 

Mais de Atlassian

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020Atlassian
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020Atlassian
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App ShowcaseAtlassian
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UIAtlassian
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceAtlassian
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeAtlassian
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelAtlassian
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginAtlassian
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingAtlassian
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterAtlassian
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindAtlassian
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Atlassian
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsAtlassian
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamAtlassian
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in MindAtlassian
 
Shipping With Velocity and Confidence Using Feature Flags
Shipping With Velocity and Confidence Using Feature FlagsShipping With Velocity and Confidence Using Feature Flags
Shipping With Velocity and Confidence Using Feature FlagsAtlassian
 
Build With Heart and Balance, Remote Work Edition
Build With Heart and Balance, Remote Work EditionBuild With Heart and Balance, Remote Work Edition
Build With Heart and Balance, Remote Work EditionAtlassian
 
How to Grow an Atlassian App Worthy of Top Vendor Status
How to Grow an Atlassian App Worthy of Top Vendor StatusHow to Grow an Atlassian App Worthy of Top Vendor Status
How to Grow an Atlassian App Worthy of Top Vendor StatusAtlassian
 
Monitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Monitoring As Code: How to Integrate App Monitoring Into Your Developer CycleMonitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Monitoring As Code: How to Integrate App Monitoring Into Your Developer CycleAtlassian
 
How to Market Your New App on the Atlassian Marketplace
How to Market Your New App on the Atlassian MarketplaceHow to Market Your New App on the Atlassian Marketplace
How to Market Your New App on the Atlassian MarketplaceAtlassian
 

Mais de Atlassian (20)

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App Showcase
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UI
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User Experience
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in Forge
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch Plugin
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the Building
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that Matter
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in Mind
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced Teams
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in Mind
 
Shipping With Velocity and Confidence Using Feature Flags
Shipping With Velocity and Confidence Using Feature FlagsShipping With Velocity and Confidence Using Feature Flags
Shipping With Velocity and Confidence Using Feature Flags
 
Build With Heart and Balance, Remote Work Edition
Build With Heart and Balance, Remote Work EditionBuild With Heart and Balance, Remote Work Edition
Build With Heart and Balance, Remote Work Edition
 
How to Grow an Atlassian App Worthy of Top Vendor Status
How to Grow an Atlassian App Worthy of Top Vendor StatusHow to Grow an Atlassian App Worthy of Top Vendor Status
How to Grow an Atlassian App Worthy of Top Vendor Status
 
Monitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Monitoring As Code: How to Integrate App Monitoring Into Your Developer CycleMonitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
Monitoring As Code: How to Integrate App Monitoring Into Your Developer Cycle
 
How to Market Your New App on the Atlassian Marketplace
How to Market Your New App on the Atlassian MarketplaceHow to Market Your New App on the Atlassian Marketplace
How to Market Your New App on the Atlassian Marketplace
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Último (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Spec-first API Design for Speed and Safety

  • 1. JAMES NAVIN | PRINCIPAL DEVELOPER | ATLASSIAN | @JFNAVIN Spec-first API development Build better APIs faster
  • 2.
  • 6. Picture this… Lets go on a journey together
  • 7. We need this super awesome feature built. YOUR PM
  • 9. It needs a new REST API. YOUR PM
  • 11. We have internal and external teams lined up already to use it. YOUR PM
  • 13. Oh - and it has to be done in the next 6 weeks in time for #summit YOUR PM
  • 16. API Impl Consumer Spec Generates… Generate from… Validate mocks from… Test against… Feedback to… PROVIDER CONSUMER
  • 17.
  • 18. 1. Some initial Confluence API design
  • 19. 1. Some initial Confluence API design Collaborative Get your input from your team and iterate on an API design.
  • 20. 1. Some initial Confluence API design Collaborative Get your input from your team and iterate on an API design. Its just text You can’t use it in your dev process. And neither can your consumers.
  • 21. 1. Some initial Confluence API design Collaborative Get your input from your team and iterate on an API design. Its just text You can’t use it in your dev process. And neither can your consumers. Not a great format for specs Tables? Code blocks (no comments)? Dot points?
  • 23. 2. Dev time! Its Alive! The effort here results in a working implementation.
  • 24. 2. Dev time! Its Alive! The effort here results in a working implementation. Slow feedback Could take days to get to prod-ready code into PR.
  • 25. 2. Dev time! Its Alive! The effort here results in a working implementation. Slow feedback Could take days to get to prod-ready code into PR. Framework leakage Easy for frameworks to leak into and influence your API design at this point.
  • 27. 3. Review Wisdom of the masses
  • 28. 3. Review Wisdom of the masses Noise for reviewers Your API is now spread across multiple source files. No easy way to grasp the final API.
  • 29. 3. Review Wisdom of the masses Noise for reviewers Your API is now spread across multiple source files. No easy way to grasp the final API. Low-value feedback Likely to get feedback on implementation details/style more than API design.
  • 30. 4. Test and validate
  • 31. 4. Test and validate Get your consumers involved If you are generating a Swagger/ OpenAPI spec, now you can access it.
  • 32. 4. Test and validate Get your consumers involved If you are generating a Swagger/ OpenAPI spec, now you can access it. Hard to validate How do you validate that your implementation matches your original design?
  • 33. 4. Test and validate Get your consumers involved If you are generating a Swagger/ OpenAPI spec, now you can access it. Hard to validate How do you validate that your implementation matches your original design? Something broken? Start that dev-review-deploy loop again.
  • 34. 4. Test and validate Get your consumers involved If you are generating a Swagger/ OpenAPI spec, now you can access it. Hard to validate How do you validate that your implementation matches your original design? Something broken? Start that dev-review-deploy loop again. This may be the first time your consumers get access to your API…
  • 35. Design Implement Implement Review Test Feedback Implement Review Test PROVIDER CONSUMER Review Integration Blocked
  • 37. API Impl Consumer Spec Feedback to… Generate from… Validate mocks from… Build against… Validate with… Generate from… Feedback to… CONSUMERPROVIDER
  • 38.
  • 39. 1. Design your API as an OpenAPI spec
  • 40. Usable artefact Validate your implementation. Consumers can validate theirs. 1. Design your API as an OpenAPI spec
  • 41. Usable artefact Validate your implementation. Consumers can validate theirs. Industry standard Atlassian is a signatory to the OpenAPI initiative. 1. Design your API as an OpenAPI spec
  • 42. Usable artefact Validate your implementation. Consumers can validate theirs. Industry standard Atlassian is a signatory to the OpenAPI initiative. Tooling support Editors, viewers, codegen, validators. 1. Design your API as an OpenAPI spec
  • 43. 2. Encode example interactions
  • 44. Validated examples Interaction examples can be validated against your spec, creating a tight feedback loop. 2. Encode example interactions
  • 45. Validated examples Interaction examples can be validated against your spec, creating a tight feedback loop. Documentation by example These examples will help your reviewers and your consumers understand your API. 2. Encode example interactions
  • 46. Validated examples Interaction examples can be validated against your spec, creating a tight feedback loop. Documentation by example These examples will help your reviewers and your consumers understand your API. Usable artefacts Can be used for contract testing. 2. Encode example interactions
  • 47. 3. Get review feedback
  • 48. Tight feedback loop Measured in hours, not days. 3. Get review feedback
  • 49. Tight feedback loop Measured in hours, not days. Effective feedback Feedback is about your API design, not your implementation details. 3. Get review feedback
  • 50. Tight feedback loop Measured in hours, not days. Effective feedback Feedback is about your API design, not your implementation details. Consumer feedback The spec is a great vehicle to seek feedback from your consumers - internal and external. 3. Get review feedback
  • 51.
  • 53. Validate your implementation Use your spec to validate that your implementation is correct. 4. Dev time!
  • 54. Validate your implementation Use your spec to validate that your implementation is correct. Generate your implementation Tooling exists to generate an implementation direction from the spec. 4. Dev time!
  • 55. Validate your implementation Use your spec to validate that your implementation is correct. Generate your implementation Tooling exists to generate an implementation direction from the spec. Gnarly implementation You may have unwittingly made an API design decision that is tricky to implement. 4. Dev time!
  • 56. Design Implement ImplementReview Test Feedback Implement Review Test Review Integration PROVIDER CONSUMER
  • 57. What is contract testing? A 2-slide primer
  • 58. Test against the API contract. Not the real thing.
  • 59. Consumer-driven Consumer defines their expectations.
 Provider validates that the implementation meets expectations. Provider-driven Provider defines the API contract. 
 Consumers validate their usage against the contract. Contract testing
  • 62. CREATE YOUR SPEC IDE Plugins VSCode, IDEA etc. Syntax highlighting, schema validation, code completion. Swagger Editor Purpose-built tool for editing and previewing your spec https://swagger.io/tools/swagger-editor/ https://github.com/arjun-g/vs-swagger-viewer
  • 63. ENCODE YOUR EXAMPLES Pact JSON format for describing request/response interactions. Supported by the Atlassian Contract Testing CLI. https://docs.pact.io/
  • 64. GENERATE YOUR IMPLEMENTATIONS Swagger Codegen Community-contributed generators. Generate implementation skeletons and clients. https://swagger.io/tools/swagger-codegen/
  • 65. VALIDATE YOUR IMPLEMENTATION Atlassian Contract Testing CLI Language agnostic CLI tool for contract testing. Validate mocks against an API spec. https://bitbucket.org/atlassian/contract-testing-cli Swagger Request Validator Java library for validating request-response interactions against an API spec. Adapters for Pact, WireMock, RestAssured and Spring MVC. https://bitbucket.org/atlassian/swagger-request-validator
  • 67. YOUR API IS THE THING YOU’RE GOING TO HAVE TO SUPPORT FOR A LONG TIME. NOT YOUR IMPLEMENTATION.
  • 68. API Impl Consumer Spec PROVIDER CONSUMER Feedback to… Generate from… Validate mocks from… Build against… Validate with… Generate from… Feedback to…
  • 69. Tight feedback loop Measured in hours, not days. Effective feedback Focused on the API, not implementation details. Minimal wasted effort All artefacts are useful, and iterate fast before large investment. Contract testing Validate your consumer mocks and provider implementation The key benefits
  • 70. Think API first. Do spec-first. Emoji icons by Smashicons from www.flaticon.com; Licensed CC 3.0 BY.
  • 71. Thank you! JAMES NAVIN | PRINCIPAL DEVELOPER | ATLASSIAN | @JFNAVIN