forked from loafle/openapi-generator-original
This commit is contained in:
parent
0bcf9d8bde
commit
ff414dd6da
@ -8,4 +8,11 @@ additionalProperties:
|
||||
snapshotVersion: "true"
|
||||
hideGenerationTimestamp: "true"
|
||||
reactive: "true"
|
||||
# documentation provider should be ignored
|
||||
documentationProvider: "springfox"
|
||||
# annotation provider should be ignored
|
||||
annotationLibrary: "swagger1"
|
||||
# validation should be ignored
|
||||
useBeanValidation: "true"
|
||||
performBeanValidation: "true"
|
||||
|
||||
|
@ -9,3 +9,10 @@ additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
modelNameSuffix: 'Dto'
|
||||
generatedConstructorWithRequiredArgs: "false"
|
||||
# documentation provider should be ignored
|
||||
documentationProvider: "springdoc"
|
||||
# annotation provider should be ignored
|
||||
annotationLibrary: "swagger2"
|
||||
# validation should be ignored
|
||||
useBeanValidation: "true"
|
||||
performBeanValidation: "true"
|
||||
|
@ -295,7 +295,7 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
|
||||
@Override
|
||||
public DocumentationProvider defaultDocumentationProvider() {
|
||||
return SPRING_HTTP_INTERFACE.equals(library) ? DocumentationProvider.NONE : DocumentationProvider.SPRINGDOC;
|
||||
return isLibrary(SPRING_HTTP_INTERFACE) ? null : DocumentationProvider.SPRINGDOC;
|
||||
}
|
||||
|
||||
public List<DocumentationProvider> supportedDocumentationProvider() {
|
||||
@ -370,8 +370,21 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
documentationProvider = DocumentationProvider.NONE;
|
||||
annotationLibrary = AnnotationLibrary.NONE;
|
||||
useJakartaEe=true;
|
||||
useBeanValidation = false;
|
||||
performBeanValidation = false;
|
||||
|
||||
additionalProperties.put(USE_JAKARTA_EE, useJakartaEe);
|
||||
additionalProperties.put(USE_BEANVALIDATION, useBeanValidation);
|
||||
additionalProperties.put(PERFORM_BEANVALIDATION, performBeanValidation);
|
||||
additionalProperties.put(DOCUMENTATION_PROVIDER, documentationProvider.toCliOptValue());
|
||||
additionalProperties.put(documentationProvider.getPropertyName(), true);
|
||||
additionalProperties.put(ANNOTATION_LIBRARY, annotationLibrary.toCliOptValue());
|
||||
additionalProperties.put(annotationLibrary.getPropertyName(), true);
|
||||
|
||||
applyJakartaPackage();
|
||||
|
||||
LOGGER.warn("For Spring HTTP Interface following options are disabled: documentProvider, annotationLibrary, useBeanValidation, performBeanValidation. "
|
||||
+ "useJakartaEe defaulted to 'true'");
|
||||
}
|
||||
|
||||
if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user