SlideShare a Scribd company logo
TED EPSTEIN, FOUNDER & CEO | Ted.Epstein@RepreZen.com
1COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED.
API Contract as Code
Rapid Development with OpenAPI
First Swagger Value Proposition
• Keep your API docs in sync with implementation!
… and look cool
doing it!
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 2
Code-First
• Or “API Code-as-Contract”
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 3
So why not all code, all the time?
• Not Cross-functional team-friendly
◦ Coders aren’t always the best communicators.
◦ Tech writers don’t want to maintain embedded code comments
(and you may not want them to).
• De-emphasizes API design
◦ Outside-in design, from the user’s perspective
◦ As a distinct process
◦ Leveraging available tools for docs, mocking, testing, etc.
◦ Conscious, collaborative focus to API design quality
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 4
But there’s another reason…
• Leverage
◦ Higher productivity
◦ Greater expressive power
• An OpenAPI Description is code!
◦ High focus, high abstraction
◦ Generated code can be a scaffold to get started quickly…
◦ … and it can be first-class code.
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 5
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 6
API Contract-As-Code
Development Workflow
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 7
API Contract-As-Code
Development Workflow
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 8
API Contract-As-Code
Development Workflow
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 9
API Contract-As-Code
Development Workflow
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 10
API Contract-As-Code
Development Workflow
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 11
API Contract-As-Code
Development Workflow
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 12
API Contract-As-Code
Development Workflow
Demo
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 13
Achieving Separation
• “Write-once” codegen for implementation
• Delegation
• Interface / Implementation
• Abstract Base Class / Concrete Implementation
• Dependency Injection
• Dynamic merge (e.g. C# partial classes)
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 14
Project Layout
• All in one project
• One project for API spec, generate into
second project for implementation
• Generated library
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 15
Validating Implementation vs. Spec
Implementation Completeness:
“Every method is implemented”
◦ Use static typing when available
◦ Use generated or dynamic unit tests for
dynamic languages
Specification Completeness
“Every method implemented is in the
specification”
◦ Harder to enforce, but easy to prevent.
◦ Static code analysis or reflective tests could
be useful
Correctness
Methods implement the contract
(mechanics)
Methods have the expected outcome
(semantics)
◦ Use testing tools or frameworks, same as as
you would with code-first
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 16
OpenAPI 3.0 - More Descriptive Power,
New Possibilities…-
• Links
• Callbacks
• oneOf / anyOf Schemas
• Component Model
COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 17

More Related Content

What's hot

Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc Site
Pronovix
 
NativeScript - Open source framework for building truly native mobile apps wi...
NativeScript - Open source framework for building truly native mobile apps wi...NativeScript - Open source framework for building truly native mobile apps wi...
NativeScript - Open source framework for building truly native mobile apps wi...
Dan Wilson
 
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
apidays
 
API SDK Development – Lessons Learned
API SDK Development – Lessons LearnedAPI SDK Development – Lessons Learned
API SDK Development – Lessons Learned
Pronovix
 
Benten: An experimental language server for CWL
Benten: An experimental language server for CWLBenten: An experimental language server for CWL
Benten: An experimental language server for CWL
Kaushik (koh-shik) Ghose (gHo-sh)
 
Swagger for-your-api
Swagger for-your-apiSwagger for-your-api
Swagger for-your-api
Tony Tam
 
Continuous integration for Ruby on Rails
Continuous integration for Ruby on RailsContinuous integration for Ruby on Rails
Continuous integration for Ruby on Rails
David Paluy
 
API First Workflow: How could we have better API Docs through DevOps pipeline
API First Workflow: How could we have better API Docs through DevOps pipelineAPI First Workflow: How could we have better API Docs through DevOps pipeline
API First Workflow: How could we have better API Docs through DevOps pipeline
Pronovix
 
Introduction to xamarin
Introduction to xamarin  Introduction to xamarin
Introduction to xamarin
Sumantro Mukherjee
 
E031202024029
E031202024029E031202024029
E031202024029
ijceronline
 
An overview of devportal technologies and their (dis)advantages
An overview of devportal technologies and their (dis)advantagesAn overview of devportal technologies and their (dis)advantages
An overview of devportal technologies and their (dis)advantages
Pronovix
 
Leaping Forward: Finding The Future of Your API Docs
Leaping Forward: Finding The Future of Your API DocsLeaping Forward: Finding The Future of Your API Docs
Leaping Forward: Finding The Future of Your API Docs
Pronovix
 
Advancing Your API Strategy in an Infrastructure World
Advancing Your API Strategy in an Infrastructure WorldAdvancing Your API Strategy in an Infrastructure World
Advancing Your API Strategy in an Infrastructure World
Pronovix
 
API-first development
API-first developmentAPI-first development
API-first development
Vasco Veloso
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbook
Katy Slemon
 
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
Open API Initiative (OAI)
 
Ciprian redinciuc continuous integration with jenkins for i os
Ciprian redinciuc   continuous integration with jenkins for i osCiprian redinciuc   continuous integration with jenkins for i os
Ciprian redinciuc continuous integration with jenkins for i os
Codecamp Romania
 
Capacitor 2.0 Launch
Capacitor 2.0 LaunchCapacitor 2.0 Launch
Capacitor 2.0 Launch
Ionic Framework
 
Ionic in 30
Ionic in 30Ionic in 30
Ionic in 30
Ionic Framework
 
Capacitor 1.0 launch
Capacitor 1.0 launchCapacitor 1.0 launch
Capacitor 1.0 launch
Ionic Framework
 

What's hot (20)

Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc Site
 
NativeScript - Open source framework for building truly native mobile apps wi...
NativeScript - Open source framework for building truly native mobile apps wi...NativeScript - Open source framework for building truly native mobile apps wi...
NativeScript - Open source framework for building truly native mobile apps wi...
 
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
apidays LIVE New York 2021 - Designing API's: Less Data is More! by Damir Svr...
 
API SDK Development – Lessons Learned
API SDK Development – Lessons LearnedAPI SDK Development – Lessons Learned
API SDK Development – Lessons Learned
 
Benten: An experimental language server for CWL
Benten: An experimental language server for CWLBenten: An experimental language server for CWL
Benten: An experimental language server for CWL
 
Swagger for-your-api
Swagger for-your-apiSwagger for-your-api
Swagger for-your-api
 
Continuous integration for Ruby on Rails
Continuous integration for Ruby on RailsContinuous integration for Ruby on Rails
Continuous integration for Ruby on Rails
 
API First Workflow: How could we have better API Docs through DevOps pipeline
API First Workflow: How could we have better API Docs through DevOps pipelineAPI First Workflow: How could we have better API Docs through DevOps pipeline
API First Workflow: How could we have better API Docs through DevOps pipeline
 
Introduction to xamarin
Introduction to xamarin  Introduction to xamarin
Introduction to xamarin
 
E031202024029
E031202024029E031202024029
E031202024029
 
An overview of devportal technologies and their (dis)advantages
An overview of devportal technologies and their (dis)advantagesAn overview of devportal technologies and their (dis)advantages
An overview of devportal technologies and their (dis)advantages
 
Leaping Forward: Finding The Future of Your API Docs
Leaping Forward: Finding The Future of Your API DocsLeaping Forward: Finding The Future of Your API Docs
Leaping Forward: Finding The Future of Your API Docs
 
Advancing Your API Strategy in an Infrastructure World
Advancing Your API Strategy in an Infrastructure WorldAdvancing Your API Strategy in an Infrastructure World
Advancing Your API Strategy in an Infrastructure World
 
API-first development
API-first developmentAPI-first development
API-first development
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbook
 
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
 
Ciprian redinciuc continuous integration with jenkins for i os
Ciprian redinciuc   continuous integration with jenkins for i osCiprian redinciuc   continuous integration with jenkins for i os
Ciprian redinciuc continuous integration with jenkins for i os
 
Capacitor 2.0 Launch
Capacitor 2.0 LaunchCapacitor 2.0 Launch
Capacitor 2.0 Launch
 
Ionic in 30
Ionic in 30Ionic in 30
Ionic in 30
 
Capacitor 1.0 launch
Capacitor 1.0 launchCapacitor 1.0 launch
Capacitor 1.0 launch
 

Similar to API Contract as Code: Rapid Development with OpenAPI

Practical Application of API-First in microservices development
Practical Application of API-First in microservices developmentPractical Application of API-First in microservices development
Practical Application of API-First in microservices development
Chavdar Baikov
 
Short programming Cookies
Short programming CookiesShort programming Cookies
Short programming Cookies
Premchand Kumar
 
DevOps Patterns to Enable Success in Microservices
DevOps Patterns to Enable Success in MicroservicesDevOps Patterns to Enable Success in Microservices
DevOps Patterns to Enable Success in Microservices
Rich Mills
 
Api-First service design
Api-First service designApi-First service design
Api-First service design
Stefaan Ponnet
 
EclipseCon 2010 API Design and Evolution (Tutorial)
EclipseCon 2010 API Design and Evolution (Tutorial)EclipseCon 2010 API Design and Evolution (Tutorial)
EclipseCon 2010 API Design and Evolution (Tutorial)
moberhuber
 
API First - Best Practices for consistent API management
API First - Best Practices for consistent API managementAPI First - Best Practices for consistent API management
API First - Best Practices for consistent API management
Sven Bernhardt
 
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
apidays
 
MuleSoft Meetup Winnipeg: Maiden Edition
MuleSoft Meetup Winnipeg: Maiden EditionMuleSoft Meetup Winnipeg: Maiden Edition
MuleSoft Meetup Winnipeg: Maiden Edition
MannaAkpan
 
From API-First to SDK-First
From API-First to SDK-FirstFrom API-First to SDK-First
From API-First to SDK-First
Nordic APIs
 
Studio 5000® Application Code Manager: Introduction and Demonstration
Studio 5000® Application Code Manager: Introduction and DemonstrationStudio 5000® Application Code Manager: Introduction and Demonstration
Studio 5000® Application Code Manager: Introduction and Demonstration
Rockwell Automation
 
Auckland API & Microservices Meetup 1: API led design
Auckland API & Microservices Meetup 1: API led designAuckland API & Microservices Meetup 1: API led design
Auckland API & Microservices Meetup 1: API led design
Damian Harvey
 
oracle-apac-developers-meetup-2-building-api-with-apiary-slides
oracle-apac-developers-meetup-2-building-api-with-apiary-slidesoracle-apac-developers-meetup-2-building-api-with-apiary-slides
oracle-apac-developers-meetup-2-building-api-with-apiary-slides
Boopathy Balasubramanian
 
OpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
OpenAPI v.Next - Events, Alternative Schemas & the Road AheadOpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
OpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
Ted Epstein
 
Build a Voice Enabled Modern App with GraphQL, AWS AppSync, and Amazon Alexa
Build a Voice Enabled Modern App with GraphQL, AWS AppSync, and Amazon AlexaBuild a Voice Enabled Modern App with GraphQL, AWS AppSync, and Amazon Alexa
Build a Voice Enabled Modern App with GraphQL, AWS AppSync, and Amazon Alexa
Amazon Web Services
 
Building Voice Enabled Apps with AWS AppSync, GraphQL, & Amazon Alexa: Mobile...
Building Voice Enabled Apps with AWS AppSync, GraphQL, & Amazon Alexa: Mobile...Building Voice Enabled Apps with AWS AppSync, GraphQL, & Amazon Alexa: Mobile...
Building Voice Enabled Apps with AWS AppSync, GraphQL, & Amazon Alexa: Mobile...
Amazon Web Services
 
GitHub constellation 2017 SimCorp
GitHub constellation 2017   SimCorpGitHub constellation 2017   SimCorp
GitHub constellation 2017 SimCorp
Niels Harre
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17
Phil Wilkins
 
Mule ESB Intro
Mule ESB IntroMule ESB Intro
Mule ESB Intro
Noga Manela
 
API Design Workflows
API Design WorkflowsAPI Design Workflows
API Design Workflows
Jakub Nesetril
 
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, MicrosoftAPIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
Nordic APIs
 

Similar to API Contract as Code: Rapid Development with OpenAPI (20)

Practical Application of API-First in microservices development
Practical Application of API-First in microservices developmentPractical Application of API-First in microservices development
Practical Application of API-First in microservices development
 
Short programming Cookies
Short programming CookiesShort programming Cookies
Short programming Cookies
 
DevOps Patterns to Enable Success in Microservices
DevOps Patterns to Enable Success in MicroservicesDevOps Patterns to Enable Success in Microservices
DevOps Patterns to Enable Success in Microservices
 
Api-First service design
Api-First service designApi-First service design
Api-First service design
 
EclipseCon 2010 API Design and Evolution (Tutorial)
EclipseCon 2010 API Design and Evolution (Tutorial)EclipseCon 2010 API Design and Evolution (Tutorial)
EclipseCon 2010 API Design and Evolution (Tutorial)
 
API First - Best Practices for consistent API management
API First - Best Practices for consistent API managementAPI First - Best Practices for consistent API management
API First - Best Practices for consistent API management
 
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
 
MuleSoft Meetup Winnipeg: Maiden Edition
MuleSoft Meetup Winnipeg: Maiden EditionMuleSoft Meetup Winnipeg: Maiden Edition
MuleSoft Meetup Winnipeg: Maiden Edition
 
From API-First to SDK-First
From API-First to SDK-FirstFrom API-First to SDK-First
From API-First to SDK-First
 
Studio 5000® Application Code Manager: Introduction and Demonstration
Studio 5000® Application Code Manager: Introduction and DemonstrationStudio 5000® Application Code Manager: Introduction and Demonstration
Studio 5000® Application Code Manager: Introduction and Demonstration
 
Auckland API & Microservices Meetup 1: API led design
Auckland API & Microservices Meetup 1: API led designAuckland API & Microservices Meetup 1: API led design
Auckland API & Microservices Meetup 1: API led design
 
oracle-apac-developers-meetup-2-building-api-with-apiary-slides
oracle-apac-developers-meetup-2-building-api-with-apiary-slidesoracle-apac-developers-meetup-2-building-api-with-apiary-slides
oracle-apac-developers-meetup-2-building-api-with-apiary-slides
 
OpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
OpenAPI v.Next - Events, Alternative Schemas & the Road AheadOpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
OpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
 
Build a Voice Enabled Modern App with GraphQL, AWS AppSync, and Amazon Alexa
Build a Voice Enabled Modern App with GraphQL, AWS AppSync, and Amazon AlexaBuild a Voice Enabled Modern App with GraphQL, AWS AppSync, and Amazon Alexa
Build a Voice Enabled Modern App with GraphQL, AWS AppSync, and Amazon Alexa
 
Building Voice Enabled Apps with AWS AppSync, GraphQL, & Amazon Alexa: Mobile...
Building Voice Enabled Apps with AWS AppSync, GraphQL, & Amazon Alexa: Mobile...Building Voice Enabled Apps with AWS AppSync, GraphQL, & Amazon Alexa: Mobile...
Building Voice Enabled Apps with AWS AppSync, GraphQL, & Amazon Alexa: Mobile...
 
GitHub constellation 2017 SimCorp
GitHub constellation 2017   SimCorpGitHub constellation 2017   SimCorp
GitHub constellation 2017 SimCorp
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17
 
Mule ESB Intro
Mule ESB IntroMule ESB Intro
Mule ESB Intro
 
API Design Workflows
API Design WorkflowsAPI Design Workflows
API Design Workflows
 
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, MicrosoftAPIs at Scale with TypeSpec by Mandy Whaley, Microsoft
APIs at Scale with TypeSpec by Mandy Whaley, Microsoft
 

More from SmartBear

Enforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHubEnforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHub
SmartBear
 
Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1
SmartBear
 
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
SmartBear
 
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
SmartBear
 
How LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHubHow LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHub
SmartBear
 
Standardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial ServicesStandardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial Services
SmartBear
 
Getting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHubGetting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHub
SmartBear
 
Adopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHubAdopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHub
SmartBear
 
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
SmartBear
 
Effective API Lifecycle Management
Effective API Lifecycle Management Effective API Lifecycle Management
Effective API Lifecycle Management
SmartBear
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
SmartBear
 
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
SmartBear
 
Artificial intelligence for faster and smarter software testing - Galway Mee...
Artificial intelligence for faster and smarter software testing  - Galway Mee...Artificial intelligence for faster and smarter software testing  - Galway Mee...
Artificial intelligence for faster and smarter software testing - Galway Mee...
SmartBear
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
SmartBear
 
The Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear WebinarThe Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear Webinar
SmartBear
 
How Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products FasterHow Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products Faster
SmartBear
 
Testing Without a GUI Using TestComplete
 Testing Without a GUI Using TestComplete Testing Without a GUI Using TestComplete
Testing Without a GUI Using TestComplete
SmartBear
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script Extensions
SmartBear
 
How Bdd Can Save Agile
 How Bdd Can Save Agile How Bdd Can Save Agile
How Bdd Can Save Agile
SmartBear
 
API Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship RulesAPI Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship Rules
SmartBear
 

More from SmartBear (20)

Enforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHubEnforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHub
 
Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1
 
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
 
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
 
How LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHubHow LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHub
 
Standardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial ServicesStandardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial Services
 
Getting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHubGetting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHub
 
Adopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHubAdopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHub
 
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
 
Effective API Lifecycle Management
Effective API Lifecycle Management Effective API Lifecycle Management
Effective API Lifecycle Management
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
 
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
 
Artificial intelligence for faster and smarter software testing - Galway Mee...
Artificial intelligence for faster and smarter software testing  - Galway Mee...Artificial intelligence for faster and smarter software testing  - Galway Mee...
Artificial intelligence for faster and smarter software testing - Galway Mee...
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
 
The Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear WebinarThe Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear Webinar
 
How Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products FasterHow Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products Faster
 
Testing Without a GUI Using TestComplete
 Testing Without a GUI Using TestComplete Testing Without a GUI Using TestComplete
Testing Without a GUI Using TestComplete
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script Extensions
 
How Bdd Can Save Agile
 How Bdd Can Save Agile How Bdd Can Save Agile
How Bdd Can Save Agile
 
API Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship RulesAPI Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship Rules
 

Recently uploaded

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 

Recently uploaded (20)

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 

API Contract as Code: Rapid Development with OpenAPI

  • 1. TED EPSTEIN, FOUNDER & CEO | Ted.Epstein@RepreZen.com 1COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. API Contract as Code Rapid Development with OpenAPI
  • 2. First Swagger Value Proposition • Keep your API docs in sync with implementation! … and look cool doing it! COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 2
  • 3. Code-First • Or “API Code-as-Contract” COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 3
  • 4. So why not all code, all the time? • Not Cross-functional team-friendly ◦ Coders aren’t always the best communicators. ◦ Tech writers don’t want to maintain embedded code comments (and you may not want them to). • De-emphasizes API design ◦ Outside-in design, from the user’s perspective ◦ As a distinct process ◦ Leveraging available tools for docs, mocking, testing, etc. ◦ Conscious, collaborative focus to API design quality COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 4
  • 5. But there’s another reason… • Leverage ◦ Higher productivity ◦ Greater expressive power • An OpenAPI Description is code! ◦ High focus, high abstraction ◦ Generated code can be a scaffold to get started quickly… ◦ … and it can be first-class code. COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 5
  • 6. COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 6 API Contract-As-Code Development Workflow
  • 7. COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 7 API Contract-As-Code Development Workflow
  • 8. COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 8 API Contract-As-Code Development Workflow
  • 9. COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 9 API Contract-As-Code Development Workflow
  • 10. COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 10 API Contract-As-Code Development Workflow
  • 11. COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 11 API Contract-As-Code Development Workflow
  • 12. COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 12 API Contract-As-Code Development Workflow
  • 13. Demo COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 13
  • 14. Achieving Separation • “Write-once” codegen for implementation • Delegation • Interface / Implementation • Abstract Base Class / Concrete Implementation • Dependency Injection • Dynamic merge (e.g. C# partial classes) COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 14
  • 15. Project Layout • All in one project • One project for API spec, generate into second project for implementation • Generated library COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 15
  • 16. Validating Implementation vs. Spec Implementation Completeness: “Every method is implemented” ◦ Use static typing when available ◦ Use generated or dynamic unit tests for dynamic languages Specification Completeness “Every method implemented is in the specification” ◦ Harder to enforce, but easy to prevent. ◦ Static code analysis or reflective tests could be useful Correctness Methods implement the contract (mechanics) Methods have the expected outcome (semantics) ◦ Use testing tools or frameworks, same as as you would with code-first COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 16
  • 17. OpenAPI 3.0 - More Descriptive Power, New Possibilities…- • Links • Callbacks • oneOf / anyOf Schemas • Component Model COPYRIGHT © 2017, MODELSOLV, INC. | ALL RIGHTS RESERVED. 17