mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
* Adds @Nullable annotation to Spring Boot generator * issue-14427: [REQ][spring] Null-Safety annotations * issue-17382: [REQ] spring generator add Nullable annotations Motivations: * Have Spring Boot generator client properly annotated for nullability to be able to check code using them with tools like NullAway * As it is related to Spring then the `org.springframework.lang.Nullable` annotation was chosen to avoid discussion which `@Nullable` one is true one * `@NonNull` wasn't used as I didn't see much benefit of it. Anyhow, an empty constructor and/or setters allow to put a `null` value there Modifications: * Adds nullableAnnotation template to handle nullability annotation on vars * Adjust pojo templates to use the nullability template * Adapts tests Modifications: * Runs export_docs_generator.sh script to update samples * samples update * excludes Spring @Nullable from java-camel * ones with defaults shouldn't be annotated as @Nullable * updates samples * adds AllArgConstructor generation tests * adds container tests
OpenAPI generated server
Spring Boot Server
Overview
This server was generated by the OpenAPI Generator project. By using the OpenAPI-Spec, you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework.
The underlying library integrating OpenAPI to Spring Boot is springdoc. Springdoc will generate an OpenAPI v3 specification based on the generated Controller and Model classes. The specification is available to download using the following url: http://localhost:80/v3/api-docs/
Start your server as a simple java application
You can view the api documentation in swagger-ui by pointing to http://localhost:80/swagger-ui.html
Change default port value in application.properties