Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Apidays Paris 2023 - OpenAPI 3.1 and Spring-Boot 3 - What's New?, Badr Nass Lahsen, CyberArk

apidays
December 15, 2023

Apidays Paris 2023 - OpenAPI 3.1 and Spring-Boot 3 - What's New?, Badr Nass Lahsen, CyberArk

Apidays Paris 2023 - Software and APIs for Smart, Sustainable and Sovereign Societies
December 6, 7 & 8, 2023

OpenAPI 3.1 and Spring-Boot 3 - What's New?
Badr Nass Lahsen, Cyber Security Architecture & DevSecOps - EMEA Solutions Engineering at CyberArk

------

Check out our conferences at https://www.apidays.global/

Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8

Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io

Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/

apidays

December 15, 2023
Tweet

More Decks by apidays

Other Decks in Programming

Transcript

  1. • Documenting your API is critical. You want your API

    to be easy for app developers to understand in order to drive API consumption. • The best API documentation is not only informative and consistent, but also interactive and you can achieve this with an OpenAPI spec. • Since July 2017, there are a lot of industries adopting OpenAPI 3 specification to discover and understand the capabilities of a REST API without the need to have access to source code. 5
  2. 6 • Understanding and Integration • Onboarding and Learning •

    Preventing / Reducing Errors • Interoperability • Updates and Changes • Troubleshooting • Efficient Development • Promoting Adoption • Compliance and Standards API Lifecycle
  3. • Written in either JSON or YAML • OpenAPI specification

    uses a standard format to describe a RESTful API. • The goal is keep the spec machine-readable, but also make it easy for humans to understand as well. • All specifications include descriptions for the following elements: 7
  4. 9

  5. 10

  6. 11

  7. • JDK 17+ (records ) • Jakarta EE 9 /

    10 (Jakarta namespace) - Removal of Javax support • Servlet API 5.0 / 6.0 • Hibernate ORM 6.1 – JPA 3.0 / 3.1 • Hibernate Validator 7.0 / 8.0 – Bean Validation 3.0 • RFC 7807 Problem Details • AOT (Ahead-Of-Time) Compilation • Observability (Micrometer) • GraalVM Native images support • But wait, there's more! • Spring Boot 3.1 – Docker Compose Module • Spring Boot 3.2 – Java 17/ 21+ – Virtual Threads (“Project Loom”) 12 Spring Boot 3 Consider upgrading your JDK along with Spring Framework 6.x Production-ready on JDK 17 & 21 LTS
  8. üProject Open Source since 2019 ü22 millions downloads on oct

    2023 üAlmost 3000 stars in github 13 Numbers using Maven Central - Sonatype üCompanies or projects officially using springdoc-openapi
  9. 15 Spring Boot Swagger Springdoc-openapi Spring-webmvc Spring-webflux springdoc-openapi-starter-webmvc-api springdoc-openapi-starter-webflux-api springdoc-openapi-starter-common

    swagger-core-jakarta spring-boot-autoconfigure springdoc-openapi-starter-webmvc-ui springdoc-openapi-starter-webflux-ui Swagger-ui UI REST API For Servlet projects For Reactive projects
  10. 16

  11. • Languages supported: Java, Kotlin and Groovy • Integration of

    JSR 303 Bean Validation with OpenAPI 3 • Integration with actuator for the observability • Problem Details for HTTP APIs specification, RFC 7807 • Global Exception Handling Using Controller Advice • JSR303 annotations for validation • Integration with spring-security • Spring Authorization Server 1.0 (OAuth 2.1 and OpenID Connect 1.0) • Multiple API groups per same application • Support for spring-cloud-gateway • Support of OpenAPI generation, from Javadoc documentation • CI/CD integration with offline generation, during integration tests • And when feature not possible, abitliy to extend with so many Customizers (OpenApiCustomiser, OperationCustomizer, ParameterCustomizer, PropertyCustomizer) 17