Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
OpenAPI and Java - Portland - 2019-12-10
Search
sullis
December 10, 2019
Programming
270
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OpenAPI and Java - Portland - 2019-12-10
Portland Java User Group
Portland Oregon
December 10, 2019
#openapi
#java
sullis
December 10, 2019
More Decks by sullis
See All by sullis
Dependency Management for Java - Code Remix Summit 2026-05-12
sullis
0
95
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
110
Dependency Management for Java - Seattle 2025-11-18
sullis
0
72
Dependency Management for Java - Portland - 2025-11-04
sullis
0
48
Dependency management for Java applications 2025-09-11
sullis
0
76
S3 NYC Iceberg meetup 2025-07-10
sullis
0
72
Amazon S3 Chicago 2025-06-04
sullis
0
160
Amazon S3 Boston 2025-05-07
sullis
0
140
Netty ConFoo Montreal 2025-02-27
sullis
0
210
Other Decks in Programming
See All in Programming
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
4
3.4k
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
270
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Jetpack Compose Mechanisms
skydoves
3
810
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
510
sbt 2.0: takeoff
eed3si9n
0
160
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
気持ちぃ〜角丸 Squircle
ryu1013
0
310
Featured
See All Featured
Making Projects Easy
brettharned
120
6.8k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
From π to Pie charts
rasagy
1
400
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
My Coaching Mixtape
mlcsv
0
350
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
Building the Perfect Custom Keyboard
takai
2
910
It's Worth the Effort
3n
188
29k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Transcript
OpenAPI and Java Sean Sullivan Portland Java User Group December
10, 2019
About me software engineer Portland Oregon Java Scala
Agenda OpenAPI Real world examples Java tools and libraries API
guidelines
OpenAPI
OpenAPI is a specification for describing API’s
API specifications
WSDL (SOAP) WADL (REST)
Swagger (REST) OpenAPI (REST)
https://en.wikipedia.org/wiki/OpenAPI_Specification
REST API’s
API Driven Development
“API first”
source: Adobe Tech Blog June 2017
Code first vs API schema first
JSON or YAML
Real world examples
Case Study: stripe.com OpenAPI
https://github.com/stripe/openapi
https://github.com/stripe/openapi
Case Study: squareup.com OpenAPI
https://github.com/square/connect-api-specification
Case Study: Kubernetes OpenAPI
https://github.com/kubernetes/kubernetes/tree/master/api/openapi-spec
https://github.com/kubernetes-client/java Kubernetes Java Client
https://github.com/kubernetes-client/java Kubernetes Java Client code generation
Case Study: Microsoft Azure OpenAPI
https://github.com/Azure/azure-rest-api-specs azure-rest-api-specs
Case Study: Amazon EventBridge OpenAPI
https://docs.aws.amazon.com/eventbridge Amazon EventBridge “EventBridge is a serverless event bus service
that makes it easy to connect your applications with data from a variety of sources”
https://docs.aws.amazon.com/eventbridge EventBridge Schema Registry Schemas are defined using JSON files,
using the OpenAPI specification
https://www.tbray.org/ongoing/When/201x/2019/12/02/Strongly-Typed-Events Strongly typed events
Java tools and libraries
Swagger libraries swagger-core swagger-parser swagger-codegen swagger-inflector
https://github.com/swagger-api/swagger-parser Swagger parser
pom.xml <dependency> <groupId>io.swagger.parser.v3</groupId> <artifactId>swagger-parser</artifactId> <version>2.0.16</version> </dependency> Swagger parser
https://github.com/swagger-api/swagger-parser import io.swagger.v3.parser.OpenAPIV3Parser; import io.swagger.v3.oas.models.OpenAPI; String url = “http://petstore.swagger.io/v3/openapi.json”; OpenAPI
openAPI = new OpenAPIV3Parser().read(url); Swagger parser
https://github.com/swagger-api/swagger-parser Swagger parser Pull Request #1271
ObjectMapperFactory.java return new JsonFactoryBuilder() .enable(StreamReadFeature.STRICT_DUPLICATE_DETECTION) .build(); Swagger parser Pull Request
#1271
Code generators Guardrail openapi-generator swagger-codegen AutoRest
Guardrail project
https://guardrail.dev/ Guardrail
https://github.com/twilio/guardrail Guardrail
https://github.com/twilio/guardrail Guardrail: Scala ScalaMeta
https://github.com/twilio/guardrail Guardrail: Java JavaParser
Guardrail example
guardrail-maven-plugin <plugin> <groupId>com.twilio</groupId> <artifactId>guardrail-maven-plugin_2.12</artifactId> <version>0.54.5</version> <executions> … </executions> </plugin>
guardrail-maven-plugin <configuration> <language>java</language> <kind>client</kind> <framework>dropwizard</framework> <specPath>${project.basedir}/src/main/openapi/petstore.json</specPath> <packageName>com.example.clients.petstore</packageName> </configuration> Java client
guardrail-maven-plugin
openapi-generator project
openapi-generator
openapi-generator
openapi-generator
REST API guidelines
https://github.com/microsoft/api-guidelines
https://www.infoq.com/news/2016/07/microsoft-rest-api/ July 2016
https://cloud.google.com/apis/design/
https://github.com/zalando/restful-api-guidelines
https://github.com/paypal/api-standards/blob/master/api-style-guide.md
Final thoughts use OpenAPI to define REST API’s adopt “API
First” approach use a code generator to generate client libraries contribute to open source projects
The End