SlideShare a Scribd company logo
1 of 17
Download to read offline
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 SitePronovix
 
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 LearnedPronovix
 
Swagger for-your-api
Swagger for-your-apiSwagger for-your-api
Swagger for-your-apiTony Tam
 
Continuous integration for Ruby on Rails
Continuous integration for Ruby on RailsContinuous integration for Ruby on Rails
Continuous integration for Ruby on RailsDavid 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 pipelinePronovix
 
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)advantagesPronovix
 
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 DocsPronovix
 
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 WorldPronovix
 
API-first development
API-first developmentAPI-first development
API-first developmentVasco Veloso
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookKaty 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 osCodecamp Romania
 

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 developmentChavdar Baikov
 
Short programming Cookies
Short programming CookiesShort programming Cookies
Short programming CookiesPremchand 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 MicroservicesRich Mills
 
Api-First service design
Api-First service designApi-First service design
Api-First service designStefaan 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 managementSven 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 EditionMannaAkpan
 
From API-First to SDK-First
From API-First to SDK-FirstFrom API-First to SDK-First
From API-First to SDK-FirstNordic 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 DemonstrationRockwell 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 designDamian 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-slidesBoopathy 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 AheadTed 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 AlexaAmazon 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 SimCorpNiels Harre
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17Phil Wilkins
 
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, MicrosoftNordic 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 SwaggerHubSmartBear
 
Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1SmartBear
 
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 SwaggerHubSmartBear
 
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 ServicesSmartBear
 
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 SwaggerHubSmartBear
 
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 SwaggerHubSmartBear
 
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 WorldSmartBear
 
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 WebinarSmartBear
 
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 FasterSmartBear
 
Testing Without a GUI Using TestComplete
 Testing Without a GUI Using TestComplete Testing Without a GUI Using TestComplete
Testing Without a GUI Using TestCompleteSmartBear
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsSmartBear
 
How Bdd Can Save Agile
 How Bdd Can Save Agile How Bdd Can Save Agile
How Bdd Can Save AgileSmartBear
 
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 RulesSmartBear
 

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

Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Recently uploaded (20)

Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

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