Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank...
Transcript of Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank...
![Page 1: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/1.jpg)
@dragonmantank
Dead Simple APIs with OpenAPI
![Page 2: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/2.jpg)
@dragonmantank
What is OpenAPI?
![Page 3: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/3.jpg)
@dragonmantank
● Define endpoints that are available
● What verbs can be used
● What responses look like
● Authentication Methods
http://spec.openapis.org/oas/v3.0.3
![Page 4: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/4.jpg)
@dragonmantank
(It's a specification)
● Define endpoints that are available
● What verbs can be used
● What responses look like
● Authentication Methods
http://spec.openapis.org/oas/v3.0.3
![Page 5: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/5.jpg)
@dragonmantank
(It's a specification)
● Define endpoints that are available
● What verbs can be used
● What responses look like
● Authentication Methods
http://spec.openapis.org/oas/v3.0.3
![Page 6: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/6.jpg)
@dragonmantank
(It's a specification)
● Define endpoints that are available
● What verbs can be used
● What responses look like
● Authentication Methods
http://spec.openapis.org/oas/v3.0.3
![Page 7: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/7.jpg)
@dragonmantank
(It's a specification)
● Define endpoints that are available
● What verbs can be used
● What responses look like
● Authentication Methods
http://spec.openapis.org/oas/v3.0.3
![Page 8: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/8.jpg)
@dragonmantank
(It's a specification)
● Define endpoints that are available
● What verbs can be used
● What responses look like
● Authentication Methods
http://spec.openapis.org/oas/v3.0.3
![Page 9: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/9.jpg)
@dragonmantank
Why OpenAPI?
![Page 10: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/10.jpg)
@dragonmantank
Description as Code
![Page 11: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/11.jpg)
@dragonmantank
![Page 13: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/13.jpg)
@dragonmantank
Documentation Generation
![Page 14: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/14.jpg)
@dragonmantank https://github.com/Nexmo/nexmo-oas-renderer
![Page 15: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/15.jpg)
@dragonmantank
Designing APIs
![Page 16: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/16.jpg)
@dragonmantank
openapi: 3.0.0info: version: 1.2.5 title: Voice APIservers:- url: https://api.nexmo.com/v1/callspaths: "/": get: security: - bearerAuth: [] description: Get details parameters: - name: status in: query schema: type: string responses: '200': description: Ok
https://swagger.io/docs/specification/basic-structure/
![Page 18: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/18.jpg)
@dragonmantank
![Page 19: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/19.jpg)
@dragonmantank
![Page 20: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/20.jpg)
@dragonmantank
![Page 21: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/21.jpg)
@dragonmantank
![Page 22: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/22.jpg)
@dragonmantank
![Page 23: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/23.jpg)
@dragonmantank
Prototyping and Mocking APIs
![Page 24: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/24.jpg)
@dragonmantank
![Page 25: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/25.jpg)
@dragonmantank
![Page 26: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/26.jpg)
@dragonmantank
![Page 29: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/29.jpg)
@dragonmantank
Generating API Code
https://github.com/OpenAPITools/openapi-generator
![Page 30: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/30.jpg)
@dragonmantank
● ASP.Net● C++● Golang● Java● PHP● NodeJS Express● Ruby on Rails
![Page 31: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/31.jpg)
@dragonmantank
$ openapi-generator-cli \ generate \ -i demo.yaml \ -g javascript \ -o $(pwd)/js
![Page 32: Dead Simple APIs with OpenAPI - linuxrecruit.co.uk of Dead Simple APIs with... · @dragonmantank (It's a specification) Define endpoints that are available What verbs can be used](https://reader035.fdocuments.us/reader035/viewer/2022071214/6042db180cf24e43a62c92de/html5/thumbnails/32.jpg)
@dragonmantank