-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Source DocumentationProvider, spring-mvc
decommission
#11531
Implement Source DocumentationProvider, spring-mvc
decommission
#11531
Conversation
- Bring homeController.mustache up-to-date - Main class is now OpenApiGeneratorApplication - Introduce SpringBootTest.mustache - Remove option swaggerDocketConfig/openapiDocketConfig in favor of documentationProvider.
Fix spring-mvc builds
re-open to trigger CI |
There is a new spring-boot sample, spring-boot-source.yaml. It has should be registered as a new CI build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor comment - I think that interface only is not exclusive to swagger-ui
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
Show resolved
Hide resolved
# Conflicts: # modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/openapi2SpringBoot.mustache # samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/OpenAPI2SpringBoot.java # samples/server/petstore/java-camel/src/main/java/org/openapitools/OpenAPI2SpringBoot.java # samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES # samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/OpenAPI2SpringBoot.java # samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/FILES # samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/OpenAPI2SpringBoot.java # samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/FILES # samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/OpenAPI2SpringBoot.java
@wing328 Could you remove the sprng-mvc samples from the CI configuration? |
# Conflicts: # modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
I think I have done it with 87367b6. Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone requests the ability to generate the HTML with interfaces inky later, it's easy enough to reevaluate if that's a valid configuration we'd want to support.
Only other comment is about generating tests (I think there's a global generator property on whether or not tests should be output)
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
Show resolved
Hide resolved
spring-mvc
decomissino
spring-mvc
decomissinospring-mvc
decommission
# Conflicts: # samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java # samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java # samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java # samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java # samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java # samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
…der' into feature/sourceDocumentationProvider
Circle-CI failures are not caused by this pr IMO. |
CircleCI failures not related to this PR. |
fyi, Moving from 5.0.0 to 6.3.0-SNAPSHOT.a s suggested I tried spring-boot, but it does not recognise that library unless generatorName is set to spring |
Finish the DocumentationProvider Story (#11258)
Changes
When source is selected as DocumentationProvider, the original openapi spec is copied to the project and
is exposed via /openapi.{json,yaml}. Swagger-ui, if enabled, is configured to show this spec.
SpringCodegen
now implementsSwaggerUIFeatures
. Use the useSwaggerUI parameter with the spring-boot library to use it. Swagger UI is enabled by default.OpenApiGeneratorApplication.java
.OpenApiGeneratorApplicationTests.java
.Deprecation Warnings
Removals
Users who need to support Swagger1 Annotations (Annotate Model and Api using the Swagger Annotations 1.x library) could do so independently of Springfox using annotationLibrary=swagger1.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(5.3.0),6.0.x