├── .github ├── dependabot.yml └── workflows │ └── build.yml ├── .gitignore ├── LICENSE.txt ├── README.md ├── demo ├── openapi-generator-for-spring-demo-webflux │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── de │ │ │ └── qaware │ │ │ └── openapigeneratorforspring │ │ │ └── demo │ │ │ └── webflux │ │ │ ├── DemoWebFluxApplication.java │ │ │ └── HelloWorldController.java │ │ └── resources │ │ └── application.yml └── openapi-generator-for-spring-demo-webmvc │ ├── README.md │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── de │ │ └── qaware │ │ └── openapigeneratorforspring │ │ └── demo │ │ └── webmvc │ │ ├── DemoWebMvcApplication.java │ │ ├── HelloWorldController.java │ │ └── SpringSecurityConfiguration.java │ └── resources │ └── application.properties ├── lombok.config ├── openapi-generator-for-spring-api ├── pom.xml └── src │ └── main │ └── java │ └── de │ └── qaware │ └── openapigeneratorforspring │ └── common │ ├── OpenApiCustomizer.java │ ├── OpenApiRequestParameterProvider.java │ ├── annotation │ ├── AnnotationsSupplier.java │ ├── AnnotationsSupplierFactory.java │ └── HasAnnotationsSupplier.java │ ├── filter │ ├── handlermethod │ │ └── HandlerMethodFilter.java │ ├── operation │ │ ├── OperationPostFilter.java │ │ ├── OperationPreFilter.java │ │ └── parameter │ │ │ ├── OperationParameterPostFilter.java │ │ │ └── OperationParameterPreFilter.java │ └── pathitem │ │ └── PathItemFilter.java │ ├── info │ ├── OpenApiInfoSupplier.java │ └── OpenApiVersionSupplier.java │ ├── mapper │ ├── ApiResponseAnnotationMapper.java │ ├── CallbackAnnotationMapper.java │ ├── ContactAnnotationMapper.java │ ├── ContentAnnotationMapper.java │ ├── EncodingAnnotationMapper.java │ ├── ExampleObjectAnnotationMapper.java │ ├── ExtensionAnnotationMapper.java │ ├── ExternalDocumentationAnnotationMapper.java │ ├── HeaderAnnotationMapper.java │ ├── InfoAnnotationMapper.java │ ├── LicenseAnnotationMapper.java │ ├── LinkAnnotationMapper.java │ ├── LinkParameterAnnotationMapper.java │ ├── MapperContext.java │ ├── MediaTypesProvider.java │ ├── OAuthFlowAnnotationMapper.java │ ├── OAuthFlowsAnnotationMapper.java │ ├── OperationAnnotationMapper.java │ ├── ParameterAnnotationMapper.java │ ├── ParsableValueMapper.java │ ├── RequestBodyAnnotationMapper.java │ ├── SecurityRequirementAnnotationMapper.java │ ├── SecuritySchemeAnnotationMapper.java │ ├── ServerAnnotationMapper.java │ ├── ServerVariableAnnotationMapper.java │ └── TagAnnotationMapper.java │ ├── operation │ ├── OperationBuilderContext.java │ ├── OperationInfo.java │ ├── OperationWithInfo.java │ ├── customizer │ │ └── OperationCustomizer.java │ ├── id │ │ ├── OperationIdConflictResolver.java │ │ └── OperationIdProvider.java │ ├── parameter │ │ ├── converter │ │ │ └── ParameterMethodConverter.java │ │ └── customizer │ │ │ ├── OperationParameterCustomizer.java │ │ │ └── OperationParameterCustomizerContext.java │ └── response │ │ ├── ApiResponseDefaultProvider.java │ │ ├── OperationApiResponsesCustomizer.java │ │ ├── OperationApiResponsesDescriptionCustomizer.java │ │ └── OperationApiResponsesFromMethodCustomizer.java │ ├── paths │ ├── HandlerMethod.java │ ├── HandlerMethodWithInfo.java │ ├── HandlerMethodsProvider.java │ └── PathItemCustomizer.java │ ├── reference │ ├── HasReferencedItemConsumer.java │ ├── ReferencedItemConsumer.java │ ├── ReferencedItemConsumerSupplier.java │ ├── component │ │ ├── callback │ │ │ ├── ReferenceDeciderForCallback.java │ │ │ ├── ReferenceIdentifierBuilderForCallback.java │ │ │ ├── ReferenceIdentifierConflictResolverForCallback.java │ │ │ └── ReferencedCallbacksConsumer.java │ │ ├── example │ │ │ ├── ReferenceDeciderForExample.java │ │ │ ├── ReferenceIdentifierBuilderForExample.java │ │ │ ├── ReferenceIdentifierConflictResolverForExample.java │ │ │ └── ReferencedExamplesConsumer.java │ │ ├── header │ │ │ ├── ReferenceDeciderForHeader.java │ │ │ ├── ReferenceIdentifierBuilderForHeader.java │ │ │ ├── ReferenceIdentifierConflictResolverForHeader.java │ │ │ └── ReferencedHeadersConsumer.java │ │ ├── link │ │ │ ├── ReferenceDeciderForLink.java │ │ │ ├── ReferenceIdentifierBuilderForLink.java │ │ │ ├── ReferenceIdentifierConflictResolverForLink.java │ │ │ └── ReferencedLinksConsumer.java │ │ ├── parameter │ │ │ ├── ReferenceDeciderForParameter.java │ │ │ ├── ReferenceIdentifierBuilderForParameter.java │ │ │ ├── ReferenceIdentifierConflictResolverForParameter.java │ │ │ └── ReferencedParametersConsumer.java │ │ ├── requestbody │ │ │ ├── ReferenceDeciderForRequestBody.java │ │ │ ├── ReferenceIdentifierBuilderForRequestBody.java │ │ │ ├── ReferenceIdentifierConflictResolverForRequestBody.java │ │ │ └── ReferencedRequestBodyConsumer.java │ │ ├── response │ │ │ ├── ReferenceDeciderForApiResponse.java │ │ │ ├── ReferenceIdentifierBuilderForApiResponse.java │ │ │ ├── ReferenceIdentifierConflictResolverForApiResponse.java │ │ │ └── ReferencedApiResponsesConsumer.java │ │ ├── schema │ │ │ ├── ReferenceDeciderForSchema.java │ │ │ ├── ReferenceIdentifierBuilderForSchema.java │ │ │ ├── ReferenceIdentifierConflictResolverForSchema.java │ │ │ └── ReferencedSchemaConsumer.java │ │ └── securityscheme │ │ │ └── ReferencedSecuritySchemesConsumer.java │ ├── fortype │ │ ├── ReferenceDeciderForType.java │ │ ├── ReferenceIdentifierBuilderForType.java │ │ ├── ReferenceIdentifierConflictResolverForType.java │ │ └── ReferencedItemConsumerForType.java │ └── tag │ │ └── ReferencedTagsConsumer.java │ ├── schema │ ├── customizer │ │ ├── SchemaCustomizer.java │ │ └── SchemaPropertiesCustomizer.java │ ├── mapper │ │ └── SchemaAnnotationMapper.java │ └── resolver │ │ ├── SchemaNameBuilder.java │ │ ├── SchemaResolver.java │ │ ├── properties │ │ ├── SchemaPropertiesResolver.java │ │ ├── SchemaProperty.java │ │ └── SchemaPropertyFilter.java │ │ └── type │ │ ├── TypeResolver.java │ │ ├── extension │ │ ├── jackson │ │ │ └── JacksonPolymorphismTypeSchemaNameBuilder.java │ │ └── java8 │ │ │ └── Java8TimeInitialSchemaBuilder.java │ │ └── initial │ │ ├── InitialSchemaBuilder.java │ │ ├── InitialType.java │ │ └── InitialTypeBuilder.java │ ├── security │ └── OpenApiSecuritySchemesSupplier.java │ ├── supplier │ ├── OpenAPIDefinitionAnnotationSupplier.java │ ├── OpenApiBaseUriSupplier.java │ ├── OpenApiObjectMapperSupplier.java │ ├── OpenApiServersSupplier.java │ ├── OpenApiSpringBootApplicationAnnotationsSupplier.java │ ├── OpenApiSpringBootApplicationClassSupplier.java │ └── OpenApiYamlMapper.java │ └── util │ └── OpenApiOrderedUtils.java ├── openapi-generator-for-spring-autoconfigure ├── pom.xml └── src │ └── main │ ├── java │ └── de │ │ └── qaware │ │ └── openapigeneratorforspring │ │ └── autoconfigure │ │ ├── OpenApiGeneratorAnnotationAutoConfiguration.java │ │ ├── OpenApiGeneratorAutoConfiguration.java │ │ ├── OpenApiGeneratorFilterAutoConfiguration.java │ │ ├── OpenApiGeneratorInfoAutoConfiguration.java │ │ ├── OpenApiGeneratorMapperAutoConfiguration.java │ │ ├── OpenApiGeneratorOperationAutoConfiguration.java │ │ ├── OpenApiGeneratorOperationParameterAutoConfiguration.java │ │ ├── OpenApiGeneratorOperationResponseAutoConfiguration.java │ │ ├── OpenApiGeneratorPathsAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceCallbackAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceExampleAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceHeaderAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceLinkAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceParameterAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceRequestBodyAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceResponseAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceSchemaAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceSecuritySchemeAutoConfiguration.java │ │ ├── OpenApiGeneratorReferenceTagAutoConfiguration.java │ │ ├── OpenApiGeneratorSchemaAutoConfiguration.java │ │ ├── OpenApiGeneratorSchemaExtensionAutoConfiguration.java │ │ ├── OpenApiGeneratorSupplierAutoConfiguration.java │ │ └── OpenApiGeneratorUtilAutoConfiguration.java │ └── resources │ └── META-INF │ ├── spring.factories │ └── spring │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── openapi-generator-for-spring-common ├── pom.xml └── src │ ├── main │ ├── java │ │ └── de │ │ │ └── qaware │ │ │ └── openapigeneratorforspring │ │ │ └── common │ │ │ ├── DefaultOpenApiCustomizer.java │ │ │ ├── OpenApiConfigurationProperties.java │ │ │ ├── OpenApiGenerator.java │ │ │ ├── annotation │ │ │ └── DefaultAnnotationsSupplierFactory.java │ │ │ ├── filter │ │ │ ├── handlermethod │ │ │ │ └── ExcludeHiddenHandlerMethodFilter.java │ │ │ └── pathitem │ │ │ │ └── NoOperationsPathItemFilter.java │ │ │ ├── info │ │ │ ├── DefaultOpenApiInfoSupplier.java │ │ │ ├── DefaultOpenApiVersionSupplier.java │ │ │ └── OpenApiInfoConfigurationProperties.java │ │ │ ├── mapper │ │ │ ├── DefaultApiResponseAnnotationMapper.java │ │ │ ├── DefaultCallbackAnnotationMapper.java │ │ │ ├── DefaultContactAnnotationMapper.java │ │ │ ├── DefaultContentAnnotationMapper.java │ │ │ ├── DefaultEncodingAnnotationMapper.java │ │ │ ├── DefaultExampleObjectAnnotationMapper.java │ │ │ ├── DefaultExtensionAnnotationMapper.java │ │ │ ├── DefaultExternalDocumentationAnnotationMapper.java │ │ │ ├── DefaultHeaderAnnotationMapper.java │ │ │ ├── DefaultInfoAnnotationMapper.java │ │ │ ├── DefaultLicenseAnnotationMapper.java │ │ │ ├── DefaultLinkAnnotationMapper.java │ │ │ ├── DefaultLinkParameterAnnotationMapper.java │ │ │ ├── DefaultOAuthFlowAnnotationMapper.java │ │ │ ├── DefaultOAuthFlowsAnnotationMapper.java │ │ │ ├── DefaultOperationAnnotationMapper.java │ │ │ ├── DefaultParameterAnnotationMapper.java │ │ │ ├── DefaultParsableValueMapper.java │ │ │ ├── DefaultRequestBodyAnnotationMapper.java │ │ │ ├── DefaultSecurityRequirementAnnotationMapper.java │ │ │ ├── DefaultSecuritySchemeAnnotationMapper.java │ │ │ ├── DefaultServerAnnotationMapper.java │ │ │ ├── DefaultServerVariableAnnotationMapper.java │ │ │ ├── DefaultTagAnnotationMapper.java │ │ │ └── MapperContextImpl.java │ │ │ ├── operation │ │ │ ├── OperationBuilder.java │ │ │ ├── OperationBuilderContextImpl.java │ │ │ ├── OperationBuilderException.java │ │ │ ├── customizer │ │ │ │ ├── DefaultDeprecatedOperationCustomizer.java │ │ │ │ ├── DefaultOperationCallbackCustomizer.java │ │ │ │ ├── DefaultOperationIdCustomizer.java │ │ │ │ ├── DefaultOperationSecurityRequirementCustomizer.java │ │ │ │ ├── DefaultOperationSecuritySchemesCustomizer.java │ │ │ │ ├── DefaultOperationServersCustomizer.java │ │ │ │ ├── DefaultOperationTagsCustomizer.java │ │ │ │ └── DefaultRequestBodyOperationCustomizer.java │ │ │ ├── id │ │ │ │ ├── DefaultOperationIdConflictResolver.java │ │ │ │ └── DefaultOperationIdProvider.java │ │ │ ├── parameter │ │ │ │ ├── DefaultOperationParameterCustomizer.java │ │ │ │ ├── OperationParameterCustomizerContextImpl.java │ │ │ │ ├── converter │ │ │ │ │ └── DefaultParameterMethodConverterFromParameterAnnotation.java │ │ │ │ └── customizer │ │ │ │ │ ├── DefaultOperationParameterAnnotationCustomizer.java │ │ │ │ │ ├── DefaultOperationParameterDeprecatedCustomizer.java │ │ │ │ │ ├── DefaultOperationParameterNameCustomizer.java │ │ │ │ │ ├── DefaultOperationParameterNullableCustomizer.java │ │ │ │ │ └── DefaultOperationParameterSchemaCustomizer.java │ │ │ └── response │ │ │ │ ├── DefaultApiResponseDefaultProvider.java │ │ │ │ ├── DefaultOperationApiResponsesDescriptionCustomizer.java │ │ │ │ ├── DefaultOperationApiResponsesFromMethodCustomizer.java │ │ │ │ └── DefaultOperationResponseCustomizer.java │ │ │ ├── paths │ │ │ ├── DefaultPathItemSharedParametersCustomizer.java │ │ │ ├── DefaultPathItemSharedServersCustomizer.java │ │ │ ├── PathItemBuilderFactory.java │ │ │ └── PathsBuilder.java │ │ │ ├── reference │ │ │ ├── AbstractReferencedItemStorage.java │ │ │ ├── ReferenceType.java │ │ │ ├── ReferencedItemSupport.java │ │ │ ├── ReferencedItemSupportFactory.java │ │ │ ├── component │ │ │ │ ├── callback │ │ │ │ │ ├── ReferencedCallbackStorage.java │ │ │ │ │ ├── ReferencedCallbacksHandlerFactory.java │ │ │ │ │ └── ReferencedCallbacksHandlerImpl.java │ │ │ │ ├── example │ │ │ │ │ ├── ReferencedExampleStorage.java │ │ │ │ │ ├── ReferencedExamplesHandlerFactory.java │ │ │ │ │ └── ReferencedExamplesHandlerImpl.java │ │ │ │ ├── header │ │ │ │ │ ├── ReferencedHeaderStorage.java │ │ │ │ │ ├── ReferencedHeadersHandlerFactory.java │ │ │ │ │ └── ReferencedHeadersHandlerImpl.java │ │ │ │ ├── link │ │ │ │ │ ├── ReferencedLinkStorage.java │ │ │ │ │ ├── ReferencedLinksHandlerFactory.java │ │ │ │ │ └── ReferencedLinksHandlerImpl.java │ │ │ │ ├── parameter │ │ │ │ │ ├── ReferencedParameterStorage.java │ │ │ │ │ ├── ReferencedParametersHandlerFactory.java │ │ │ │ │ └── ReferencedParametersHandlerImpl.java │ │ │ │ ├── requestbody │ │ │ │ │ ├── ReferencedRequestBodyHandlerFactory.java │ │ │ │ │ ├── ReferencedRequestBodyHandlerImpl.java │ │ │ │ │ └── ReferencedRequestBodyStorage.java │ │ │ │ ├── response │ │ │ │ │ ├── DefaultReferenceIdentifierBuilderForApiResponse.java │ │ │ │ │ ├── ReferencedApiResponseStorage.java │ │ │ │ │ ├── ReferencedApiResponsesHandlerFactory.java │ │ │ │ │ └── ReferencedApiResponsesHandlerImpl.java │ │ │ │ ├── schema │ │ │ │ │ ├── DefaultReferenceDeciderForSchema.java │ │ │ │ │ ├── DefaultReferenceIdentifierBuilderForSchema.java │ │ │ │ │ ├── ReferencedSchemaHandlerFactory.java │ │ │ │ │ ├── ReferencedSchemaHandlerImpl.java │ │ │ │ │ └── ReferencedSchemaStorage.java │ │ │ │ └── securityscheme │ │ │ │ │ ├── ReferencedSecuritySchemesHandlerFactory.java │ │ │ │ │ └── ReferencedSecuritySchemesHandlerImpl.java │ │ │ ├── fortype │ │ │ │ ├── DefaultReferenceDeciderFactory.java │ │ │ │ ├── DefaultReferenceIdentifierBuilderFactory.java │ │ │ │ └── DefaultReferenceIdentifierConflictResolverFactory.java │ │ │ ├── handler │ │ │ │ ├── AbstractDependentReferencedComponentHandler.java │ │ │ │ ├── AbstractReferencedComponentHandler.java │ │ │ │ ├── ReferencedItemHandler.java │ │ │ │ └── ReferencedItemHandlerFactory.java │ │ │ └── tag │ │ │ │ ├── ReferencedTagsHandlerFactory.java │ │ │ │ └── ReferencedTagsHandlerImpl.java │ │ │ ├── schema │ │ │ ├── customizer │ │ │ │ ├── SchemaCustomizerForDeprecated.java │ │ │ │ ├── SchemaCustomizerForNullable.java │ │ │ │ ├── SchemaCustomizerForRequiredProperties.java │ │ │ │ ├── SchemaCustomizerForSchemaAnnotation.java │ │ │ │ └── SchemaCustomizerForValidation.java │ │ │ ├── mapper │ │ │ │ └── DefaultSchemaAnnotationMapper.java │ │ │ └── resolver │ │ │ │ ├── DefaultSchemaNameBuilder.java │ │ │ │ ├── DefaultSchemaResolver.java │ │ │ │ ├── properties │ │ │ │ ├── DefaultSchemaPropertiesResolver.java │ │ │ │ ├── SchemaPropertyFilterForIgnoredMembers.java │ │ │ │ └── SchemaPropertyFilterForNamelessMembers.java │ │ │ │ └── type │ │ │ │ ├── TypeResolverForCollectionLikeType.java │ │ │ │ ├── TypeResolverForCollectionLikeTypeSupport.java │ │ │ │ ├── TypeResolverForMapLikeType.java │ │ │ │ ├── TypeResolverForObject.java │ │ │ │ ├── extension │ │ │ │ ├── jackson │ │ │ │ │ ├── DefaultJacksonPolymorphismTypeSchemaNameBuilder.java │ │ │ │ │ └── TypeResolverForJacksonPolymorphism.java │ │ │ │ └── java8 │ │ │ │ │ ├── DefaultJava8TimeInitialSchemaBuilder.java │ │ │ │ │ └── Java8TimeTypeResolverConfigurationProperties.java │ │ │ │ └── initial │ │ │ │ ├── InitialSchemaBuilderForEnum.java │ │ │ │ ├── InitialSchemaBuilderForPrimitiveTypes.java │ │ │ │ ├── InitialSchemaBuilderForVoid.java │ │ │ │ ├── InitialTypeBuilderForReferenceType.java │ │ │ │ └── InitialTypeBuilderForSchemaAnnotation.java │ │ │ ├── supplier │ │ │ ├── DefaultOpenAPIDefinitionAnnotationSupplier.java │ │ │ ├── DefaultOpenApiObjectMapperSupplier.java │ │ │ ├── DefaultOpenApiServersSupplier.java │ │ │ ├── DefaultOpenApiSpringBootApplicationAnnotationsSupplier.java │ │ │ ├── DefaultOpenApiSpringBootApplicationClassSupplier.java │ │ │ └── DefaultOpenApiYamlMapper.java │ │ │ └── util │ │ │ ├── OpenApiCollectionUtils.java │ │ │ ├── OpenApiConfigurationPropertiesUtils.java │ │ │ ├── OpenApiConstants.java │ │ │ ├── OpenApiLoggingUtils.java │ │ │ ├── OpenApiMapUtils.java │ │ │ ├── OpenApiObjectUtils.java │ │ │ ├── OpenApiProxyUtils.java │ │ │ ├── OpenApiStreamUtils.java │ │ │ └── OpenApiStringUtils.java │ └── resources │ │ └── META-INF │ │ └── additional-spring-configuration-metadata.json │ └── test │ └── java │ └── de │ └── qaware │ └── openapigeneratorforspring │ └── common │ ├── annotation │ └── DefaultAnnotationsSupplierFactoryTest.java │ ├── schema │ └── customizer │ │ └── SchemaCustomizerForValidationTest.java │ └── util │ ├── OpenApiLoggingUtilsTest.java │ └── OpenApiProxyUtilsTest.java ├── openapi-generator-for-spring-model ├── pom.xml └── src │ └── main │ └── java │ └── de │ └── qaware │ └── openapigeneratorforspring │ └── model │ ├── Components.java │ ├── ExternalDocumentation.java │ ├── OpenApi.java │ ├── example │ └── Example.java │ ├── header │ └── Header.java │ ├── info │ ├── Contact.java │ ├── Info.java │ └── License.java │ ├── link │ └── Link.java │ ├── media │ ├── Content.java │ ├── Discriminator.java │ ├── Encoding.java │ ├── MediaType.java │ ├── Schema.java │ └── XML.java │ ├── operation │ ├── Callback.java │ └── Operation.java │ ├── parameter │ └── Parameter.java │ ├── path │ ├── PathItem.java │ ├── Paths.java │ └── RequestMethod.java │ ├── requestbody │ └── RequestBody.java │ ├── response │ ├── ApiResponse.java │ └── ApiResponses.java │ ├── security │ ├── OAuthFlow.java │ ├── OAuthFlows.java │ ├── Scopes.java │ ├── SecurityRequirement.java │ └── SecurityScheme.java │ ├── server │ ├── Server.java │ ├── ServerVariable.java │ └── ServerVariables.java │ ├── tag │ └── Tag.java │ └── trait │ ├── HasContent.java │ ├── HasCreateInstance.java │ ├── HasExtensions.java │ ├── HasIsEmpty.java │ └── HasReference.java ├── openapi-generator-for-spring-shaded ├── pom.xml └── src │ └── main │ └── java │ └── de │ └── qaware │ └── openapigeneratorforspring │ └── ui │ ├── mustache │ └── MustacheTemplate.java │ └── webjar │ └── ShadedWebJarAssetLocator.java ├── openapi-generator-for-spring-starter ├── javadoc │ └── README.txt └── pom.xml ├── openapi-generator-for-spring-test ├── pom.xml └── src │ └── test │ ├── java │ └── de │ │ └── qaware │ │ └── openapigeneratorforspring │ │ └── test │ │ ├── AbstractOpenApiGeneratorWebCustomPathIntTest.java │ │ ├── AbstractOpenApiGeneratorWebFluxBaseIntTest.java │ │ ├── AbstractOpenApiGeneratorWebFluxIntTest.java │ │ ├── AbstractOpenApiGeneratorWebIntTest.java │ │ ├── AbstractOpenApiGeneratorWebMvcBaseIntTest.java │ │ ├── AbstractOpenApiGeneratorWebMvcIntTest.java │ │ ├── OpenApiDisabledSpringSecurityTestConfiguration.java │ │ ├── OpenApiJsonIntegrationTestUtils.java │ │ ├── app1 │ │ ├── App1.java │ │ └── App1Test.java │ │ ├── app10 │ │ ├── App10.java │ │ ├── App10Configuration.java │ │ ├── App10Controller.java │ │ └── App10Test.java │ │ ├── app11 │ │ ├── App11.java │ │ ├── App11Controller.java │ │ └── App11Test.java │ │ ├── app12 │ │ ├── App12.java │ │ ├── App12Configuration.java │ │ ├── App12Controller.java │ │ └── App12Test.java │ │ ├── app13 │ │ ├── App13.java │ │ ├── App13Controller.java │ │ └── App13Test.java │ │ ├── app14 │ │ ├── App14.java │ │ ├── App14Configuration.java │ │ ├── App14Controller.java │ │ └── App14Test.java │ │ ├── app15 │ │ ├── App15.java │ │ ├── App15Controller.java │ │ └── App15Test.java │ │ ├── app16 │ │ ├── App16.java │ │ ├── App16Configuration.java │ │ ├── App16Controller.java │ │ └── App16Test.java │ │ ├── app17 │ │ ├── App17.java │ │ ├── App17Controller.java │ │ └── App17Test.java │ │ ├── app18 │ │ ├── App18.java │ │ ├── App18Configuration.java │ │ ├── App18Controller.java │ │ └── App18Test.java │ │ ├── app19 │ │ ├── App19.java │ │ └── App19Test.java │ │ ├── app2 │ │ ├── App2.java │ │ ├── App2ControllerWithDeprecatedMethods.java │ │ ├── App2DeprecatedController.java │ │ ├── App2OperationAnnotationController.java │ │ ├── App2SimpleController.java │ │ └── App2Test.java │ │ ├── app20 │ │ ├── App20.java │ │ ├── App20Controller.java │ │ └── App20Test.java │ │ ├── app21 │ │ ├── App21.java │ │ └── App21Test.java │ │ ├── app22 │ │ ├── App22.java │ │ ├── App22Configuration.java │ │ └── App22Test.java │ │ ├── app23 │ │ ├── App23.java │ │ └── App23Test.java │ │ ├── app24 │ │ ├── App24.java │ │ └── App24Test.java │ │ ├── app25 │ │ ├── App25.java │ │ └── App25Test.java │ │ ├── app26 │ │ ├── App26.java │ │ └── App26Test.java │ │ ├── app27 │ │ ├── App27.java │ │ ├── App27RouterFunctions.java │ │ └── App27Test.java │ │ ├── app28 │ │ ├── App28.java │ │ └── App28Test.java │ │ ├── app29 │ │ ├── App29.java │ │ └── App29Test.java │ │ ├── app3 │ │ ├── App3.java │ │ ├── App3Configuration.java │ │ ├── App3ConflictingController1.java │ │ ├── App3ConflictingController2.java │ │ ├── App3ConflictingController3.java │ │ └── App3Test.java │ │ ├── app30 │ │ ├── App30.java │ │ ├── App30Controller.java │ │ └── App30Test.java │ │ ├── app31 │ │ ├── App31.java │ │ ├── App31Controller.java │ │ └── App31Test.java │ │ ├── app32 │ │ ├── App32.java │ │ ├── App32Configuration.java │ │ ├── App32Controller.java │ │ ├── App32Test.java │ │ └── GlobalExceptionHandler.java │ │ ├── app33 │ │ ├── App33.java │ │ ├── App33Configuration.java │ │ ├── App33Controller.java │ │ └── App33Test.java │ │ ├── app34 │ │ ├── App34.java │ │ ├── App34Controller.java │ │ └── App34Test.java │ │ ├── app35 │ │ ├── App35.java │ │ └── App35Test.java │ │ ├── app36 │ │ ├── App36.java │ │ ├── App36Controller.java │ │ └── App36Test.java │ │ ├── app37 │ │ ├── App37.java │ │ └── App37Test.java │ │ ├── app38 │ │ ├── App38.java │ │ ├── App38Controller.java │ │ └── App38Test.java │ │ ├── app39 │ │ ├── App39.java │ │ ├── App39SpringSecurityConfiguration.java │ │ └── App39Test.java │ │ ├── app4 │ │ ├── App4.java │ │ ├── App4BaseBaseController.java │ │ ├── App4BaseController.java │ │ ├── App4Controller.java │ │ ├── App4FullController.java │ │ ├── App4SimpleController.java │ │ └── App4Test.java │ │ ├── app40 │ │ ├── App40.java │ │ ├── App40SpringSecurityConfiguration.java │ │ └── App40Test.java │ │ ├── app41 │ │ ├── App41.java │ │ ├── App41Controller.java │ │ └── App41Test.java │ │ ├── app42 │ │ ├── App42.java │ │ ├── App42Configuration.java │ │ ├── App42Controller.java │ │ ├── App42Test.java │ │ └── MyRequiredAnnotation.java │ │ ├── app43 │ │ ├── App43.java │ │ ├── App43Configuration.java │ │ ├── App43Controller.java │ │ └── App43Test.java │ │ ├── app44 │ │ ├── App44.java │ │ ├── App44Controller.java │ │ ├── App44Test.java │ │ ├── SomeClassInUpperPackage1.java │ │ ├── SomeClassInUpperPackage2.java │ │ ├── package1 │ │ │ ├── Base1.java │ │ │ ├── SomeClass1.java │ │ │ ├── SomeClass2.java │ │ │ └── sub │ │ │ │ ├── SomeClassInSubPackage1.java │ │ │ │ └── SomeClassInSubPackage2.java │ │ └── package2 │ │ │ ├── SomeClass1.java │ │ │ └── SomeClass2.java │ │ ├── app45 │ │ ├── App45.java │ │ ├── App45Controller.java │ │ └── App45Test.java │ │ ├── app46 │ │ ├── App46.java │ │ ├── App46Controller.java │ │ └── App46Test.java │ │ ├── app47 │ │ ├── App47.java │ │ ├── App47Controller.java │ │ └── App47Test.java │ │ ├── app48 │ │ ├── App48.java │ │ ├── App48Controller.java │ │ └── App48Test.java │ │ ├── app49 │ │ ├── App49.java │ │ ├── App49Configuration.java │ │ ├── App49Controller.java │ │ └── App49Test.java │ │ ├── app5 │ │ ├── App5.java │ │ ├── App5Controller.java │ │ └── App5Test.java │ │ ├── app50 │ │ ├── App50.java │ │ ├── App50Configuration.java │ │ ├── App50Controller.java │ │ ├── App50Test.java │ │ └── HeaderDtoConverter.java │ │ ├── app51 │ │ ├── App51.java │ │ ├── App51Controller.java │ │ └── App51Test.java │ │ ├── app52 │ │ ├── App52.java │ │ ├── App52Controller.java │ │ └── App52Test.java │ │ ├── app53 │ │ ├── App53.java │ │ ├── App53Controller.java │ │ ├── App53ControllerImpl.java │ │ └── App53Test.java │ │ ├── app54 │ │ ├── App54.java │ │ ├── App54Controller.java │ │ └── App54Test.java │ │ ├── app6 │ │ ├── App6.java │ │ ├── App6SimpleController.java │ │ └── App6Test.java │ │ ├── app7 │ │ ├── App7.java │ │ ├── App7SimpleController.java │ │ └── App7Test.java │ │ ├── app8 │ │ ├── App8.java │ │ ├── App8Configuration.java │ │ ├── App8SimpleController.java │ │ └── App8Test.java │ │ └── app9 │ │ ├── App9.java │ │ ├── App9Configuration.java │ │ ├── App9Controller.java │ │ └── App9Test.java │ └── resources │ ├── META-INF │ ├── spring.factories │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ ├── application.yml │ ├── logback-spring.xml │ ├── openApiJson │ ├── app1.json │ ├── app10_admin.json │ ├── app10_user.json │ ├── app11.json │ ├── app12.json │ ├── app13.json │ ├── app14.json │ ├── app15.json │ ├── app16.json │ ├── app17.json │ ├── app18_admin.json │ ├── app18_user.json │ ├── app19.json │ ├── app2.json │ ├── app20.json │ ├── app21.json │ ├── app22.json │ ├── app27.json │ ├── app3.json │ ├── app30.json │ ├── app31.json │ ├── app32.json │ ├── app33.json │ ├── app34.json │ ├── app4.json │ ├── app41.json │ ├── app42.json │ ├── app43.json │ ├── app44.json │ ├── app45.json │ ├── app46.json │ ├── app47.json │ ├── app48.json │ ├── app49.json │ ├── app5.json │ ├── app50.json │ ├── app51.json │ ├── app52.json │ ├── app53.json │ ├── app54.json │ ├── app6.json │ ├── app7.json │ ├── app8.json │ └── app9.json │ └── openApiYaml │ ├── app35.yaml │ ├── app36.yaml │ ├── app37.yaml │ └── app38.yaml ├── openapi-generator-for-spring-ui ├── pom.xml └── src │ ├── main │ ├── java │ │ └── de │ │ │ └── qaware │ │ │ └── openapigeneratorforspring │ │ │ ├── autoconfigure │ │ │ ├── OpenApiSwaggerUiAutoConfiguration.java │ │ │ ├── OpenApiSwaggerUiWebFluxAutoConfiguration.java │ │ │ └── OpenApiSwaggerUiWebMvcAutoConfiguration.java │ │ │ └── ui │ │ │ ├── DefaultOpenApiSwaggerUiApiDocsUrisSupplier.java │ │ │ ├── OpenApiSwaggerUiApiDocsUrisSupplier.java │ │ │ ├── OpenApiSwaggerUiConfigurationProperties.java │ │ │ ├── swagger │ │ │ ├── OpenApiSwaggerUiCsrfSupport.java │ │ │ ├── SwaggerUiIndexHtmlWebJarResourceTransformer.java │ │ │ ├── SwaggerUiIndexHtmlWebJarResourceTransformerFactory.java │ │ │ └── SwaggerUiSupport.java │ │ │ ├── webflux │ │ │ ├── OpenApiSwaggerUiCsrfSupportProviderForWebFlux.java │ │ │ └── WebJarResourceTransformerSupportFactoryForWebFlux.java │ │ │ ├── webjar │ │ │ ├── DefaultWebJarTransformedResourceBuilder.java │ │ │ ├── WebJarResourceTransformer.java │ │ │ ├── WebJarResourceTransformerFactory.java │ │ │ ├── WebJarResourceTransformerSupport.java │ │ │ └── WebJarTransformedResourceBuilder.java │ │ │ └── webmvc │ │ │ ├── OpenApiSwaggerUiCsrfSupportProviderForWebMvc.java │ │ │ └── WebJarResourceTransformerSupportFactoryForWebMvc.java │ └── resources │ │ ├── META-INF │ │ ├── spring.factories │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── swagger-ui │ │ └── index.html.mustache │ └── test │ └── java │ └── de │ └── qaware │ └── openapigeneratorforspring │ └── ui │ └── swagger │ └── SwaggerUiIndexHtmlWebJarResourceTransformerTest.java ├── openapi-generator-for-spring-web ├── pom.xml └── src │ ├── main │ ├── java │ │ └── de │ │ │ └── qaware │ │ │ └── openapigeneratorforspring │ │ │ ├── autoconfigure │ │ │ ├── OpenApiGeneratorWebAutoConfiguration.java │ │ │ ├── OpenApiGeneratorWebMethodAutoConfiguration.java │ │ │ └── OpenApiGeneratorWebMethodMergerAutoConfiguration.java │ │ │ └── common │ │ │ ├── operation │ │ │ └── parameter │ │ │ │ ├── DefaultOpenApiSpringWebParameterNameDiscoverer.java │ │ │ │ ├── OpenApiSpringWebParameterNameDiscoverer.java │ │ │ │ └── converter │ │ │ │ ├── DefaultParameterMethodConverterFromMatrixVariableAnnotation.java │ │ │ │ ├── DefaultParameterMethodConverterFromPathVariableAnnotation.java │ │ │ │ ├── DefaultParameterMethodConverterFromRequestHeaderAnnotation.java │ │ │ │ ├── DefaultParameterMethodConverterFromRequestParamAnnotation.java │ │ │ │ └── ParameterMethodConverterFromAnnotation.java │ │ │ ├── paths │ │ │ ├── DefaultSpringWebHandlerMethodBuilder.java │ │ │ ├── SpringWebHandlerMethodBuilder.java │ │ │ ├── SpringWebRequestMethodEnumMapper.java │ │ │ └── method │ │ │ │ ├── AbstractSpringWebHandlerMethod.java │ │ │ │ ├── SpringWebHandlerMethod.java │ │ │ │ ├── SpringWebHandlerMethodContentTypesMapper.java │ │ │ │ ├── SpringWebHandlerMethodMapper.java │ │ │ │ ├── SpringWebHandlerMethodRequestBodyParameterMapper.java │ │ │ │ ├── SpringWebHandlerMethodResponseCodeMapper.java │ │ │ │ ├── SpringWebHandlerMethodReturnTypeMapper.java │ │ │ │ └── merger │ │ │ │ ├── MergedSpringWebHandlerMethod.java │ │ │ │ ├── MergedSpringWebHandlerMethodContext.java │ │ │ │ ├── MergedSpringWebHandlerMethodMapper.java │ │ │ │ ├── SpringWebHandlerMethodIdentifierMerger.java │ │ │ │ ├── SpringWebHandlerMethodMerger.java │ │ │ │ ├── SpringWebHandlerMethodParameterMerger.java │ │ │ │ ├── SpringWebHandlerMethodRequestBodyMerger.java │ │ │ │ ├── SpringWebHandlerMethodResponseMerger.java │ │ │ │ └── SpringWebHandlerMethodTypeMerger.java │ │ │ ├── schema │ │ │ └── resolver │ │ │ │ └── type │ │ │ │ └── extension │ │ │ │ └── spring │ │ │ │ └── SpringWebResponseEntityInitialTypeBuilder.java │ │ │ └── web │ │ │ └── OpenApiResource.java │ └── resources │ │ └── META-INF │ │ ├── spring.factories │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── de │ └── qaware │ └── openapigeneratorforspring │ └── common │ └── paths │ ├── DefaultSpringWebHandlerMethodBuilderTest.java │ └── SpringWebRequestMethodEnumMapperTest.java ├── openapi-generator-for-spring-webflux ├── pom.xml └── src │ └── main │ ├── java │ └── de │ │ └── qaware │ │ └── openapigeneratorforspring │ │ ├── autoconfigure │ │ ├── OpenApiGeneratorWebFluxAutoConfiguration.java │ │ └── OpenApiGeneratorWebFluxRouterFunctionAutoConfiguration.java │ │ ├── common │ │ └── schema │ │ │ └── resolver │ │ │ └── type │ │ │ ├── TypeResolverForFlux.java │ │ │ └── initial │ │ │ └── InitialTypeBuilderForMono.java │ │ └── webflux │ │ ├── HandlerMethodsProviderForWebFlux.java │ │ ├── OpenApiBaseUriSupplierForWebFlux.java │ │ ├── OpenApiRequestAwareProviderForWebFlux.java │ │ ├── OpenApiResourceForWebFlux.java │ │ └── function │ │ ├── NamedHeaderPredicate.java │ │ ├── RouterFunctionAnalysis.java │ │ ├── RouterFunctionHandlerMethod.java │ │ ├── RouterFunctionHandlerMethodMapper.java │ │ ├── RouterFunctionHandlerMethodWithInfoBuilder.java │ │ └── RouterFunctionParameterMethodConverter.java │ └── resources │ └── META-INF │ ├── spring.factories │ └── spring │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── openapi-generator-for-spring-webmvc ├── pom.xml └── src │ ├── main │ ├── java │ │ └── de │ │ │ └── qaware │ │ │ └── openapigeneratorforspring │ │ │ ├── autoconfigure │ │ │ └── OpenApiGeneratorWebMvcAutoConfiguration.java │ │ │ └── webmvc │ │ │ ├── HandlerMethodPathPatternsProviderForWebMvc.java │ │ │ ├── HandlerMethodsProviderForWebMvc.java │ │ │ └── OpenApiRequestAwareSupplierForWebMvc.java │ └── resources │ │ └── META-INF │ │ ├── spring.factories │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── de │ └── qaware │ └── openapigeneratorforspring │ └── webmvc │ └── HandlerMethodPathPatternsProviderForWebMvcTest.java ├── pom.xml └── release.sh /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "maven" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | - package-ecosystem: "maven" 8 | directory: "demo/openapi-generator-for-spring-demo-webmvc" 9 | schedule: 10 | interval: "daily" 11 | - package-ecosystem: "maven" 12 | directory: "demo/openapi-generator-for-spring-demo-webflux" 13 | schedule: 14 | interval: "daily" 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | 12 | ### IntelliJ IDEA ### 13 | .idea 14 | *.iws 15 | *.iml 16 | *.ipr 17 | 18 | ### NetBeans ### 19 | nbproject/private/ 20 | build/ 21 | nbbuild/ 22 | dist/ 23 | nbdist/ 24 | .nb-gradle/ 25 | 26 | 27 | ### Mac ### 28 | .DS_Store -------------------------------------------------------------------------------- /demo/openapi-generator-for-spring-demo-webflux/README.md: -------------------------------------------------------------------------------- 1 | # Open Api Generator for Spring Demo for WebFlux 2 | 3 | Start the Demo application with `mvn spring-boot:run`, 4 | then open http://localhost:8081/swagger-ui 5 | -------------------------------------------------------------------------------- /demo/openapi-generator-for-spring-demo-webflux/src/main/java/de/qaware/openapigeneratorforspring/demo/webflux/DemoWebFluxApplication.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.demo.webflux; 2 | 3 | import io.swagger.v3.oas.annotations.OpenAPIDefinition; 4 | import io.swagger.v3.oas.annotations.info.Info; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | @OpenAPIDefinition(info = @Info( 9 | description = "Demo API", 10 | version = "1.0" 11 | )) 12 | @SpringBootApplication 13 | public class DemoWebFluxApplication { 14 | 15 | public static void main(String[] args) { 16 | SpringApplication.run(DemoWebFluxApplication.class, args); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /demo/openapi-generator-for-spring-demo-webflux/src/main/java/de/qaware/openapigeneratorforspring/demo/webflux/HelloWorldController.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.demo.webflux; 2 | 3 | import io.swagger.v3.oas.annotations.Parameter; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestParam; 8 | import org.springframework.web.bind.annotation.RestController; 9 | import reactor.core.publisher.Mono; 10 | 11 | import static org.springframework.http.MediaType.TEXT_PLAIN_VALUE; 12 | 13 | @RestController 14 | @RequestMapping(path = "hello-world") 15 | @Tag(name = "hello-world") 16 | public class HelloWorldController { 17 | @GetMapping(value = "greeting", produces = TEXT_PLAIN_VALUE) 18 | public Mono getGreeting(@RequestParam(value = "name", required = false) @Parameter(description = "Your name") String name) { 19 | return Mono.justOrEmpty(name) 20 | .switchIfEmpty(Mono.just("unknown friend")) 21 | .map(n -> "Hello from the demo app! Nice to meet you, " + n); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /demo/openapi-generator-for-spring-demo-webflux/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8081 3 | -------------------------------------------------------------------------------- /demo/openapi-generator-for-spring-demo-webmvc/README.md: -------------------------------------------------------------------------------- 1 | # Open Api Generator for Spring Demo for WebMvc 2 | 3 | Start the Demo application with `mvn spring-boot:run`, 4 | then open http://localhost:8080/some-context-path/swagger-ui 5 | -------------------------------------------------------------------------------- /demo/openapi-generator-for-spring-demo-webmvc/src/main/java/de/qaware/openapigeneratorforspring/demo/webmvc/DemoWebMvcApplication.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.demo.webmvc; 2 | 3 | import io.swagger.v3.oas.annotations.OpenAPIDefinition; 4 | import io.swagger.v3.oas.annotations.info.Info; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | @OpenAPIDefinition(info = @Info( 9 | description = "Demo API", 10 | version = "1.0" 11 | )) 12 | @SpringBootApplication 13 | public class DemoWebMvcApplication { 14 | 15 | public static void main(String[] args) { 16 | SpringApplication.run(DemoWebMvcApplication.class, args); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /demo/openapi-generator-for-spring-demo-webmvc/src/main/java/de/qaware/openapigeneratorforspring/demo/webmvc/SpringSecurityConfiguration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.demo.webmvc; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; 7 | import org.springframework.security.web.SecurityFilterChain; 8 | import org.springframework.security.web.csrf.CookieCsrfTokenRepository; 9 | 10 | @Configuration 11 | @EnableWebSecurity 12 | public class SpringSecurityConfiguration { 13 | @Bean 14 | public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { 15 | // do nothing else then configuring CSRF 16 | http 17 | .csrf() 18 | // it doesn't really matter which CSRF token repository is used 19 | .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()); 20 | return http.build(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo/openapi-generator-for-spring-demo-webmvc/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.servlet.context-path=/some-context-path 2 | -------------------------------------------------------------------------------- /lombok.config: -------------------------------------------------------------------------------- 1 | config.stopBubbling = true 2 | 3 | # use the same as anywhere else 4 | lombok.log.fieldName = LOGGER 5 | 6 | # make sonar happy 7 | lombok.addLombokGeneratedAnnotation = true -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/annotation/HasAnnotationsSupplier.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.annotation; 22 | 23 | /** 24 | * Trait for things having an {@link AnnotationsSupplier}. 25 | * See also {@link AnnotationsSupplier#merge}. 26 | */ 27 | public interface HasAnnotationsSupplier { 28 | AnnotationsSupplier getAnnotationsSupplier(); 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/info/OpenApiInfoSupplier.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.info; 22 | 23 | 24 | import de.qaware.openapigeneratorforspring.model.info.Info; 25 | 26 | import java.util.function.Supplier; 27 | 28 | /** 29 | * Supplier for Open Api {@link Info}. Can be provided as a bean. 30 | */ 31 | public interface OpenApiInfoSupplier extends Supplier { 32 | } 33 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/info/OpenApiVersionSupplier.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.info; 22 | 23 | import java.util.function.Supplier; 24 | 25 | /** 26 | * Supplier for the Open Api model version. Can be provided as a bean. 27 | */ 28 | public interface OpenApiVersionSupplier extends Supplier { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/CallbackAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.operation.Callback; 24 | 25 | @FunctionalInterface 26 | public interface CallbackAnnotationMapper { 27 | Callback map(io.swagger.v3.oas.annotations.callbacks.Callback callbackAnnotation, MapperContext mapperContext); 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/ContactAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | 24 | import de.qaware.openapigeneratorforspring.model.info.Contact; 25 | 26 | @FunctionalInterface 27 | public interface ContactAnnotationMapper { 28 | Contact map(io.swagger.v3.oas.annotations.info.Contact contactAnnotation); 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/EncodingAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.media.Encoding; 24 | 25 | import java.util.Map; 26 | 27 | public interface EncodingAnnotationMapper { 28 | Map mapArray(io.swagger.v3.oas.annotations.media.Encoding[] encodingAnnotations, MapperContext mapperContext); 29 | 30 | Encoding map(io.swagger.v3.oas.annotations.media.Encoding encodingAnnotation, MapperContext mapperContext); 31 | } 32 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/ExampleObjectAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.example.Example; 24 | import io.swagger.v3.oas.annotations.media.ExampleObject; 25 | 26 | import java.util.Map; 27 | 28 | public interface ExampleObjectAnnotationMapper { 29 | Map mapArray(ExampleObject[] exampleObjectAnnotations); 30 | 31 | Example map(ExampleObject exampleObjectAnnotation); 32 | } 33 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/ExtensionAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import java.util.Map; 24 | 25 | @FunctionalInterface 26 | public interface ExtensionAnnotationMapper { 27 | Map mapArray(io.swagger.v3.oas.annotations.extensions.Extension[] extensionAnnotations); 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/ExternalDocumentationAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | 24 | import de.qaware.openapigeneratorforspring.model.ExternalDocumentation; 25 | 26 | @FunctionalInterface 27 | public interface ExternalDocumentationAnnotationMapper { 28 | ExternalDocumentation map(io.swagger.v3.oas.annotations.ExternalDocumentation externalDocumentationAnnotation); 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/HeaderAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.header.Header; 24 | 25 | import java.util.Map; 26 | 27 | public interface HeaderAnnotationMapper { 28 | Map mapArray(io.swagger.v3.oas.annotations.headers.Header[] headerAnnotations, MapperContext mapperContext); 29 | 30 | Header map(io.swagger.v3.oas.annotations.headers.Header headerAnnotation, MapperContext mapperContext); 31 | } 32 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/InfoAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | 24 | import de.qaware.openapigeneratorforspring.model.info.Info; 25 | 26 | @FunctionalInterface 27 | public interface InfoAnnotationMapper { 28 | Info map(io.swagger.v3.oas.annotations.info.Info infoAnnotation); 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/LicenseAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.info.License; 24 | 25 | @FunctionalInterface 26 | public interface LicenseAnnotationMapper { 27 | License map(io.swagger.v3.oas.annotations.info.License licenseAnnotation); 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/LinkAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.link.Link; 24 | 25 | import java.util.Map; 26 | 27 | public interface LinkAnnotationMapper { 28 | Map mapArray(io.swagger.v3.oas.annotations.links.Link[] linkAnnotations); 29 | 30 | Link map(io.swagger.v3.oas.annotations.links.Link linkAnnotation); 31 | } 32 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/LinkParameterAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import java.util.Map; 24 | 25 | public interface LinkParameterAnnotationMapper { 26 | Map mapArray(io.swagger.v3.oas.annotations.links.LinkParameter[] linkParameterAnnotations); 27 | 28 | String map(io.swagger.v3.oas.annotations.links.LinkParameter linkAnnotation); 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/MediaTypesProvider.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.trait.HasContent; 24 | 25 | import java.util.Set; 26 | 27 | /** 28 | * Helper interface for {@link MapperContext} in 29 | * conjunction with {@link ContentAnnotationMapper}. 30 | */ 31 | @FunctionalInterface 32 | public interface MediaTypesProvider { 33 | 34 | Set getMediaTypes(Class owningType); 35 | } 36 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/OAuthFlowAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.security.OAuthFlow; 24 | 25 | @FunctionalInterface 26 | public interface OAuthFlowAnnotationMapper { 27 | OAuthFlow map(io.swagger.v3.oas.annotations.security.OAuthFlow oAuthFlowsAnnotation); 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/OAuthFlowsAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.security.OAuthFlows; 24 | 25 | @FunctionalInterface 26 | public interface OAuthFlowsAnnotationMapper { 27 | OAuthFlows map(io.swagger.v3.oas.annotations.security.OAuthFlows oAuthFlowsAnnotation); 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/OperationAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.operation.Operation; 24 | 25 | public interface OperationAnnotationMapper { 26 | Operation buildFromAnnotation(io.swagger.v3.oas.annotations.Operation operationAnnotation, MapperContext mapperContext); 27 | 28 | void applyFromAnnotation(Operation operation, io.swagger.v3.oas.annotations.Operation operationAnnotation, MapperContext mapperContext); 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/ParameterAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.parameter.Parameter; 24 | 25 | public interface ParameterAnnotationMapper { 26 | Parameter buildFromAnnotation(io.swagger.v3.oas.annotations.Parameter parameterAnnotation, MapperContext mapperContext); 27 | 28 | void applyFromAnnotation(Parameter parameter, io.swagger.v3.oas.annotations.Parameter parameterAnnotation, MapperContext mapperContext); 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/ParsableValueMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | @FunctionalInterface 24 | public interface ParsableValueMapper { 25 | Object parse(String value); 26 | } 27 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/SecurityRequirementAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.security.SecurityRequirement; 24 | 25 | 26 | @FunctionalInterface 27 | public interface SecurityRequirementAnnotationMapper { 28 | SecurityRequirement mapArray(io.swagger.v3.oas.annotations.security.SecurityRequirement... securityRequirementAnnotations); 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/SecuritySchemeAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.security.SecurityScheme; 24 | 25 | @FunctionalInterface 26 | public interface SecuritySchemeAnnotationMapper { 27 | SecurityScheme map(io.swagger.v3.oas.annotations.security.SecurityScheme securitySchemeAnnotation); 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/ServerAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.server.Server; 24 | 25 | import java.util.List; 26 | 27 | public interface ServerAnnotationMapper { 28 | List mapArray(io.swagger.v3.oas.annotations.servers.Server[] serversAnnotations); 29 | 30 | Server map(io.swagger.v3.oas.annotations.servers.Server serverAnnotation); 31 | } 32 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/mapper/TagAnnotationMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.mapper; 22 | 23 | import de.qaware.openapigeneratorforspring.model.tag.Tag; 24 | 25 | @FunctionalInterface 26 | public interface TagAnnotationMapper { 27 | Tag map(io.swagger.v3.oas.annotations.tags.Tag tagAnnotation); 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/operation/OperationWithInfo.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.operation; 22 | 23 | import de.qaware.openapigeneratorforspring.model.operation.Operation; 24 | import lombok.Value; 25 | 26 | /** 27 | * {@link Operation} with {@link OperationInfo info}. 28 | */ 29 | @Value(staticConstructor = "of") 30 | public class OperationWithInfo { 31 | Operation operation; 32 | OperationInfo info; 33 | } 34 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/paths/HandlerMethodWithInfo.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.paths; 22 | 23 | import de.qaware.openapigeneratorforspring.model.path.RequestMethod; 24 | import lombok.Value; 25 | 26 | import java.util.Set; 27 | 28 | /** 29 | * Container for handler method with info. 30 | * Used by {@link HandlerMethodsProvider}. 31 | */ 32 | @Value 33 | public class HandlerMethodWithInfo { 34 | HandlerMethod handlerMethod; 35 | Set pathPatterns; 36 | Set requestMethods; 37 | } 38 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/ReferencedItemConsumer.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference; 22 | 23 | /** 24 | * Marker interface for {@link ReferencedItemConsumerSupplier} 25 | * and {@link HasReferencedItemConsumer}. Only extensions of this 26 | * interface are used for obtaining a referenced item consumer. 27 | */ 28 | public interface ReferencedItemConsumer { 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/callback/ReferenceDeciderForCallback.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.callback; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceDeciderForType; 24 | import de.qaware.openapigeneratorforspring.model.operation.Callback; 25 | 26 | /** 27 | * @see ReferenceDeciderForType 28 | */ 29 | public interface ReferenceDeciderForCallback extends ReferenceDeciderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/callback/ReferenceIdentifierBuilderForCallback.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.callback; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceIdentifierBuilderForType; 24 | import de.qaware.openapigeneratorforspring.model.operation.Callback; 25 | 26 | /** 27 | * @see ReferenceIdentifierBuilderForType 28 | */ 29 | public interface ReferenceIdentifierBuilderForCallback extends ReferenceIdentifierBuilderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/example/ReferenceDeciderForExample.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.example; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceDeciderForType; 24 | import de.qaware.openapigeneratorforspring.model.example.Example; 25 | 26 | /** 27 | * @see ReferenceDeciderForType 28 | */ 29 | public interface ReferenceDeciderForExample extends ReferenceDeciderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/example/ReferenceIdentifierBuilderForExample.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.example; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceIdentifierBuilderForType; 24 | import de.qaware.openapigeneratorforspring.model.example.Example; 25 | 26 | /** 27 | * @see ReferenceIdentifierBuilderForType 28 | */ 29 | public interface ReferenceIdentifierBuilderForExample extends ReferenceIdentifierBuilderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/header/ReferenceDeciderForHeader.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.header; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceDeciderForType; 24 | import de.qaware.openapigeneratorforspring.model.header.Header; 25 | 26 | /** 27 | * @see ReferenceDeciderForType 28 | */ 29 | public interface ReferenceDeciderForHeader extends ReferenceDeciderForType
{ 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/header/ReferenceIdentifierBuilderForHeader.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.header; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceIdentifierBuilderForType; 24 | import de.qaware.openapigeneratorforspring.model.header.Header; 25 | 26 | /** 27 | * @see ReferenceIdentifierBuilderForType 28 | */ 29 | public interface ReferenceIdentifierBuilderForHeader extends ReferenceIdentifierBuilderForType
{ 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/link/ReferenceDeciderForLink.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.link; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceDeciderForType; 24 | import de.qaware.openapigeneratorforspring.model.link.Link; 25 | 26 | /** 27 | * @see ReferenceDeciderForType 28 | */ 29 | public interface ReferenceDeciderForLink extends ReferenceDeciderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/link/ReferenceIdentifierBuilderForLink.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.link; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceIdentifierBuilderForType; 24 | import de.qaware.openapigeneratorforspring.model.link.Link; 25 | 26 | /** 27 | * @see ReferenceIdentifierBuilderForType 28 | */ 29 | public interface ReferenceIdentifierBuilderForLink extends ReferenceIdentifierBuilderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/parameter/ReferenceDeciderForParameter.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.parameter; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceDeciderForType; 24 | import de.qaware.openapigeneratorforspring.model.parameter.Parameter; 25 | 26 | /** 27 | * @see ReferenceDeciderForType 28 | */ 29 | public interface ReferenceDeciderForParameter extends ReferenceDeciderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/parameter/ReferenceIdentifierBuilderForParameter.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.parameter; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceIdentifierBuilderForType; 24 | import de.qaware.openapigeneratorforspring.model.parameter.Parameter; 25 | 26 | /** 27 | * @see ReferenceIdentifierBuilderForType 28 | */ 29 | public interface ReferenceIdentifierBuilderForParameter extends ReferenceIdentifierBuilderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/requestbody/ReferenceDeciderForRequestBody.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.requestbody; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceDeciderForType; 24 | import de.qaware.openapigeneratorforspring.model.requestbody.RequestBody; 25 | 26 | /** 27 | * @see ReferenceDeciderForType 28 | */ 29 | public interface ReferenceDeciderForRequestBody extends ReferenceDeciderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/response/ReferenceDeciderForApiResponse.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.response; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceDeciderForType; 24 | import de.qaware.openapigeneratorforspring.model.response.ApiResponse; 25 | 26 | /** 27 | * @see ReferenceDeciderForType 28 | */ 29 | public interface ReferenceDeciderForApiResponse extends ReferenceDeciderForType { 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/schema/ReferenceDeciderForSchema.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.schema; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceDeciderForType; 24 | import de.qaware.openapigeneratorforspring.model.media.Schema; 25 | 26 | /** 27 | * @see ReferenceDeciderForType 28 | */ 29 | public interface ReferenceDeciderForSchema extends ReferenceDeciderForType { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/reference/component/schema/ReferenceIdentifierBuilderForSchema.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.component.schema; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.fortype.ReferenceIdentifierBuilderForType; 24 | import de.qaware.openapigeneratorforspring.model.media.Schema; 25 | 26 | /** 27 | * @see ReferenceIdentifierBuilderForType 28 | */ 29 | public interface ReferenceIdentifierBuilderForSchema extends ReferenceIdentifierBuilderForType { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/security/OpenApiSecuritySchemesSupplier.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.security; 22 | 23 | import de.qaware.openapigeneratorforspring.model.security.SecurityScheme; 24 | 25 | import java.util.Map; 26 | import java.util.function.Supplier; 27 | 28 | /** 29 | * Supplier for additional {@link SecurityScheme security 30 | * schemes}. They are added to the Open Api model. 31 | */ 32 | public interface OpenApiSecuritySchemesSupplier extends Supplier> { 33 | } 34 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/supplier/OpenApiServersSupplier.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.supplier; 22 | 23 | import de.qaware.openapigeneratorforspring.model.server.Server; 24 | 25 | import java.util.List; 26 | import java.util.function.Supplier; 27 | 28 | /** 29 | * Supplier for list of servers for the Open Api model. 30 | */ 31 | public interface OpenApiServersSupplier extends Supplier> { 32 | } 33 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-api/src/main/java/de/qaware/openapigeneratorforspring/common/supplier/OpenApiYamlMapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: API 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.supplier; 22 | 23 | import com.fasterxml.jackson.core.JsonProcessingException; 24 | import de.qaware.openapigeneratorforspring.model.OpenApi; 25 | 26 | 27 | @FunctionalInterface 28 | public interface OpenApiYamlMapper { 29 | String map(OpenApi openApi) throws JsonProcessingException; 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiGeneratorAutoConfiguration 3 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiGeneratorAutoConfiguration 2 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/filter/pathitem/NoOperationsPathItemFilter.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.filter.pathitem; 22 | 23 | import de.qaware.openapigeneratorforspring.model.path.PathItem; 24 | 25 | public class NoOperationsPathItemFilter implements PathItemFilter { 26 | @Override 27 | public boolean accept(PathItem pathItem, String pathPattern) { 28 | return !pathItem.getOperations().isEmpty(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/info/DefaultOpenApiVersionSupplier.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.info; 22 | 23 | public class DefaultOpenApiVersionSupplier implements OpenApiVersionSupplier { 24 | @Override 25 | public String get() { 26 | return "unknown"; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/operation/OperationBuilderException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.operation; 22 | 23 | public class OperationBuilderException extends RuntimeException { 24 | public OperationBuilderException(String message, Throwable cause) { 25 | super(message, cause); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/operation/id/DefaultOperationIdProvider.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.operation.id; 22 | 23 | import de.qaware.openapigeneratorforspring.common.operation.OperationInfo; 24 | 25 | public class DefaultOperationIdProvider implements OperationIdProvider { 26 | @Override 27 | public String getOperationId(OperationInfo operationInfo) { 28 | return operationInfo.getHandlerMethod().getIdentifier(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/operation/response/DefaultApiResponseDefaultProvider.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.operation.response; 22 | 23 | import de.qaware.openapigeneratorforspring.model.response.ApiResponse; 24 | 25 | public class DefaultApiResponseDefaultProvider implements ApiResponseDefaultProvider { 26 | 27 | @Override 28 | public ApiResponse build(String responseCode) { 29 | return new ApiResponse(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/reference/ReferencedItemSupport.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference; 22 | 23 | import de.qaware.openapigeneratorforspring.model.OpenApi; 24 | 25 | public interface ReferencedItemSupport { 26 | ReferencedItemConsumerSupplier getReferencedItemConsumerSupplier(); 27 | 28 | void applyToOpenApi(OpenApi openApi); 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/reference/fortype/DefaultReferenceDeciderFactory.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.fortype; 22 | 23 | import java.util.function.Function; 24 | 25 | public class DefaultReferenceDeciderFactory { 26 | public > R create(Function, R> mapper) { 27 | return mapper.apply((item, referenceIdentifier, numberOfUsages) -> numberOfUsages > 1); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/reference/fortype/DefaultReferenceIdentifierBuilderFactory.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.fortype; 22 | 23 | import java.util.function.Function; 24 | 25 | public class DefaultReferenceIdentifierBuilderFactory { 26 | public > R create(Function, R> mapper) { 27 | return mapper.apply((item, suggestedIdentifier, numberOfUsages) -> suggestedIdentifier); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/reference/handler/AbstractDependentReferencedComponentHandler.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.handler; 22 | 23 | import de.qaware.openapigeneratorforspring.common.reference.ReferenceType; 24 | import org.apache.commons.lang3.tuple.Pair; 25 | 26 | import java.util.List; 27 | 28 | public abstract class AbstractDependentReferencedComponentHandler extends AbstractReferencedComponentHandler { 29 | public abstract Pair> getBuildDependencies(); 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/reference/handler/ReferencedItemHandler.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.handler; 22 | 23 | 24 | import de.qaware.openapigeneratorforspring.model.OpenApi; 25 | 26 | import javax.annotation.Nullable; 27 | 28 | public interface ReferencedItemHandler { 29 | void applyToOpenApi(OpenApi openApi); 30 | 31 | default ReferencedItemHandler withOwner(@Nullable Object object) { 32 | return this; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/reference/handler/ReferencedItemHandlerFactory.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.reference.handler; 22 | 23 | public interface ReferencedItemHandlerFactory { 24 | ReferencedItemHandler create(); 25 | } 26 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/java/de/qaware/openapigeneratorforspring/common/util/OpenApiConstants.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Common 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.util; 22 | 23 | import lombok.AccessLevel; 24 | import lombok.NoArgsConstructor; 25 | 26 | @NoArgsConstructor(access = AccessLevel.PRIVATE) 27 | public class OpenApiConstants { 28 | public static final String CONFIG_PROPERTIES_PREFIX = "openapi-generator-for-spring"; 29 | } 30 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-common/src/main/resources/META-INF/additional-spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "openapi-generator-for-spring.schema.type.java8.time", 5 | "defaultValue": "ISO8601" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | openapi-generator-for-spring-model 7 | OpenAPI Generator for Spring Boot :: Model 8 | 9 | 10 | openapi-generator-for-spring-parent 11 | de.qaware.tools.openapi-generator-for-spring 12 | 6.0.1-SNAPSHOT 13 | 14 | 15 | 16 | 17 | com.fasterxml.jackson.core 18 | jackson-annotations 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/media/Content.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.media; 22 | 23 | import java.util.LinkedHashMap; 24 | 25 | /** 26 | * Content 27 | * 28 | * @see "https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/versions/3.0.1.md#contentObject" 29 | */ 30 | 31 | public class Content extends LinkedHashMap { 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/media/Discriminator.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.media; 22 | 23 | import lombok.Builder; 24 | import lombok.Data; 25 | 26 | import java.util.Map; 27 | 28 | @Data 29 | @Builder 30 | public class Discriminator { 31 | private String propertyName; 32 | private Map mapping; 33 | } 34 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/path/Paths.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.path; 22 | 23 | import java.util.LinkedHashMap; 24 | 25 | /** 26 | * Paths 27 | * 28 | * @see "https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/versions/3.0.1.md#pathsObject" 29 | */ 30 | 31 | public class Paths extends LinkedHashMap { 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/path/RequestMethod.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.path; 22 | 23 | public enum RequestMethod { 24 | GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE 25 | } 26 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/response/ApiResponses.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.response; 22 | 23 | import java.util.LinkedHashMap; 24 | 25 | /** 26 | * ApiResponses 27 | * 28 | * @see "https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/versions/3.0.1.md#responsesObject" 29 | */ 30 | public class ApiResponses extends LinkedHashMap { 31 | } 32 | 33 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/security/Scopes.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.security; 22 | 23 | import java.util.LinkedHashMap; 24 | 25 | /** 26 | * Scopes 27 | * 28 | * @see "https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/versions/3.0.1.md#scopedObject" 29 | */ 30 | public class Scopes extends LinkedHashMap { 31 | } 32 | 33 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/server/ServerVariables.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.server; 22 | 23 | import java.util.LinkedHashMap; 24 | 25 | /** 26 | * ServerVariables 27 | * 28 | * @see "https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/versions/3.0.1.md#serverVariablesObject" 29 | */ 30 | public class ServerVariables extends LinkedHashMap { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/trait/HasContent.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.trait; 22 | 23 | import de.qaware.openapigeneratorforspring.model.media.Content; 24 | 25 | // Content refers to 26 | public interface HasContent { 27 | Content getContent(); 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/trait/HasCreateInstance.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.trait; 22 | 23 | public interface HasCreateInstance { 24 | T createInstance(); 25 | } 26 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/trait/HasExtensions.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.trait; 22 | 23 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 24 | 25 | import java.util.Map; 26 | 27 | public interface HasExtensions { 28 | @JsonAnyGetter 29 | Map getExtensions(); 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-model/src/main/java/de/qaware/openapigeneratorforspring/model/trait/HasIsEmpty.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Model 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.model.trait; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | 25 | public interface HasIsEmpty extends HasCreateInstance { 26 | @JsonIgnore 27 | default boolean isEmpty() { 28 | return createInstance().equals(this); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-starter/javadoc/README.txt: -------------------------------------------------------------------------------- 1 | This module is a Spring Boot starter, it just depends on useful 2 | modules so that a user needs only the starter to get started. -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/AbstractOpenApiGeneratorWebFluxIntTest.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test; 2 | 3 | 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static de.qaware.openapigeneratorforspring.test.OpenApiJsonIntegrationTestUtils.findResourceFilenameFromTestClass; 7 | 8 | public abstract class AbstractOpenApiGeneratorWebFluxIntTest extends AbstractOpenApiGeneratorWebFluxBaseIntTest { 9 | 10 | private final String expectedJsonFile = findResourceFilenameFromTestClass(getClass(), ".json"); 11 | 12 | @Test 13 | public void getOpenApiAsJson() throws Exception { 14 | assertResponseBodyMatchesOpenApiJson(expectedJsonFile, performApiDocsRequest(x -> x, x -> x)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/AbstractOpenApiGeneratorWebMvcIntTest.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test; 2 | 3 | 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static de.qaware.openapigeneratorforspring.test.OpenApiJsonIntegrationTestUtils.findResourceFilenameFromTestClass; 7 | 8 | public abstract class AbstractOpenApiGeneratorWebMvcIntTest extends AbstractOpenApiGeneratorWebMvcBaseIntTest { 9 | 10 | private final String expectedJsonFile = findResourceFilenameFromTestClass(getClass(), ".json"); 11 | 12 | @Test 13 | public void getOpenApiAsJson() throws Exception { 14 | assertResponseBodyMatchesOpenApiJson(expectedJsonFile, performApiDocsRequest(x -> x)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app1/App1.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app1; 2 | 3 | import io.swagger.v3.oas.annotations.OpenAPIDefinition; 4 | import io.swagger.v3.oas.annotations.info.Info; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | @SpringBootApplication 9 | @OpenAPIDefinition( 10 | info = @Info(title = "My own title") 11 | ) 12 | class App1 { 13 | public static void main(String[] args) { 14 | SpringApplication.run(App1.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app1/App1Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app1; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App1Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app10/App10.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app10; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App10 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App10.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app10/App10Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app10; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | class App10Controller { 8 | @GetMapping("admin/mapping-1") 9 | public void adminMapping1() { 10 | 11 | } 12 | 13 | @GetMapping("user/mapping-1") 14 | public void userMapping1() { 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app10/App10Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app10; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcBaseIntTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static de.qaware.openapigeneratorforspring.test.OpenApiJsonIntegrationTestUtils.findResourceFilenameFromTestClass; 7 | 8 | class App10Test extends AbstractOpenApiGeneratorWebMvcBaseIntTest { 9 | 10 | @Test 11 | void testWithQueryParam() throws Exception { 12 | assertResponseBodyMatchesOpenApiJson(findResourceFilenameFromTestClass(getClass(), "_admin.json"), 13 | performApiDocsRequest(x -> x.queryParam("pathPrefix", "/admin")) 14 | ); 15 | } 16 | 17 | @Test 18 | void testWithHeaderParam() throws Exception { 19 | assertResponseBodyMatchesOpenApiJson(findResourceFilenameFromTestClass(getClass(), "_user.json"), 20 | performApiDocsRequest(x -> x.header("X-Path-Prefix", "/user")) 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app11/App11.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app11; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App11 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App11.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app11/App11Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app11; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App11Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app12/App12.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app12; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App12 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App12.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app12/App12Configuration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app12; 2 | 3 | import de.qaware.openapigeneratorforspring.common.filter.operation.parameter.OperationParameterPostFilter; 4 | import de.qaware.openapigeneratorforspring.common.filter.operation.parameter.OperationParameterPreFilter; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.web.bind.annotation.RequestHeader; 8 | 9 | import java.util.Objects; 10 | 11 | @Configuration 12 | class App12Configuration { 13 | 14 | public static final String X_FILTERED_HEADER_NAME = "X-Filtered-Header-Name"; 15 | 16 | @Bean 17 | public OperationParameterPreFilter ignoreSpecificHeaderParameterFilter() { 18 | return methodParameter -> methodParameter.getAnnotationsSupplier().findAnnotations(RequestHeader.class) 19 | .findFirst() 20 | .map(annotation -> !annotation.value().equals(X_FILTERED_HEADER_NAME)) 21 | .orElse(true); 22 | } 23 | 24 | @Bean 25 | public OperationParameterPostFilter ignoredSpecificParameterName() { 26 | return parameter -> !Objects.equals(parameter.getName(), "filteredParameterName"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app12/App12Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app12; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RequestHeader; 5 | import org.springframework.web.bind.annotation.RequestParam; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | import static de.qaware.openapigeneratorforspring.test.app12.App12Configuration.X_FILTERED_HEADER_NAME; 9 | 10 | @RestController 11 | class App12Controller { 12 | 13 | @GetMapping("mapping-1") 14 | public void mapping1( 15 | @RequestParam String param1, 16 | @RequestHeader(X_FILTERED_HEADER_NAME) String param2, 17 | @RequestHeader("X-Other-Header-Name") String param3, 18 | @RequestParam String filteredParameterName 19 | ) { 20 | 21 | } 22 | 23 | @GetMapping("mapping-2") 24 | public void mapping2( 25 | @RequestParam String filteredParameterName, 26 | @RequestHeader("filteredParameterName") String param3 27 | ) { 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app12/App12Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app12; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App12Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app13/App13.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app13; 2 | 3 | import io.swagger.v3.oas.annotations.OpenAPIDefinition; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | @SpringBootApplication 9 | @OpenAPIDefinition( 10 | tags = @Tag(name = "tag-10") 11 | ) 12 | class App13 { 13 | public static void main(String[] args) { 14 | SpringApplication.run(App13.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app13/App13Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app13; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | import io.swagger.v3.oas.annotations.tags.Tags; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | @RestController 10 | @Tag(name = "tag-3") 11 | @Tag(name = "tag-8") 12 | @Tag(name = "tag-5", description = "some description 5") 13 | class App13Controller { 14 | 15 | @GetMapping("mapping-1") 16 | @Tag(name = "tag-4") 17 | @Tag(name = "tag-8", description = "some description 8") 18 | public void mapping1() { 19 | 20 | } 21 | 22 | @GetMapping("mapping-2") 23 | @Operation(tags = {"tag-1", "tag-3"}) 24 | @Tags({ 25 | @Tag(name = "tag-6"), 26 | @Tag(name = "tag-7") 27 | }) 28 | public void mapping2() { 29 | 30 | } 31 | 32 | @GetMapping("mapping-3") 33 | @Tag(name = "tag-5") 34 | @Operation(tags = {"tag-1", "tag-2"}) 35 | public void mapping3() { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app13/App13Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app13; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App13Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app14/App14.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app14; 2 | 3 | import io.swagger.v3.oas.annotations.OpenAPIDefinition; 4 | import io.swagger.v3.oas.annotations.info.Info; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | @SpringBootApplication 9 | @OpenAPIDefinition(info = @Info( 10 | title = "Callback example", 11 | version = "1.0.0" 12 | )) 13 | class App14 { 14 | public static void main(String[] args) { 15 | SpringApplication.run(App14.class, args); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app14/App14Configuration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app14; 2 | 3 | import de.qaware.openapigeneratorforspring.common.reference.component.schema.ReferenceDeciderForSchema; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | @Configuration 8 | class App14Configuration { 9 | @Bean 10 | public ReferenceDeciderForSchema referenceDeciderForSchema() { 11 | return (schema, referenceIdentifier, numberOfUsages) -> false; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app14/App14Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app14; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App14Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app15/App15.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app15; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App15 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App15.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app15/App15Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app15; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App15Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app16/App16Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app16; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App16Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app17/App17.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app17; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App17 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App17.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app17/App17Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app17; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App17Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app18/App18.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app18; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App18 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App18.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app18/App18Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app18; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | class App18Controller { 8 | @GetMapping("admin/mapping-1") 9 | public void adminMapping1() { 10 | 11 | } 12 | 13 | @GetMapping("user/mapping-1") 14 | public void userMapping1() { 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app18/App18Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app18; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebFluxBaseIntTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static de.qaware.openapigeneratorforspring.test.OpenApiJsonIntegrationTestUtils.findResourceFilenameFromTestClass; 7 | 8 | class App18Test extends AbstractOpenApiGeneratorWebFluxBaseIntTest { 9 | 10 | @Test 11 | void testWithQueryParam() throws Exception { 12 | assertResponseBodyMatchesOpenApiJson(findResourceFilenameFromTestClass(getClass(), "_admin.json"), 13 | performApiDocsRequest(x -> x.queryParam("pathPrefix", "/admin"), x -> x) 14 | ); 15 | } 16 | 17 | @Test 18 | void testWithHeaderParam() throws Exception { 19 | assertResponseBodyMatchesOpenApiJson(findResourceFilenameFromTestClass(getClass(), "_user.json"), 20 | performApiDocsRequest(x -> x, x -> x.header("X-Path-Prefix", "/user")) 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app19/App19.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app19; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App19 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App19.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app19/App19Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app19; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebFluxIntTest; 4 | 5 | class App19Test extends AbstractOpenApiGeneratorWebFluxIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app2/App2.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app2; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App2 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App2.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app2/App2ControllerWithDeprecatedMethods.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app2; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.PostMapping; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | @RestController 10 | @RequestMapping(path = "deprecated-methods") 11 | class App2ControllerWithDeprecatedMethods { 12 | 13 | @GetMapping("get-mapping") 14 | @Deprecated 15 | public String deprecatedGetMapping() { 16 | return null; 17 | } 18 | 19 | @PostMapping("post-mapping") 20 | @Operation(deprecated = true) 21 | public void deprecatedPostMapping() { 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app2/App2DeprecatedController.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app2; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.PostMapping; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | @RestController 9 | @RequestMapping(path = "all-deprecated") 10 | @Deprecated 11 | class App2DeprecatedController { 12 | 13 | @GetMapping("get-mapping") 14 | public String allDeprecatedGetMapping() { 15 | return null; 16 | } 17 | 18 | @PostMapping("post-mapping") 19 | public void allDeprecatedPostMapping() { 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app2/App2SimpleController.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app2; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.DeleteMapping; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.PostMapping; 7 | import org.springframework.web.bind.annotation.PutMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.ResponseStatus; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | @RestController 13 | @RequestMapping(path = "simple") 14 | class App2SimpleController { 15 | 16 | @GetMapping("get-mapping") 17 | public String getMappingReturnString() { 18 | return null; 19 | } 20 | 21 | @PostMapping("post-mapping") 22 | @ResponseStatus(HttpStatus.CREATED) 23 | public void postMapping() { 24 | } 25 | 26 | @PutMapping("put-mapping") 27 | public void putMapping() { 28 | } 29 | 30 | @DeleteMapping("delete-mapping") 31 | @ResponseStatus(HttpStatus.NO_CONTENT) 32 | public void deleteMapping() { 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app2/App2Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app2; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App2Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app20/App20.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app20; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App20 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App20.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app20/App20Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app20; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebFluxIntTest; 4 | 5 | class App20Test extends AbstractOpenApiGeneratorWebFluxIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app21/App21.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app21; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App21 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App21.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app21/App21Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app21; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebCustomPathIntTest; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.test.context.TestPropertySource; 6 | 7 | import static de.qaware.openapigeneratorforspring.test.OpenApiJsonIntegrationTestUtils.assertMatchesOpenApiJson; 8 | 9 | 10 | @TestPropertySource(properties = "server.servlet.context-path=/my-context-path") 11 | class App21Test extends AbstractOpenApiGeneratorWebCustomPathIntTest { 12 | @Test 13 | void testWithCustomApiDocsPath() throws Exception { 14 | assertMatchesOpenApiJson("app21.json", () -> 15 | getResponseBody(PATH_TO_API_DOCS).replace(buildHost(), "http://localhost/my-context-path") 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app22/App22.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app22; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App22 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App22.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app22/App22Configuration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app22; 2 | 3 | import de.qaware.openapigeneratorforspring.common.supplier.OpenApiBaseUriSupplier; 4 | import de.qaware.openapigeneratorforspring.common.supplier.OpenApiServersSupplier; 5 | import de.qaware.openapigeneratorforspring.model.server.Server; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | import java.util.Collections; 10 | 11 | @Configuration 12 | class App22Configuration { 13 | @Bean 14 | public OpenApiServersSupplier openApiDefaultServersSupplier(OpenApiBaseUriSupplier openApiBaseUriSupplier) { 15 | return () -> Collections.singletonList(Server.builder() 16 | .description("Default Server for WebFlux Test") 17 | .url(openApiBaseUriSupplier.getBaseUri().toString()) 18 | .build() 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app22/App22Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app22; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebCustomPathIntTest; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.test.context.TestPropertySource; 6 | 7 | import static de.qaware.openapigeneratorforspring.test.OpenApiJsonIntegrationTestUtils.assertMatchesOpenApiJson; 8 | 9 | @TestPropertySource(properties = "spring.main.web-application-type = REACTIVE") 10 | class App22Test extends AbstractOpenApiGeneratorWebCustomPathIntTest { 11 | @Test 12 | void testWithCustomApiDocsPath() throws Exception { 13 | assertMatchesOpenApiJson("app22.json", () -> 14 | getResponseBody(PATH_TO_API_DOCS).replace(buildHost(), "http://localhost") 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app23/App23.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app23; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App23 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App23.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app23/App23Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app23; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebFluxBaseIntTest; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.test.context.TestPropertySource; 6 | 7 | @TestPropertySource(properties = "openapi-generator-for-spring.enabled=false") 8 | class App23Test extends AbstractOpenApiGeneratorWebFluxBaseIntTest { 9 | 10 | @Test 11 | void testOpenApiIsNotFoundWhenDisabled() { 12 | performApiDocsRequest(x -> x, x -> x).expectStatus().isNotFound(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app24/App24.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app24; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App24 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App24.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app24/App24Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app24; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcBaseIntTest; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.test.context.TestPropertySource; 6 | 7 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; 8 | 9 | @TestPropertySource(properties = "openapi-generator-for-spring.enabled=false") 10 | class App24Test extends AbstractOpenApiGeneratorWebMvcBaseIntTest { 11 | 12 | @Test 13 | void testOpenApiIsNotFoundWhenDisabled() throws Exception { 14 | performApiDocsRequest(x -> x) 15 | .andExpect(status().isNotFound()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app25/App25.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app25; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App25 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App25.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app25/App25Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app25; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebFluxBaseIntTest; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.test.context.TestPropertySource; 6 | 7 | @TestPropertySource(properties = "openapi-generator-for-spring.ui.enabled=false") 8 | class App25Test extends AbstractOpenApiGeneratorWebFluxBaseIntTest { 9 | 10 | @Test 11 | void testSwaggerUiIsNotFoundWhenDisabled() throws Exception { 12 | performApiDocsRequest(x -> x, x -> x).expectStatus().isOk(); 13 | webTestClient.get().uri(uriBuilder -> uriBuilder 14 | .path("/swagger-ui/index.html") 15 | .build()) 16 | .exchange() 17 | .expectStatus().isNotFound(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app26/App26.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app26; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App26 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App26.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app26/App26Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app26; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcBaseIntTest; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.test.context.TestPropertySource; 6 | 7 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; 8 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; 9 | 10 | @TestPropertySource(properties = "openapi-generator-for-spring.ui.enabled=false") 11 | class App26Test extends AbstractOpenApiGeneratorWebMvcBaseIntTest { 12 | 13 | @Test 14 | void testOpenApiIsNotFoundWhenDisabled() throws Exception { 15 | performApiDocsRequest(x -> x) 16 | .andExpect(status().isOk()); 17 | mockMvc.perform(get("/swagger-ui/index.html")) 18 | .andExpect(status().isNotFound()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app27/App27.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app27; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App27 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App27.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app27/App27Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app27; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebFluxIntTest; 4 | 5 | class App27Test extends AbstractOpenApiGeneratorWebFluxIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app28/App28.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app28; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App28 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App28.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app29/App29.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app29; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App29 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App29.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app3/App3.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app3; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App3 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App3.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app3/App3Configuration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app3; 2 | 3 | import de.qaware.openapigeneratorforspring.common.operation.response.ApiResponseDefaultProvider; 4 | import de.qaware.openapigeneratorforspring.common.operation.response.OperationApiResponsesDescriptionCustomizer; 5 | import de.qaware.openapigeneratorforspring.common.operation.response.OperationApiResponsesFromMethodCustomizer; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | @Configuration 10 | class App3Configuration { 11 | 12 | @Bean 13 | public OperationApiResponsesFromMethodCustomizer simpleOperationApiResponsesFromMethodCustomizer(ApiResponseDefaultProvider apiResponseDefaultProvider) { 14 | return (apiResponses, operationBuilderContext) -> apiResponses.put("default", apiResponseDefaultProvider.build("200")); 15 | } 16 | 17 | @Bean 18 | public OperationApiResponsesDescriptionCustomizer customOperationApiResponsesDescriptionCustomizer() { 19 | return (apiResponses, operationBuilderContext) -> apiResponses.forEach((responseCode, apiResponse) -> apiResponse.setDescription("My own description")); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app3/App3ConflictingController1.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app3; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.PostMapping; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | @RestController 9 | @RequestMapping(path = "v1") 10 | class App3ConflictingController1 { 11 | 12 | @GetMapping("get-mapping") 13 | public String getMappingReturnString() { 14 | return null; 15 | } 16 | 17 | @PostMapping("post-mapping") 18 | public void postMapping() { 19 | 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app3/App3ConflictingController2.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app3; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | @RestController 8 | @RequestMapping(path = "v2") 9 | class App3ConflictingController2 { 10 | 11 | @GetMapping("get-mapping") 12 | public String getMappingReturnString() { 13 | return null; 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app3/App3ConflictingController3.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app3; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | @RestController 9 | @RequestMapping(path = "v3") 10 | class App3ConflictingController3 { 11 | 12 | @GetMapping("post-mapping") 13 | @Operation(operationId = "postMapping") 14 | public String postMappingWithExplicitOperationId() { 15 | return null; 16 | } 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app3/App3Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app3; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App3Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app30/App30.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app30; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App30 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App30.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app30/App30Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app30; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App30Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app31/App31.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app31; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App31 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App31.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app31/App31Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app31; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App31Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app32/App32.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app32; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App32 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App32.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app32/App32Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app32; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App32Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app32/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app32; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ControllerAdvice; 5 | import org.springframework.web.bind.annotation.ExceptionHandler; 6 | import org.springframework.web.bind.annotation.ResponseStatus; 7 | 8 | @ControllerAdvice 9 | class GlobalExceptionHandler { 10 | @ExceptionHandler 11 | @ResponseStatus(HttpStatus.CONFLICT) 12 | public App32Controller.ErrorDto handleAnotherException(App32Controller.AnotherException ex) { 13 | return null; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app33/App33.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app33; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App33 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App33.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app33/App33Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app33; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App33Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app34/App34.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app34; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App34 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App34.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app34/App34Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app34; 2 | 3 | import io.swagger.v3.oas.annotations.media.ArraySchema; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | import lombok.Value; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | import java.util.List; 10 | 11 | @RestController 12 | class App34Controller { 13 | 14 | @GetMapping(value = "/mapping1") 15 | public SomeListDto mapping1() { 16 | return null; 17 | } 18 | 19 | @GetMapping(value = "/mapping2") 20 | public SomeDto mapping2() { 21 | return null; 22 | } 23 | 24 | @Value 25 | @Schema(description = "Description of SomeListDto") 26 | static class SomeListDto { 27 | @Schema(description = "List of entries", required = true) 28 | @ArraySchema(schema = @Schema(deprecated = true)) 29 | List entries; 30 | } 31 | 32 | @Value 33 | @Schema(description = "Description of SomeDto") 34 | static class SomeDto { 35 | @Schema(description = "Description for some property") 36 | String someProperty1; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app34/App34Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app34; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App34Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app35/App35.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app35; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App35 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App35.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app36/App36.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app36; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App36 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App36.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app36/App36Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app36; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RequestBody; 5 | import org.springframework.web.bind.annotation.RequestParam; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | @RestController 9 | class App36Controller { 10 | @GetMapping("mapping1") 11 | public String mapping1(@RequestBody String request, @RequestParam String param1) { 12 | return null; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app36/App36Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app36; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcBaseIntTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | class App36Test extends AbstractOpenApiGeneratorWebMvcBaseIntTest { 7 | 8 | @Test 9 | void getOpenApiAsJson() throws Exception { 10 | assertResponseBodyMatchesOpenApiYaml("app36.yaml", 11 | performApiDocsRequest(x -> x.accept("application/yaml")) 12 | ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app37/App37.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app37; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App37 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App37.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app38/App38.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app38; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App38 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App38.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app38/App38Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app38; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RequestBody; 5 | import org.springframework.web.bind.annotation.RequestParam; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | @RestController 9 | class App38Controller { 10 | @GetMapping("mapping1") 11 | public String mapping1(@RequestBody String request, @RequestParam String param1) { 12 | return null; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app38/App38Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app38; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebFluxBaseIntTest; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.http.MediaType; 6 | 7 | class App38Test extends AbstractOpenApiGeneratorWebFluxBaseIntTest { 8 | 9 | @Test 10 | void getOpenApiAsJson() throws Exception { 11 | assertResponseBodyMatchesOpenApiYaml("app38.yaml", 12 | performApiDocsRequest(x -> x, x -> x.accept(new MediaType("application", "yaml"))) 13 | ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app39/App39.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app39; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App39 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App39.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app39/App39SpringSecurityConfiguration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app39; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.core.Ordered; 6 | import org.springframework.core.annotation.Order; 7 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 8 | import org.springframework.security.web.SecurityFilterChain; 9 | 10 | @Configuration 11 | @Order(Ordered.HIGHEST_PRECEDENCE) 12 | class App39SpringSecurityConfiguration { 13 | @Bean 14 | public SecurityFilterChain noWebMvcSecurityFilterChain(HttpSecurity http) throws Exception { 15 | return http.csrf().disable().build(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app39/App39Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app39; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebIntTest; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.assertj.core.api.Assertions.assertThat; 7 | 8 | class App39Test extends AbstractOpenApiGeneratorWebIntTest { 9 | 10 | @Test 11 | void testSwaggerUiIndexHtml() { 12 | assertThat(getResponseBody("/swagger-ui/index.html")) 13 | .doesNotContain(CSRF_TOKEN_HEADER_NAME); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app4/App4.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app4; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App4 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App4.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app4/App4BaseBaseController.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app4; 2 | 3 | import io.swagger.v3.oas.annotations.responses.ApiResponse; 4 | import io.swagger.v3.oas.annotations.responses.ApiResponses; 5 | 6 | 7 | @ApiResponses(value = { 8 | @ApiResponse(responseCode = "410", description = "Some more responses 1 from base base"), 9 | @ApiResponse(responseCode = "411", description = "Some more responses 2 from base base"), 10 | }) 11 | public abstract class App4BaseBaseController { 12 | 13 | } -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app4/App4BaseController.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app4; 2 | 3 | import io.swagger.v3.oas.annotations.responses.ApiResponse; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | 7 | @ApiResponse(responseCode = "503", description = "Something went really wrong from base") 8 | @ApiResponse(responseCode = "210", description = "Really cool response code from base") 9 | @RequestMapping(produces = "application/json") 10 | public abstract class App4BaseController extends App4BaseBaseController { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app4/App4SimpleController.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app4; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | import io.swagger.v3.oas.annotations.responses.ApiResponse; 5 | import org.springframework.web.bind.annotation.PostMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | import java.util.List; 9 | 10 | @RestController 11 | class App4SimpleController { 12 | @PostMapping(value = "/post1", produces = "text/plain") 13 | @ApiResponse(description = "Default response for post mapping") 14 | @Schema(implementation = String.class) 15 | public List postMapping1() { 16 | return null; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app4/App4Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app4; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App4Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app40/App40.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app40; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App40 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App40.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app40/App40SpringSecurityConfiguration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app40; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.core.Ordered; 6 | import org.springframework.core.annotation.Order; 7 | import org.springframework.security.web.server.csrf.CsrfWebFilter; 8 | import org.springframework.web.server.WebFilter; 9 | 10 | @Configuration 11 | class App40SpringSecurityConfiguration { 12 | @Bean 13 | @Order(Ordered.HIGHEST_PRECEDENCE) 14 | public WebFilter skipCsrfFilter() { 15 | return (exchange, chain) -> { 16 | CsrfWebFilter.skipExchange(exchange); 17 | return chain.filter(exchange); 18 | }; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app40/App40Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app40; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebIntTest; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.test.context.TestPropertySource; 6 | 7 | import static org.assertj.core.api.Assertions.assertThat; 8 | 9 | @TestPropertySource(properties = "spring.main.web-application-type = REACTIVE") 10 | class App40Test extends AbstractOpenApiGeneratorWebIntTest { 11 | 12 | @Test 13 | void testSwaggerUiIndexHtml() { 14 | assertThat(getResponseBody("/swagger-ui/index.html")).doesNotContain(CSRF_TOKEN_HEADER_NAME); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app41/App41.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app41; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App41 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App41.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app41/App41Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app41; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App41Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app42/App42.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app42; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App42 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App42.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app42/App42Configuration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app42; 2 | 3 | import de.qaware.openapigeneratorforspring.common.schema.customizer.SchemaPropertiesCustomizer; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | @Configuration 8 | class App42Configuration { 9 | 10 | @Bean 11 | public SchemaPropertiesCustomizer schemaPropertiesCustomizerForMyRequiredAnnotation() { 12 | return (schema, javaType, annotationsSupplier, properties) -> 13 | properties.forEach((propertyName, property) -> property.customize( 14 | (propertySchema, propertyType, propertyAnnotationsSupplier) -> 15 | propertyAnnotationsSupplier.findAnnotations(MyRequiredAnnotation.class) 16 | .findFirst() 17 | .ifPresent(ignored -> schema.addRequired(propertyName)) 18 | ) 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app42/App42Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app42; 2 | 3 | import lombok.Value; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | @RestController 8 | class App42Controller { 9 | 10 | @GetMapping 11 | public SomeType1 mapping1() { 12 | return null; 13 | } 14 | 15 | @Value 16 | private static class SomeType1 { 17 | @MyRequiredAnnotation 18 | String notNullProperty; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app42/App42Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app42; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App42Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app42/MyRequiredAnnotation.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app42; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.RetentionPolicy; 5 | 6 | @Retention(RetentionPolicy.RUNTIME) 7 | @interface MyRequiredAnnotation { 8 | } 9 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app43/App43.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app43; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App43 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App43.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app43/App43Configuration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app43; 2 | 3 | import de.qaware.openapigeneratorforspring.common.schema.resolver.SchemaNameBuilder; 4 | import de.qaware.openapigeneratorforspring.common.schema.resolver.type.extension.jackson.JacksonPolymorphismTypeSchemaNameBuilder; 5 | import org.apache.commons.lang3.StringUtils; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | @Configuration 10 | public class App43Configuration { 11 | 12 | @Bean 13 | public JacksonPolymorphismTypeSchemaNameBuilder jacksonPolymorphismTypeSchemaNameBuilder(SchemaNameBuilder schemaNameBuilder) { 14 | return (caller, javaTypeOwningJsonTypeInfo, jsonTypeInfo) -> { 15 | String property = jsonTypeInfo.property(); 16 | String propertyName = StringUtils.isNotBlank(property) ? property : jsonTypeInfo.use().getDefaultPropertyName(); 17 | return schemaNameBuilder.buildFromType(caller, javaTypeOwningJsonTypeInfo) + propertyName; 18 | }; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app43/App43Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app43; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App43Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app44/App44.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app44; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App44 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App44.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app44/SomeClassInUpperPackage1.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app44; 2 | 3 | import de.qaware.openapigeneratorforspring.test.app44.package1.Base1; 4 | import lombok.Value; 5 | 6 | @Value 7 | public class SomeClassInUpperPackage1 implements Base1 { 8 | String property3; 9 | } 10 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app44/SomeClassInUpperPackage2.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app44; 2 | 3 | import de.qaware.openapigeneratorforspring.test.app44.package1.Base1; 4 | import lombok.Value; 5 | 6 | @Value 7 | public class SomeClassInUpperPackage2 implements Base1 { 8 | String property8; 9 | } 10 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app44/package1/SomeClass1.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app44.package1; 2 | 3 | import lombok.Value; 4 | 5 | @Value 6 | public class SomeClass1 implements Base1 { 7 | String property1; 8 | } 9 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app44/package1/SomeClass2.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app44.package1; 2 | 3 | import lombok.Value; 4 | 5 | @Value 6 | public class SomeClass2 implements Base1 { 7 | String property7; 8 | } 9 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app44/package1/sub/SomeClassInSubPackage1.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app44.package1.sub; 2 | 3 | import de.qaware.openapigeneratorforspring.test.app44.package1.Base1; 4 | import lombok.Value; 5 | 6 | @Value 7 | public class SomeClassInSubPackage1 implements Base1 { 8 | String property4; 9 | } 10 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app44/package1/sub/SomeClassInSubPackage2.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app44.package1.sub; 2 | 3 | import de.qaware.openapigeneratorforspring.test.app44.package1.Base1; 4 | import lombok.Value; 5 | 6 | @Value 7 | public class SomeClassInSubPackage2 implements Base1 { 8 | String property5; 9 | } 10 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app44/package2/SomeClass1.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app44.package2; 2 | 3 | import de.qaware.openapigeneratorforspring.test.app44.package1.Base1; 4 | import lombok.Value; 5 | 6 | @Value 7 | public class SomeClass1 implements Base1 { 8 | String property2; 9 | } 10 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app44/package2/SomeClass2.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app44.package2; 2 | 3 | import de.qaware.openapigeneratorforspring.test.app44.package1.Base1; 4 | import lombok.Value; 5 | 6 | @Value 7 | public class SomeClass2 implements Base1 { 8 | String property6; 9 | } 10 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app45/App45.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app45; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App45 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App45.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app45/App45Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app45; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App45Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app46/App46.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app46; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App46 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App46.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app46/App46Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app46; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App46Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app47/App47.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app47; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App47 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App47.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app47/App47Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app47; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App47Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app48/App48.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app48; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App48 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App48.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app48/App48Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app48; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebFluxIntTest; 4 | 5 | class App48Test extends AbstractOpenApiGeneratorWebFluxIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app49/App49.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app49; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App49 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App49.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app49/App49Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app49; 2 | 3 | import io.swagger.v3.oas.annotations.Parameter; 4 | import io.swagger.v3.oas.annotations.enums.Explode; 5 | import io.swagger.v3.oas.annotations.media.ArraySchema; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.MatrixVariable; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestParam; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import java.util.List; 13 | 14 | @RestController 15 | @RequestMapping 16 | class App49Controller { 17 | 18 | @GetMapping("/users{id}") 19 | public List getUsers( 20 | @Parameter(explode = Explode.TRUE) @MatrixVariable(name = "id") @ArraySchema(minItems = 1) List userIds, 21 | @RequestParam(value = "metadata", required = false) boolean metadata 22 | ) { 23 | return userIds; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app49/App49Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app49; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App49Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app5/App5.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app5; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App5 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App5.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app5/App5Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app5; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App5Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app50/App50.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app50; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App50 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App50.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app50/App50Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app50; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App50Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app50/HeaderDtoConverter.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app50; 2 | 3 | import org.springframework.core.convert.converter.Converter; 4 | import org.springframework.stereotype.Component; 5 | 6 | @Component 7 | class HeaderDtoConverter implements Converter { 8 | 9 | @Override 10 | public App50Controller.HeaderDto convert(String source) { 11 | String[] split = source.split(";"); 12 | if (split.length != 2) { 13 | return App50Controller.HeaderDto.fromParams("unknown", "unknown"); 14 | } 15 | return App50Controller.HeaderDto.fromParams(split[0], split[1]); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app51/App51.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app51; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App51 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App51.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app51/App51Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app51; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App51Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app52/App52.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app52; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App52 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App52.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app52/App52Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app52; 2 | 3 | import lombok.Value; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | import java.util.Map; 9 | 10 | @RestController 11 | @RequestMapping 12 | class App52Controller { 13 | 14 | @GetMapping("mapping1") 15 | public DtoWithMap mapping1() { 16 | return null; 17 | } 18 | 19 | 20 | @GetMapping("mapping2") 21 | public Map mapping2() { 22 | return null; 23 | } 24 | 25 | @Value 26 | private static class DtoWithMap { 27 | Map innerStringStringMap; 28 | Map innerDtoMap; 29 | } 30 | 31 | @Value 32 | private static class InnerDto { 33 | String property1; 34 | int property2; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app52/App52Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app52; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App52Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app53/App53.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app53; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App53 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App53.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app53/App53Controller.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app53; 2 | 3 | import io.swagger.v3.oas.annotations.Parameter; 4 | import io.swagger.v3.oas.annotations.responses.ApiResponse; 5 | import org.springframework.http.MediaType; 6 | import org.springframework.web.bind.annotation.PostMapping; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestParam; 10 | 11 | 12 | @RequestMapping("base") 13 | @ApiResponse(description = "Base Response", responseCode = "401") 14 | public interface App53Controller { 15 | @PostMapping("mapping1") 16 | @ApiResponse(description = "Response 1", responseCode = "400") 17 | void mapping1(@RequestParam @Parameter(description = "Param1") String param1); 18 | 19 | @PostMapping(value = "mapping2", consumes = MediaType.TEXT_PLAIN_VALUE) 20 | @ApiResponse(description = "Response 2") 21 | void mapping2(@RequestBody @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "Body2") String body); 22 | } 23 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app53/App53ControllerImpl.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app53; 2 | 3 | import io.swagger.v3.oas.annotations.responses.ApiResponse; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | @ApiResponse(description = "Another base response", responseCode = "499") 8 | class App53ControllerImpl implements App53Controller { 9 | 10 | @Override 11 | public void mapping1(String param1) { 12 | 13 | } 14 | 15 | @Override 16 | public void mapping2(String body) { 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app53/App53Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app53; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App53Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app54/App54.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app54; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App54 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App54.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app54/App54Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app54; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App54Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app6/App6.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app6; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App6 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App6.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app6/App6Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app6; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App6Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app7/App7.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app7; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App7 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App7.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app7/App7SimpleController.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app7; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.DeleteMapping; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.PostMapping; 7 | import org.springframework.web.bind.annotation.PutMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.ResponseStatus; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | @RestController 13 | @RequestMapping(path = "simple") 14 | class App7SimpleController { 15 | 16 | @GetMapping("get-mapping") 17 | public String getMappingReturnString() { 18 | return null; 19 | } 20 | 21 | @PostMapping("post-mapping") 22 | @ResponseStatus(HttpStatus.CREATED) 23 | public void postMapping() { 24 | } 25 | 26 | @PutMapping("put-mapping") 27 | public void putMapping() { 28 | } 29 | 30 | @DeleteMapping("delete-mapping") 31 | @ResponseStatus(HttpStatus.NO_CONTENT) 32 | public void deleteMapping() { 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app7/App7Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app7; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App7Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app8/App8.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app8; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App8 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App8.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app8/App8Configuration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app8; 2 | 3 | import de.qaware.openapigeneratorforspring.common.reference.component.schema.ReferenceDeciderForSchema; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | @Configuration 8 | class App8Configuration { 9 | @Bean 10 | public ReferenceDeciderForSchema referenceDeciderForSchema() { 11 | return (schema, referenceIdentifier, numberOfUsages) -> true; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app8/App8SimpleController.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app8; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | import org.springframework.http.ResponseEntity; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestParam; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | import java.time.Instant; 11 | 12 | @RestController 13 | @RequestMapping(path = "simple") 14 | class App8SimpleController { 15 | 16 | @GetMapping("get-instant") 17 | public Instant getMappingReturnInstant() { 18 | return null; 19 | } 20 | 21 | @GetMapping("get-instant-2/{pathParam}") 22 | public Instant getMappingReturnInstantWithParameter(@Schema(name = "inputParameter") @RequestParam(required = false) Instant inputParameter1) { 23 | return null; 24 | } 25 | 26 | @GetMapping("get-response-entity-instant") 27 | @Schema(name = "responseEntitySchema") 28 | public ResponseEntity getResponseEntityOfInstant() { 29 | return null; 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app8/App8Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app8; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App8Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app9/App9.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app9; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | class App9 { 8 | public static void main(String[] args) { 9 | SpringApplication.run(App9.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app9/App9Configuration.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app9; 2 | 3 | import de.qaware.openapigeneratorforspring.common.reference.component.requestbody.ReferenceIdentifierBuilderForRequestBody; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | @Configuration 8 | class App9Configuration { 9 | @Bean 10 | public ReferenceIdentifierBuilderForRequestBody referenceIdentifierFactoryForRequestBody() { 11 | return (item, suggestedIdentifier, numberOfSetters) -> "RequestBody"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/java/de/qaware/openapigeneratorforspring/test/app9/App9Test.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.test.app9; 2 | 3 | import de.qaware.openapigeneratorforspring.test.AbstractOpenApiGeneratorWebMvcIntTest; 4 | 5 | class App9Test extends AbstractOpenApiGeneratorWebMvcIntTest { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.qaware.openapigeneratorforspring.test.OpenApiDisabledSpringSecurityTestConfiguration -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | de.qaware.openapigeneratorforspring.test.OpenApiDisabledSpringSecurityTestConfiguration 2 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring.main.banner-mode: "off" -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/logback-spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app1.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "My own title", 5 | "version": "unknown" 6 | }, 7 | "paths": {} 8 | } 9 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app10_admin.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "API for App10", 5 | "version": "unknown" 6 | }, 7 | "paths": { 8 | "/admin/mapping-1": { 9 | "get": { 10 | "operationId": "adminMapping1", 11 | "responses": { 12 | "200": { 13 | "description": "Default response" 14 | } 15 | } 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app10_user.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "API for App10", 5 | "version": "unknown" 6 | }, 7 | "paths": { 8 | "/user/mapping-1": { 9 | "get": { 10 | "operationId": "userMapping1", 11 | "responses": { 12 | "200": { 13 | "description": "Default response" 14 | } 15 | } 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app12.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "API for App12", 5 | "version": "unknown" 6 | }, 7 | "paths": { 8 | "/mapping-1": { 9 | "get": { 10 | "operationId": "mapping1", 11 | "parameters": [ 12 | { 13 | "name": "param1", 14 | "in": "query", 15 | "required": true, 16 | "schema": { 17 | "type": "string" 18 | } 19 | }, 20 | { 21 | "name": "X-Other-Header-Name", 22 | "in": "header", 23 | "required": true, 24 | "schema": { 25 | "type": "string" 26 | } 27 | } 28 | ], 29 | "responses": { 30 | "200": { 31 | "$ref": "#/components/responses/200" 32 | } 33 | } 34 | } 35 | }, 36 | "/mapping-2": { 37 | "get": { 38 | "operationId": "mapping2", 39 | "responses": { 40 | "200": { 41 | "$ref": "#/components/responses/200" 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "components": { 48 | "responses": { 49 | "200": { 50 | "description": "Default response" 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app18_admin.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "API for App18", 5 | "version": "unknown" 6 | }, 7 | "paths": { 8 | "/admin/mapping-1": { 9 | "get": { 10 | "operationId": "adminMapping1", 11 | "responses": { 12 | "200": { 13 | "description": "Default response" 14 | } 15 | } 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app18_user.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "API for App18", 5 | "version": "unknown" 6 | }, 7 | "paths": { 8 | "/user/mapping-1": { 9 | "get": { 10 | "operationId": "userMapping1", 11 | "responses": { 12 | "200": { 13 | "description": "Default response" 14 | } 15 | } 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app19.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "API for App19", 5 | "version": "unknown" 6 | }, 7 | "paths": {} 8 | } 9 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app21.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "API for App21", 5 | "version": "unknown" 6 | }, 7 | "servers": [ 8 | { 9 | "url": "http://localhost/my-context-path", 10 | "description": "Default Server" 11 | } 12 | ], 13 | "paths": {} 14 | } 15 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app22.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "API for App22", 5 | "version": "unknown" 6 | }, 7 | "servers": [ 8 | { 9 | "url": "http://localhost/", 10 | "description": "Default Server for WebFlux Test" 11 | } 12 | ], 13 | "paths": {} 14 | } 15 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiJson/app42.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "info": { 4 | "title": "API for App42", 5 | "version": "unknown" 6 | }, 7 | "paths": { 8 | "/": { 9 | "get": { 10 | "operationId": "mapping1", 11 | "responses": { 12 | "200": { 13 | "description": "Default response", 14 | "content": { 15 | "*/*": { 16 | "schema": { 17 | "$ref": "#/components/schemas/App42Controller.SomeType1" 18 | } 19 | } 20 | } 21 | } 22 | } 23 | } 24 | } 25 | }, 26 | "components": { 27 | "schemas": { 28 | "App42Controller.SomeType1": { 29 | "required": [ 30 | "notNullProperty" 31 | ], 32 | "type": "object", 33 | "properties": { 34 | "notNullProperty": { 35 | "type": "string" 36 | } 37 | } 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiYaml/app35.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: API for App35 4 | version: unknown 5 | paths: { } -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiYaml/app36.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: API for App36 4 | version: unknown 5 | paths: 6 | /mapping1: 7 | get: 8 | operationId: mapping1 9 | parameters: 10 | - name: param1 11 | in: query 12 | required: true 13 | schema: 14 | type: string 15 | requestBody: 16 | content: 17 | '*/*': 18 | schema: 19 | type: string 20 | required: true 21 | responses: 22 | "200": 23 | description: Default response 24 | content: 25 | '*/*': 26 | schema: 27 | type: string -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiYaml/app37.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: API for App37 4 | version: unknown 5 | paths: { } -------------------------------------------------------------------------------- /openapi-generator-for-spring-test/src/test/resources/openApiYaml/app38.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: API for App38 4 | version: unknown 5 | paths: 6 | /mapping1: 7 | get: 8 | operationId: mapping1 9 | parameters: 10 | - name: param1 11 | in: query 12 | required: true 13 | schema: 14 | type: string 15 | requestBody: 16 | content: 17 | '*/*': 18 | schema: 19 | type: string 20 | required: true 21 | responses: 22 | "200": 23 | description: Default response 24 | content: 25 | '*/*': 26 | schema: 27 | type: string -------------------------------------------------------------------------------- /openapi-generator-for-spring-ui/src/main/java/de/qaware/openapigeneratorforspring/ui/DefaultOpenApiSwaggerUiApiDocsUrisSupplier.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: UI 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.ui; 22 | 23 | import java.net.URI; 24 | import java.util.Collections; 25 | import java.util.List; 26 | 27 | public class DefaultOpenApiSwaggerUiApiDocsUrisSupplier implements OpenApiSwaggerUiApiDocsUrisSupplier { 28 | @Override 29 | public List getApiDocsUris(URI apiDocsUri) { 30 | return Collections.singletonList(ApiDocsUriWithName.of("Default", apiDocsUri)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-ui/src/main/java/de/qaware/openapigeneratorforspring/ui/swagger/OpenApiSwaggerUiCsrfSupport.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: UI 4 | * %% 5 | * Copyright (C) 2020 - 2021 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.ui.swagger; 22 | 23 | import lombok.Getter; 24 | import lombok.RequiredArgsConstructor; 25 | 26 | @RequiredArgsConstructor(staticName = "of") 27 | @Getter 28 | public final class OpenApiSwaggerUiCsrfSupport { 29 | private final String headerName; 30 | private final String token; 31 | } 32 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-ui/src/main/java/de/qaware/openapigeneratorforspring/ui/webflux/OpenApiSwaggerUiCsrfSupportProviderForWebFlux.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: UI 4 | * %% 5 | * Copyright (C) 2020 - 2021 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.ui.webflux; 22 | 23 | import de.qaware.openapigeneratorforspring.ui.swagger.OpenApiSwaggerUiCsrfSupport; 24 | import org.springframework.web.server.ServerWebExchange; 25 | import reactor.core.publisher.Mono; 26 | 27 | @FunctionalInterface 28 | public interface OpenApiSwaggerUiCsrfSupportProviderForWebFlux { 29 | Mono getCsrfSupport(ServerWebExchange exchange); 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-ui/src/main/java/de/qaware/openapigeneratorforspring/ui/webjar/WebJarResourceTransformer.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: UI 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.ui.webjar; 22 | 23 | import org.springframework.core.io.Resource; 24 | 25 | import java.util.function.Function; 26 | 27 | /** 28 | * Transformer extends {@link Function} to make 29 | * use of {@link Function#andThen} chaining. 30 | */ 31 | public interface WebJarResourceTransformer extends Function { 32 | boolean matches(Resource resource); 33 | } 34 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-ui/src/main/java/de/qaware/openapigeneratorforspring/ui/webjar/WebJarResourceTransformerFactory.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: UI 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.ui.webjar; 22 | 23 | import de.qaware.openapigeneratorforspring.ui.swagger.OpenApiSwaggerUiCsrfSupport; 24 | 25 | import javax.annotation.Nullable; 26 | import java.net.URI; 27 | 28 | public interface WebJarResourceTransformerFactory { 29 | WebJarResourceTransformer create(URI baseUri, @Nullable OpenApiSwaggerUiCsrfSupport csrfSupport); 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-ui/src/main/java/de/qaware/openapigeneratorforspring/ui/webjar/WebJarTransformedResourceBuilder.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: UI 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.ui.webjar; 22 | 23 | import org.springframework.core.io.Resource; 24 | 25 | @FunctionalInterface 26 | public interface WebJarTransformedResourceBuilder { 27 | Resource buildResource(Resource originalResource, String transformedContent); 28 | } 29 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-ui/src/main/java/de/qaware/openapigeneratorforspring/ui/webmvc/OpenApiSwaggerUiCsrfSupportProviderForWebMvc.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: UI 4 | * %% 5 | * Copyright (C) 2020 - 2021 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.ui.webmvc; 22 | 23 | import de.qaware.openapigeneratorforspring.ui.swagger.OpenApiSwaggerUiCsrfSupport; 24 | 25 | import javax.annotation.Nullable; 26 | 27 | public interface OpenApiSwaggerUiCsrfSupportProviderForWebMvc { 28 | @Nullable 29 | OpenApiSwaggerUiCsrfSupport getCsrfSupport(); 30 | } 31 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-ui/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiSwaggerUiAutoConfiguration,\ 3 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiSwaggerUiWebMvcAutoConfiguration,\ 4 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiSwaggerUiWebFluxAutoConfiguration 5 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-ui/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiSwaggerUiAutoConfiguration 2 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiSwaggerUiWebMvcAutoConfiguration 3 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiSwaggerUiWebFluxAutoConfiguration 4 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-web/src/main/java/de/qaware/openapigeneratorforspring/common/paths/SpringWebHandlerMethodBuilder.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * OpenAPI Generator for Spring Boot :: Web 4 | * %% 5 | * Copyright (C) 2020 QAware GmbH 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * #L% 19 | */ 20 | 21 | package de.qaware.openapigeneratorforspring.common.paths; 22 | 23 | public interface SpringWebHandlerMethodBuilder { 24 | HandlerMethod build(org.springframework.web.method.HandlerMethod springWebHandlerMethod); 25 | } 26 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-web/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiGeneratorWebAutoConfiguration 3 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiGeneratorWebAutoConfiguration 2 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-web/src/test/java/de/qaware/openapigeneratorforspring/common/paths/SpringWebRequestMethodEnumMapperTest.java: -------------------------------------------------------------------------------- 1 | package de.qaware.openapigeneratorforspring.common.paths; 2 | 3 | 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.web.bind.annotation.RequestMethod; 6 | 7 | import java.util.stream.Stream; 8 | 9 | import static org.assertj.core.api.Assertions.assertThat; 10 | 11 | class SpringWebRequestMethodEnumMapperTest { 12 | @Test 13 | void enumsAreBijective() { 14 | assertThat(Stream.of(RequestMethod.values()).map(Enum::name)) 15 | .containsExactlyInAnyOrderElementsOf( 16 | Stream.of(de.qaware.openapigeneratorforspring.model.path.RequestMethod.values()) 17 | .map(Enum::name) 18 | .toList() 19 | ); 20 | } 21 | } -------------------------------------------------------------------------------- /openapi-generator-for-spring-webflux/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiGeneratorWebFluxAutoConfiguration 3 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-webflux/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiGeneratorWebFluxAutoConfiguration 2 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-webmvc/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiGeneratorWebMvcAutoConfiguration 3 | -------------------------------------------------------------------------------- /openapi-generator-for-spring-webmvc/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | de.qaware.openapigeneratorforspring.autoconfigure.OpenApiGeneratorWebMvcAutoConfiguration 2 | --------------------------------------------------------------------------------