You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2019/07/16 03:02:05 UTC
[cxf] branch CXF-7601_microProfileOpenApi updated (d0a749f ->
e1b8126)
This is an automated email from the ASF dual-hosted git repository.
reta pushed a change to branch CXF-7601_microProfileOpenApi
in repository https://gitbox.apache.org/repos/asf/cxf.git.
discard d0a749f update parent version
discard 0e92a85 update to latest geronimo-openapi-impl release
discard d08226c Merge remote-tracking branch 'origin/master' into CXF-7601_microProfileOpenApi
discard 85c9700 Merge remote-tracking branch 'origin/CXF-7601_microProfileOpenApi' into CXF-7601_microProfileOpenApi
discard 19a5712 Upgrading Apache Johnzon dependencies to 1.1.11
discard 018f05a Rebased against latest master, added a sample project for OpenAPI v3.0 using microprofile implementation
discard 0101c39 update new module to 3.3.1-SNAPSHOT
discard bf8528f [CXF-7601] Add support for Microprofile OpenAPI implementation (as an alternative to Swagger Core 2.0)
discard cee6712 Merge remote-tracking branch 'origin/master' into CXF-7601_microProfileOpenApi
discard 1c9258a Merge remote-tracking branch 'origin/master' into CXF-7601_microProfileOpenApi
discard 009eca5 update to latest geronimo-openapi-impl release
discard 84f6a60 update new module to 3.3.1-SNAPSHOT
discard b8b953b Merge remote-tracking branch 'origin/master' into CXF-7601_microProfileOpenApi
discard ace2c8f [CXF-7601] Add support for Microprofile OpenAPI implementation (as an alternative to Swagger Core 2.0)
add 08f7177 cxf-rt-rs-security-oauth2: remove unused throws declarations #2
add 23bd1b8 Adding support to configure the cert constaints separator.
add b587b41 Merge pull request #503 from apache/wss-641
add 46b9565 Fix "Apache License, Version 2.0" spelling
add b688cf62 Merge pull request #553 from don-vip/patch-1
add e56a414 Another license switch
add 6d467ad replace Collection::addAll(Arrays.asList(...)) with Collections::addAll
add 208b581 cxf-systests-jaxws: update OASISCatalogTest.readUrl
add f09ae1e Adding an XKMS Register system test
add 5ce20d7 Removed some unused code from XKMS + added some tests
add d1769b7 Removed useless path validation
add bca53bf Removed unused import
add 78fed1f Updating Tomcat
add 12f6355 CXF-8043 - XKMS LdapCertificateRepo searching using DN doesn't work
add 25e5da1 Updating Spring
add 5464908 [CXF-8042]:doPrivileged block doesn't totally work in ProxyClassLoaderCache (#554)
add 7d70dd6 cxf-systests-uncategorized: update wsdl location
add 8c9895c CXF-7953: apply workaround for JDK 9 & 10
add e23579d ProxyClassLoaderCache: add isLoggable check
add 5c4d446 [CXF-8044] Don't set the Compiler-fork setting. It shouldn't be needed and interferes with folks that have it explicitely set to false.
add 6a5ecb6 itests: reuse Karaf version
add 814213d Update maven-compiler-plugin
add 606fc57 Update maven-bundle-plugin
add 2d0c463 examples: update maven plugins; fix ruby sample
add a8a56cb cxf-core: fix Sonar warnings
add ff9031f Updating Spring Reactor version
add 9a2f121 CXF-8021: Upgrade to OpenTracing 0.33
add a4f7ddc [CXF-8045]Disable HTTP TRACE method on CXF http-undertow transport
add d131573 [CXF-8041]Error resolving relative XSD Schema on Tomcat
add b930094 Updating Tika
add 48c48f1 Switch to using https everywhere
add 08a0549 Updating JAckson
add bc1a8f5 MP Rest Client 1.3 Implementation
add 770edd8 Code review comments
add 1d1694a Remove JSONB Provider
add 5cae972 Merge pull request #551 from andymc12/mpRestClient-1.3
add 2e3a749 Merge branch 'master' of github.com:apache/cxf
add 04b232d add jaxb-xjc dependency in test scope for java11 also
add f8791ca cxf-rt-rs-client: override WebClient#authorization
add 85b7563 CXF-8046: Resource Listing in CXF 3.3.x does not recognize OpenAPI endpoints
add 5827b0b Fixing the parent POM version (should be 3.3.3-SNAPSHOT)
add 9d0ca57 Updating Swagger2
add c0343f1 cxf-systests-rs-security: introduce SpringBusTestServer
add b7dad93 Merge branch 'master' of github.com:apache/cxf
add 5cfbdfe Revert "[CXF-8041]Error resolving relative XSD Schema on Tomcat"
add 513f83e [CXF-8041]catch unchecked exceptions for all ResourceResolvers so all ResourceResolvers have chance to run
add 3a984d3 cxf-systests-rs-security: fix port check; inject accessToken
add 0b80003 remove jaxb-xjc dependency from core as we actually don't need it
add d89cfe4 Cast to Buffer to call flip so code compiled with Java11 will run on Java8
add 7c7bd3f Remove jaxb-xjc from default dependencies for java11, add it where it's needed
add 493f5de Update jcache & ehcache3 versions
add 5b2f078 CXF-8049: Enclosing class path entries that contain whitespaces in double quotes
add 36428ee CXF-8049: Compile failed
add 6752224 CXF-8049: Checkstyle related changes
add c55faf9 CXF-8049: More Checkstyle pain
add 647156c Merge pull request #558 from vadakr/CXF-8049
add 605e2ec [CXF-8049]a bit enhancement
add 6488c5f cxf-rt-rs-sse: SseEventSourceImplTest on server instead of mock
add 38fe864 cxf-rt-rs-sse: add cxf-rt-transports-local dependency
add a079c5e Trivial change not to create the classloader twice
add c58d9cc Upgrading Mockito
add 3a1f54d DoPriv around File.exists()
add c19b382 Updating a few dependencies + plugins
add bdae8a1 parse cxf.jaxrs.extensions like it done in CXFNonSpringJaxrsServlet, but with "," separator
add a5e7f3b Merge pull request #559 from slavb18/master
add 37fecc9 Merge branch 'master' of github.com:apache/cxf
add bdd1210 Update org.eclipse.microprofile.rest.client
add ec1f1bb Update wiremock-maven-plugin
add 2071cdd Consolidating some dependency versions + finally fixed the flakiness of the systests
add 7feb020 Updating wiremock
add c6c5b7c Put versions in alphabetical order
add ca6b25e Fixing a few javadoc issues
add 00e9630 Fixing build with Java 11
add 179bd2f Updating cglib
add 37f1867 Fixing build
add 4dfe29c Update some plugin versions in maven-plugins
add 93a6a50 Squashed commit of the following: Closes #561
add 9c55315 Merge branch 'master' of github.com:apache/cxf
add 67472c5 More work on version consistency in the samples
add d38128a Removing ancient ant version
add cc4e90a update cxf.hazelcast.version
add 2d60e61 cxf-rt-rs-security-oauth2: add test for OAuthClientUtils
add 8ddd7e7 cxf-systests-jaxrs: minor test changes
add edf9b20 cxf-rt-rs-extension-providers: add test for JsonMapObjectProvider
add dd944be Karaf upgrade
add ad557fb Adding a test to show how to use Handler ActionTokens with WS-Security.
add e0692b4 Log stack trace
add fed13f5 CXF-8052: Cannot set JAXB schema compiler options
add e15343a CXF-8052: Cannot set JAXB schema compiler options
add 5addbf9 Merge pull request #560 from vadakr/CXF-8052
add 4446d78 Avoid duplicate query parameters at OAuthClientUtils#getAuthorizationURI
add 9beabe7 Updating http client
add 6006f54 Make sure WSU namespace is always added
add 77b0819 Updating to latest Swagger UI
add c5702b0 Fixing failing tests due to cert expiration
add 42352e7 [CXF-8055]AsyncHTTPConduit should also consider jaxws spec timeout properties
add 91f78e0 CXF-8056: Update to latest Brave 5.6.5
add 7a4983c Updating Jetty, Spring, Hazelcast
add 9c9d5c4 cxf-services-sts-systests-basic: minor test refactoring
add 3bcb005 [CXF-8057]upgrade to use stax2-api and woodstox-core latest version
add 5cef966 Fix CXF-7966: allows more flexibility in Beanspector (#510)
add 58ad2b8 Updating Spring Boot
add d78d7d9 Fixing a few bugs
add ab2a445 Revert "[CXF-8057]upgrade to use stax2-api and woodstox-core latest version"
add 5059b7b CXF-8060 - Switch default keystore type to JKS. This should work with both JKS + PKCS12 as a result.
add 8296397 Switch to use Files.createTemFile
add 510caef CXF-8059: @FormParam inside @BeanParam not working
add 0883d91 Update maven-checkstyle-plugin
add 800cd04 Made test less likely to fail
add e93148a Removing unused exclusions from hbase-client
add d4a28ed [CXF-8062]test to demonstrate MessageContext.HTTP_RESPONSE_CODE can be obtained if response code is not 200
add be61232 Removing duplicate ant version
add 93bc0dd CXF-8063 - Make it easier to subclass Slf4jEventSender
add 8421754 CXF-8063 - Make it easier to configure the logging level
add a75cc85 No need to use SoapMessage in the attachment callback handler
add 21b1df7 CXF-8068 - Log any error in the SAML SSO component under warning
add 55fff5e [CXF-8062]be able to set HTTP return code even it's 4xx
add 34473b5 [CXF-8064]OpenApiFeature(OpenAPI V3) should be able to work with camel-cxfrs endpoint
add 1fad512 Updating Jasypt bundle
add 8add945 Setting property logMultipart and logBinary from org.apache.cxf.features.logging.cfg
add 4f40390 Merge pull request #563 from LucaT75/DisableLoggingMultipartFeature
add 5fe1123 [CXF-8072]Loggers logs request twice in case of Fault
add efac0e6 Fix some eclipse warnings
add aa1fdd0 Merge branch 'master' of github.com:apache/cxf
add c09877e Use MessageDigest in the SCTCanceller
add 7815364 Fix a bunch of issues the new PMD is reporting, many more to go
add 5355846 Upgrade pmd plugin, try to detect which eclipse PMD plugin (there are 2) is installed and configure appropriately
add 8a4c09f CXF-8051 - Inline any xop Include references in a received SecurityToken if MTOM is enabled
add c6f6926 Merge pull request #564 from apache/CXF-8051
add 236595b Updating Tomcat
add 686b6ef Update MP Rest Client dependency to 1.3.3
add ca147d9 cxf-core: fix some new PMD warnings
add 515ba9d Updating Netty
add 8938ee2 Updating some depedencies
add aae5389 Updating ActiveMQ
add 6ce1a1b PMD cleanup
add 7cb48e0 CXF-8066: Support Doclet API (JDK13+) (#566)
add 7f2b714 [CXF-8073] Better error reporting on oauth2's OAuthServiceException
add 3457826 Update OAuthError.java
add d99a1d8 Merge pull request #567 from rcsilva83/CXF-8073
add d520059 CXF-8076 - Check for recursive calls when invoking on an STS using its own IssuedToken policy
add 1a63729 CXF-8076 - Minor tweak
new 7b333d0 [CXF-7601] Add support for Microprofile OpenAPI implementation (as an alternative to Swagger Core 2.0)
new 1c55f92 update new module to 3.3.1-SNAPSHOT
new 3886940 update to latest geronimo-openapi-impl release
new 3b96065 [CXF-7601] Add support for Microprofile OpenAPI implementation (as an alternative to Swagger Core 2.0)
new 5aa0660 Rebased against latest master, added a sample project for OpenAPI v3.0 using microprofile implementation
new 09ddfde Upgrading Apache Johnzon dependencies to 1.1.11
new 0c7ab09 update to latest geronimo-openapi-impl release
new e1b8126 Accomodate recent microprofile OpenApi changes
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (d0a749f)
\
N -- N -- N refs/heads/CXF-7601_microProfileOpenApi (e1b8126)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
benchmark/performance/base/pom.xml | 2 +-
benchmark/performance/soap_http_doc_lit/pom.xml | 2 +-
core/pom.xml | 11 +-
core/src/main/java/org/apache/cxf/BusFactory.java | 19 +-
.../cxf/attachment/AttachmentDataSource.java | 7 +-
.../cxf/attachment/AttachmentDeserializer.java | 2 +-
.../cxf/attachment/AttachmentSerializer.java | 3 +-
.../org/apache/cxf/attachment/AttachmentUtil.java | 6 +-
.../cxf/attachment/ImageDataContentHandler.java | 4 +-
.../org/apache/cxf/attachment/LazyDataSource.java | 26 +-
.../cxf/attachment/MimeBodyPartInputStream.java | 4 +-
.../apache/cxf/bus/blueprint/ConfigurerImpl.java | 16 +-
.../org/apache/cxf/bus/extension/Extension.java | 14 +-
.../cxf/bus/extension/ExtensionManagerBus.java | 30 +-
.../cxf/bus/extension/ExtensionManagerImpl.java | 18 +-
.../apache/cxf/bus/managers/HeaderManagerImpl.java | 5 +-
.../cxf/bus/managers/WorkQueueManagerImpl.java | 2 +-
.../BusApplicationContextResourceResolver.java | 3 +-
.../apache/cxf/bus/spring/BusDefinitionParser.java | 3 +-
.../cxf/bus/spring/BusExtensionPostProcessor.java | 5 +-
.../spring/BusWiringBeanFactoryPostProcessor.java | 3 +-
...ontrolledValidationXmlBeanDefinitionReader.java | 12 +-
.../cxf/bus/spring/Jsr250BeanPostProcessor.java | 9 +-
.../apache/cxf/bus/spring/NamespaceHandler.java | 3 +-
.../java/org/apache/cxf/bus/spring/SpringBus.java | 3 +-
.../cxf/catalog/CatalogXmlSchemaURIResolver.java | 2 +-
.../cxf/common/classloader/ClassLoaderUtils.java | 16 +-
.../cxf/common/injection/ResourceInjector.java | 6 +-
.../apache/cxf/common/jaxb/JAXBContextCache.java | 5 +-
.../java/org/apache/cxf/common/jaxb/JAXBUtils.java | 51 +-
.../common/logging/AbstractDelegatingLogger.java | 6 +-
.../org/apache/cxf/common/logging/Log4jLogger.java | 6 +-
.../java/org/apache/cxf/common/util/Compiler.java | 79 +-
.../org/apache/cxf/common/util/PrimitiveUtils.java | 3 +-
.../cxf/common/util/PropertiesLoaderUtils.java | 8 +-
.../cxf/common/util/ProxyClassLoaderCache.java | 53 +-
.../cxf/common/util/SpringClassUnwrapper.java | 2 +-
.../org/apache/cxf/common/util/SpringOsgiUtil.java | 2 +-
.../org/apache/cxf/common/util/StringUtils.java | 12 +-
.../org/apache/cxf/common/util/URIParserUtil.java | 6 +-
.../java/org/apache/cxf/common/util/UrlUtils.java | 3 +-
.../cxf/common/xmlschema/SchemaCollection.java | 2 +-
.../blueprint/AbstractBPBeanDefinitionParser.java | 4 +-
.../apache/cxf/configuration/jsse/SSLUtils.java | 116 +--
.../configuration/jsse/TLSClientParameters.java | 44 +-
.../spring/AbstractBeanDefinitionParser.java | 19 +-
.../cxf/configuration/spring/ConfigurerImpl.java | 23 +-
.../spring/MappingBeanDefinitionParser.java | 3 +-
.../cxf/databinding/AbstractDataBinding.java | 9 +-
.../databinding/source/XMLStreamDataReader.java | 4 +-
.../databinding/source/XMLStreamDataWriter.java | 3 +-
.../cxf/databinding/stax/StaxDataBinding.java | 2 +-
.../databinding/stax/StaxDataBindingFeature.java | 40 +-
.../cxf/endpoint/AbstractConduitSelector.java | 6 +-
.../java/org/apache/cxf/endpoint/ClientImpl.java | 11 +-
.../org/apache/cxf/feature/AbstractFeature.java | 46 +-
...ctFeature.java => AbstractPortableFeature.java} | 38 +-
.../org/apache/cxf/feature/DelegatingFeature.java | 70 ++
.../org/apache/cxf/feature/FastInfosetFeature.java | 110 ++-
.../org/apache/cxf/feature/LoggingFeature.java | 190 ++--
.../apache/cxf/feature/StaxTransformFeature.java | 106 +-
.../apache/cxf/feature/transform/XSLTFeature.java | 52 +-
.../cxf/feature/transform/XSLTInInterceptor.java | 26 +-
.../apache/cxf/feature/transform/XSLTUtils.java | 35 +-
.../validation/SchemaValidationFeature.java | 45 +-
.../main/java/org/apache/cxf/helpers/DOMUtils.java | 4 +-
.../java/org/apache/cxf/helpers/FileUtils.java | 63 +-
.../main/java/org/apache/cxf/helpers/IOUtils.java | 39 +-
.../java/org/apache/cxf/helpers/ServiceUtils.java | 14 +-
.../AbstractInDatabindingInterceptor.java | 5 +-
.../interceptor/AbstractLoggingInterceptor.java | 19 +-
.../cxf/interceptor/ClientFaultConverter.java | 2 +-
.../cxf/interceptor/FaultOutInterceptor.java | 2 +-
.../cxf/interceptor/LoggingInInterceptor.java | 4 +-
.../cxf/interceptor/LoggingOutInterceptor.java | 2 +-
.../cxf/interceptor/MessageSenderInterceptor.java | 2 +-
.../interceptor/OneWayProcessorInterceptor.java | 4 +-
.../cxf/interceptor/StaxInEndingInterceptor.java | 2 +-
.../apache/cxf/interceptor/StaxInInterceptor.java | 5 +-
.../cxf/interceptor/StaxOutEndingInterceptor.java | 2 +-
.../apache/cxf/interceptor/StaxOutInterceptor.java | 5 +-
.../security/AbstractAuthorizingInInterceptor.java | 3 +-
.../AbstractSecurityContextInInterceptor.java | 3 +-
.../security/DefaultSecurityContext.java | 7 +-
.../DelegatingAuthenticationInterceptor.java | 3 +-
.../security/JAASAuthenticationFeature.java | 52 +-
.../interceptor/security/JAASLoginInterceptor.java | 3 +-
.../OperationInfoAuthorizingInterceptor.java | 3 +-
.../security/SecureAnnotationsInterceptor.java | 9 +-
.../java/org/apache/cxf/io/CachedOutputStream.java | 4 +-
.../main/java/org/apache/cxf/io/CachedWriter.java | 7 +-
.../java/org/apache/cxf/io/ReaderInputStream.java | 41 +-
.../cxf/resource/DefaultResourceManager.java | 20 +-
.../java/org/apache/cxf/resource/URIResolver.java | 27 +-
.../factory/AnnotationsFactoryBeanListener.java | 6 +-
.../service/factory/SimpleMethodDispatcher.java | 8 +-
.../cxf/service/invoker/AbstractInvoker.java | 5 +-
.../apache/cxf/service/invoker/SessionFactory.java | 2 +-
.../service/invoker/spring/SpringBeanFactory.java | 5 +-
.../service/model/AbstractMessageContainer.java | 9 +-
.../service/model/AbstractPropertiesHolder.java | 8 +-
.../org/apache/cxf/service/model/BindingInfo.java | 8 +-
.../cxf/staxutils/AbstractDOMStreamReader.java | 2 +-
.../cxf/staxutils/CachingXmlEventWriter.java | 2 +-
.../cxf/staxutils/DelegatingXMLStreamWriter.java | 2 +-
.../apache/cxf/staxutils/DepthXMLStreamReader.java | 5 +-
.../cxf/staxutils/OverlayW3CDOMStreamWriter.java | 6 +-
.../cxf/staxutils/PrettyPrintXMLStreamWriter.java | 2 +-
.../staxutils/PropertiesExpandingStreamReader.java | 26 +-
.../java/org/apache/cxf/staxutils/StaxSource.java | 19 +-
.../apache/cxf/staxutils/W3CDOMStreamReader.java | 5 +-
.../apache/cxf/staxutils/W3CDOMStreamWriter.java | 4 +-
.../cxf/staxutils/transform/InTransformReader.java | 2 +-
.../staxutils/transform/OutTransformWriter.java | 8 +-
.../cxf/staxutils/transform/TransformUtils.java | 8 +-
.../staxutils/validation/Stax2ValidationUtils.java | 2 +-
.../StaxSchemaValidationInInterceptor.java | 2 +-
.../StaxSchemaValidationOutInterceptor.java | 2 +-
.../apache/cxf/transport/AbstractObservable.java | 2 +-
.../cxf/transport/common/gzip/GZIPFeature.java | 131 ++-
.../transport/common/gzip/GZIPInInterceptor.java | 2 +-
.../transport/common/gzip/GZIPOutInterceptor.java | 4 +-
.../validation/AbstractValidationInterceptor.java | 3 +-
.../cxf/validation/BeanValidationFeature.java | 44 +-
.../validation/ClientBeanValidationFeature.java | 47 +-
.../cxf/ws/addressing/EndpointReferenceUtils.java | 24 +-
.../apache/cxf/attachment/LazyDataSourceTest.java | 67 ++
.../apache/cxf/bus/extension/ExtensionTest.java | 2 +-
.../cxf/bus/spring/SpringBusFactoryTest.java | 5 +-
.../org/apache/cxf/common/jaxb/JAXBUtilsTest.java | 17 +-
.../apache/cxf/common/logging/LogUtilsTest.java | 2 +-
.../apache/cxf/common/util/ClassHelperTest.java | 3 +-
.../cxf/common/util/ProxyClassLoaderCacheTest.java | 68 +-
.../cxf/service/invoker/PooledFactoryTest.java | 31 +-
.../PropertiesExpandingStreamReaderTest.java | 8 +-
distribution/javadoc/pom.xml | 18 +-
distribution/manifest/pom.xml | 2 +-
distribution/pom.xml | 2 +-
.../main/appended-resources/META-INF/LICENSE.vm | 2 +-
.../release/samples/groovy_spring_support/pom.xml | 12 +-
.../main/release/samples/java_first_jaxws/pom.xml | 13 +-
.../samples/java_first_spring_support/pom.xml | 12 +-
.../release/samples/jax_rs/basic_https/pom.xml | 5 +-
.../main/release/samples/jax_rs/basic_oidc/pom.xml | 10 +-
.../main/release/samples/jax_rs/big_query/pom.xml | 14 +-
.../README.txt | 6 +-
.../pom.xml | 3 +-
.../java/demo/jaxrs/openapi/server/AppConfig.java | 2 +-
.../jax_rs/description_openapi_v3_web/pom.xml | 2 +-
.../jax_rs/description_swagger2_web/pom.xml | 2 +-
.../src/main/release/samples/jax_rs/odata/pom.xml | 10 +-
.../src/main/release/samples/jax_rs/search/pom.xml | 4 +-
.../src/main/release/samples/jax_rs/spark/pom.xml | 4 +-
.../release/samples/jax_rs/spring_security/pom.xml | 2 +-
.../main/release/samples/jax_rs/sse_cdi/pom.xml | 27 +-
.../main/release/samples/jax_rs/sse_client/pom.xml | 22 +-
.../main/release/samples/jax_rs/sse_osgi/pom.xml | 14 +-
.../main/release/samples/jax_rs/sse_spring/pom.xml | 21 +-
.../main/release/samples/jax_rs/sse_tomcat/pom.xml | 21 +-
.../release/samples/jax_rs/tracing_brave/pom.xml | 9 +-
.../java/demo/jaxrs/tracing/server/Server.java | 2 +-
.../jax_rs/tracing_opentracing_camel/pom.xml | 2 +-
.../jax_rs/tracing_opentracing_osgi/README.txt | 6 +-
.../release/samples/jax_rs/websocket_web/pom.xml | 3 +-
.../src/main/release/samples/oauth/client/pom.xml | 6 +-
distribution/src/main/release/samples/pom.xml | 33 +-
.../release/samples/ruby_spring_support/pom.xml | 13 +-
.../src/main/webapp/WEB-INF/cxf-servlet.xml | 10 +-
.../src/main/release/samples/ws_eventing/pom.xml | 2 +-
.../src/main/release/samples/wsdl_first/README.txt | 2 +-
.../src/main/release/samples/wsdl_first/pom.xml | 16 +-
integration/cdi/pom.xml | 4 +-
integration/jca/pom.xml | 2 +-
integration/pom.xml | 2 +-
integration/spring-boot/autoconfigure/pom.xml | 2 +-
integration/spring-boot/pom.xml | 2 +-
integration/spring-boot/starter-jaxrs/pom.xml | 2 +-
integration/spring-boot/starter-jaxws/pom.xml | 2 +-
integration/tracing/tracing-brave/pom.xml | 2 +-
.../cxf/tracing/brave/BraveClientFeature.java | 48 +-
.../org/apache/cxf/tracing/brave/BraveFeature.java | 77 +-
integration/tracing/tracing-opentracing/pom.xml | 2 +-
.../AbstractOpenTracingClientProvider.java | 24 +-
.../opentracing/AbstractOpenTracingProvider.java | 25 +-
.../opentracing/OpenTracingClientFeature.java | 30 +-
.../tracing/opentracing/OpenTracingContext.java | 10 +-
.../tracing/opentracing/OpenTracingFeature.java | 42 +-
.../{TraceScope.java => ScopedSpan.java} | 21 +-
maven-plugins/archetypes/cxf-jaxrs-service/pom.xml | 2 +-
.../src/main/resources/archetype-resources/pom.xml | 2 +-
.../archetypes/cxf-jaxws-javafirst/pom.xml | 2 +-
.../archetypes/cxf-jaxws-wsdlfirst/pom.xml | 2 +-
maven-plugins/archetypes/pom.xml | 2 +-
maven-plugins/codegen-plugin/pom.xml | 8 +-
.../codegen-plugin/src/it/mark-generated/pom.xml | 2 +-
.../src/it/wsdl-artifact-resolution/pom.xml | 2 +-
.../org/apache/cxf/maven_plugin/WsdlUtilities.java | 6 +-
.../maven_plugin/wsdl2java/WsdlOptionLoader.java | 3 +-
maven-plugins/corba/pom.xml | 2 +-
maven-plugins/java2swagger-plugin/pom.xml | 7 +-
maven-plugins/java2wadl-plugin/pom.xml | 57 +-
.../cxf/maven_plugin/javatowadl/DumpJavaDoc.java | 2 +-
.../cxf/maven_plugin/javatowadl/Java2WADLMojo.java | 22 +-
.../cxf/maven_plugin/javatowadl/DumpJavaDoc.java | 194 ++++
maven-plugins/java2ws-plugin/pom.xml | 2 +-
maven-plugins/pom.xml | 2 +-
maven-plugins/wadl2java-plugin/pom.xml | 8 +-
.../src/it/wsdl-artifact-resolution/pom.xml | 2 +-
.../cxf/maven_plugin/wadlto/OptionLoader.java | 8 +-
maven-plugins/wsdl-validator-plugin/pom.xml | 2 +-
.../apache/cxf/maven_plugin/WSDLValidatorMojo.java | 6 +-
osgi/bundle/compatible/pom.xml | 3 +-
osgi/bundle/pom.xml | 2 +-
osgi/itests-felix/pom.xml | 4 +-
osgi/itests/pom.xml | 10 +-
.../apache/cxf/osgi/itests/CXFOSGiTestSupport.java | 21 +-
.../karaf/features/src/main/resources/features.xml | 5 +-
osgi/pom.xml | 2 +-
parent/pom.xml | 362 +++----
pom.xml | 49 +-
rt/bindings/coloc/pom.xml | 2 +-
.../cxf/binding/coloc/feature/ColocFeature.java | 31 +-
rt/bindings/corba/pom.xml | 5 +-
rt/bindings/pom.xml | 2 +-
rt/bindings/soap/pom.xml | 2 +-
rt/bindings/xml/pom.xml | 2 +-
rt/databinding/aegis/pom.xml | 3 +-
.../apache/cxf/aegis/type/basic/CalendarType.java | 8 +-
.../apache/cxf/aegis/type/basic/DateTimeType.java | 8 +-
.../org/apache/cxf/aegis/type/basic/DateType.java | 8 +-
.../org/apache/cxf/aegis/type/basic/TimeType.java | 10 +-
.../apache/cxf/aegis/type/basic/TimestampType.java | 10 +-
.../cxf/aegis/type/basic/TimezoneLessDateType.java | 8 +-
.../cxf/aegis/type/encoded/ArrayTypeInfo.java | 3 +-
.../main/java/org/apache/cxf/aegis/util/UID.java | 4 +-
.../inheritance/ExceptionInheritanceTest.java | 2 +
.../org/apache/cxf/aegis/type/basic/BeanTest.java | 2 +
.../apache/cxf/aegis/type/basic/ByteDataTest.java | 2 +
.../cxf/aegis/type/basic/DynamicProxyTest.java | 2 +
.../cxf/aegis/type/basic/QualificationTest.java | 2 +
.../cxf/aegis/type/encoded/ArrayTypeInfoTest.java | 2 +
.../cxf/aegis/type/encoded/SoapArrayTypeTest.java | 2 +
.../cxf/aegis/type/encoded/StructTypeTest.java | 2 +
rt/databinding/jaxb/pom.xml | 2 +-
.../java/org/apache/cxf/jaxb/JAXBDataBinding.java | 3 +-
.../org/apache/cxf/jaxb/JAXBEncoderDecoder.java | 2 +-
rt/databinding/pom.xml | 2 +-
rt/features/clustering/pom.xml | 2 +-
.../org/apache/cxf/clustering/FailoverFeature.java | 124 ++-
.../cxf/clustering/LoadDistributorFeature.java | 19 +-
.../CircuitBreakerFailoverFeature.java | 91 +-
.../org/apache/cxf/ext/logging/LoggingFeature.java | 220 +++--
.../cxf/ext/logging/LoggingInInterceptor.java | 16 -
.../ext/logging/event/DefaultLogEventMapper.java | 2 +-
.../org/apache/cxf/ext/logging/osgi/Activator.java | 10 +-
.../cxf/ext/logging/slf4j/Slf4jEventSender.java | 33 +-
.../org/apache/cxf/metrics/MetricsFeature.java | 163 ++--
rt/features/pom.xml | 2 +-
.../apache/cxf/throttling/ThrottlingFeature.java | 45 +-
rt/frontend/jaxrs/pom.xml | 2 +-
.../apache/cxf/jaxrs/JAXRSServiceFactoryBean.java | 10 +-
.../cxf/jaxrs/impl/VariantListBuilderImpl.java | 8 +-
.../cxf/jaxrs/interceptor/JAXRSOutInterceptor.java | 3 +
.../apache/cxf/jaxrs/model/ClassResourceInfo.java | 20 +-
.../apache/cxf/jaxrs/provider/ProviderFactory.java | 2 +-
.../spring/AbstractSpringConfigurationFactory.java | 29 +
.../org/apache/cxf/jaxrs/utils/JAXRSUtils.java | 12 +-
.../org/apache/cxf/jaxrs/utils/ResourceUtils.java | 16 +-
.../validation/JAXRSBeanValidationFeature.java | 53 +-
rt/frontend/jaxws/pom.xml | 2 +-
.../java/org/apache/cxf/jaxws/ServiceImpl.java | 6 +-
rt/frontend/js/pom.xml | 2 +-
rt/frontend/pom.xml | 2 +-
rt/frontend/simple/pom.xml | 2 +-
.../cxf/endpoint/dynamic/DynamicClientFactory.java | 11 +-
rt/javascript/javascript-rt/pom.xml | 2 +-
.../cxf/javascript/JavascriptOptionsFeature.java | 48 +-
rt/javascript/javascript-tests/pom.xml | 2 +-
.../org/apache/cxf/javascript/fortest/AnyImpl.java | 4 +-
rt/javascript/pom.xml | 2 +-
rt/management/pom.xml | 2 +-
.../interceptor/ResponseTimeFeature.java | 35 +-
.../persistence/FilesystemExchangeDataDAO.java | 13 +-
rt/pom.xml | 2 +-
rt/rs/client/pom.xml | 4 +-
.../apache/cxf/jaxrs/client/AbstractClient.java | 7 +-
.../apache/cxf/jaxrs/client/ClientProxyImpl.java | 33 +-
.../cxf/jaxrs/client/JAXRSClientFactoryBean.java | 4 +-
.../org/apache/cxf/jaxrs/client/WebClient.java | 5 +
.../JAXRSClientBeanValidationFeature.java | 24 +-
.../org/apache/cxf/jaxrs/client/WebClientTest.java | 8 +
rt/rs/description-common-openapi/pom.xml | 2 +-
.../jaxrs/microprofile/openapi/OpenApiFeature.java | 2 +-
.../cxf/jaxrs/mpopenapi/OpenApiEndpoint.java | 43 -
.../apache/cxf/jaxrs/mpopenapi/OpenApiFeature.java | 474 ---------
.../cxf/jaxrs/mpopenapi/SwaggerProperties.java | 69 --
.../org/apache/cxf/jaxrs/mpopenapi/SwaggerUi.java | 47 -
rt/rs/description-openapi-v3/pom.xml | 2 +-
.../apache/cxf/jaxrs/openapi/OpenApiFeature.java | 1010 +++++++++++++-------
rt/rs/description-swagger-ui/pom.xml | 2 +-
rt/rs/description-swagger/pom.xml | 2 +-
.../cxf/jaxrs/swagger/AbstractSwaggerFeature.java | 305 ++++--
.../apache/cxf/jaxrs/swagger/Swagger2Feature.java | 779 +++++++++------
rt/rs/description/pom.xml | 2 +-
rt/rs/extensions/json-basic/pom.xml | 2 +-
rt/rs/extensions/providers/pom.xml | 2 +-
.../provider/json/JsonMapObjectProviderTest.java} | 36 +-
rt/rs/extensions/reactivestreams/pom.xml | 2 +-
rt/rs/extensions/reactor/pom.xml | 2 +-
rt/rs/extensions/rx/pom.xml | 2 +-
rt/rs/extensions/rx2/pom.xml | 2 +-
rt/rs/extensions/search/pom.xml | 2 +-
.../apache/cxf/jaxrs/ext/search/Beanspector.java | 68 +-
.../cxf/jaxrs/ext/search/BeanspectorTest.java | 89 +-
rt/rs/http-sci/pom.xml | 2 +-
rt/rs/microprofile-client/pom.xml | 10 +-
.../client/CxfTypeSafeClientBuilder.java | 52 +-
.../cxf/microprofile/client/Messages.properties | 5 +-
.../client/MicroProfileClientFactoryBean.java | 21 +-
.../client/MicroProfileClientProviderFactory.java | 6 +
.../client/MicroProfileServiceFactoryBean.java} | 21 +-
.../microprofile/client/cdi/RestClientBean.java | 146 ++-
.../microprofile/client/config/ConfigFacade.java | 54 ++
.../client/proxy/MicroProfileClientProxyImpl.java | 5 +-
rt/rs/pom.xml | 2 +-
rt/rs/security/cors/pom.xml | 2 +-
rt/rs/security/http-signature/pom.xml | 2 +-
rt/rs/security/jcs-parent/jcs/pom.xml | 4 +-
rt/rs/security/jcs-parent/pom.xml | 4 +-
rt/rs/security/jose-parent/jose-jaxrs/pom.xml | 2 +-
rt/rs/security/jose-parent/jose/pom.xml | 2 +-
rt/rs/security/jose-parent/pom.xml | 2 +-
rt/rs/security/oauth-parent/oauth/pom.xml | 2 +-
.../security/oauth/filters/AbstractAuthFilter.java | 4 +-
rt/rs/security/oauth-parent/oauth2-saml/pom.xml | 2 +-
rt/rs/security/oauth-parent/oauth2/pom.xml | 6 +-
.../security/oauth2/client/OAuthClientUtils.java | 6 -
.../cxf/rs/security/oauth2/common/OAuthError.java | 6 +
.../security/oauth2/filters/OAuthScopesFilter.java | 9 +-
.../oauth2/grants/code/JCacheCodeDataProvider.java | 2 +-
.../oauth2/provider/OAuthServiceException.java | 4 +
.../oauth2/client/OAuthClientUtilsTest.java | 48 +-
rt/rs/security/oauth-parent/pom.xml | 2 +-
rt/rs/security/pom.xml | 2 +-
rt/rs/security/sso/oidc/pom.xml | 6 +-
rt/rs/security/sso/saml/pom.xml | 2 +-
.../rs/security/saml/sso/AbstractSSOSpHandler.java | 6 +-
.../saml/sso/SAMLProtocolResponseValidator.java | 30 +-
.../saml/sso/SAMLSSOResponseValidator.java | 36 +-
.../security/saml/sso/SamlPostBindingFilter.java | 6 +-
.../saml/sso/SamlRedirectBindingFilter.java | 6 +-
.../saml/sso/SamlSSOAssertionValidator.java | 14 +-
rt/rs/security/xml/pom.xml | 2 +-
rt/rs/sse/pom.xml | 8 +-
.../java/org/apache/cxf/jaxrs/sse/SseFeature.java | 28 +-
.../jaxrs/sse/client/SseEventSourceImplTest.java | 453 ++++-----
rt/security-saml/pom.xml | 2 +-
rt/security/pom.xml | 2 +-
.../apache/cxf/rt/security/SecurityConstants.java | 24 +-
.../interceptor/ClaimsAuthorizingInterceptor.java | 17 +-
.../ClaimsAuthorizingInterceptorTest.java | 2 +-
rt/transports/http-hc/pom.xml | 2 +-
.../http/asyncclient/AsyncHTTPConduit.java | 12 +
.../asyncclient/CXFHttpAsyncRequestProducer.java | 3 +-
.../http/asyncclient/AsyncHTTPConduitTest.java | 30 +
rt/transports/http-jetty/pom.xml | 2 +-
.../http_jetty/JettyHTTPServerEngine.java | 2 +
rt/transports/http-netty/netty-client/pom.xml | 2 +-
.../http/netty/client/NettyHttpConduit.java | 4 +-
rt/transports/http-netty/netty-server/pom.xml | 2 +-
.../http/netty/server/NettyHttpServletHandler.java | 19 +-
.../server/interceptor/HttpSessionInterceptor.java | 5 +-
.../server/servlet/NettyHttpServletRequest.java | 32 +-
.../netty/server/servlet/NettyServletResponse.java | 27 +-
.../transport/http/netty/server/util/Utils.java | 2 +-
rt/transports/http-undertow/pom.xml | 2 +-
.../http_undertow/UndertowHTTPHandler.java | 7 +-
rt/transports/http/pom.xml | 2 +-
.../cxf/transport/http/HttpConduitFeature.java | 32 +-
.../cxf/transport/http/HttpDestinationFeature.java | 33 +-
.../transport/https/CertConstraintsFeature.java | 96 +-
.../servicelist/FormattedServiceListWriter.java | 53 +-
.../servicelist/UnformattedServiceListWriter.java | 6 +-
rt/transports/jms/pom.xml | 2 +-
.../transport/jms/ConnectionFactoryFeature.java | 66 +-
.../apache/cxf/transport/jms/JMSConfigFeature.java | 79 +-
rt/transports/local/pom.xml | 2 +-
rt/transports/pom.xml | 2 +-
rt/transports/udp/pom.xml | 2 +-
rt/transports/websocket/pom.xml | 2 +-
rt/ws/addr/pom.xml | 2 +-
rt/ws/eventing/pom.xml | 2 +-
rt/ws/mex/pom.xml | 2 +-
rt/ws/policy/pom.xml | 2 +-
.../cxf/ws/policy/PolicyAnnotationListener.java | 8 +-
rt/ws/pom.xml | 2 +-
rt/ws/rm/pom.xml | 2 +-
.../cxf/ws/rm/persistence/jdbc/RMTxStore.java | 52 +-
.../cxf/ws/rm/soap/RetransmissionQueueImpl.java | 2 +-
.../org/apache/cxf/ws/rm/SourceSequenceTest.java | 2 +-
rt/ws/security/pom.xml | 2 +-
.../cxf/ws/security/kerberos/KerberosClient.java | 1 +
.../cxf/ws/security/trust/AbstractSTSClient.java | 34 +-
.../cxf/ws/security/trust/Messages.properties | 1 +
.../apache/cxf/ws/security/trust/STSClient.java | 26 +
.../org/apache/cxf/ws/security/trust/STSUtils.java | 28 +
.../security/wss4j/AbstractWSS4JInterceptor.java | 6 +
.../wss4j/AbstractWSS4JStaxInterceptor.java | 12 +-
.../security/wss4j/AttachmentCallbackHandler.java | 23 +-
rt/ws/transfer/pom.xml | 2 +-
rt/wsdl/pom.xml | 2 +-
.../AbstractEndpointSelectionInterceptor.java | 3 +-
.../wsdl/interceptors/WrappedOutInterceptor.java | 2 +-
.../factory/ReflectionServiceFactoryBean.java | 17 +-
.../apache/cxf/wsdl11/WSDLServiceBuilderTest.java | 2 +-
services/pom.xml | 2 +-
services/sts/pom.xml | 2 +-
services/sts/sts-core/pom.xml | 2 +-
.../apache/cxf/sts/claims/mapper/ClaimUtils.java | 4 +-
.../cxf/sts/token/canceller/SCTCanceller.java | 6 +-
.../cxf/sts/operation/IssueSamlRealmUnitTest.java | 30 +-
services/sts/systests/advanced/pom.xml | 2 +-
.../systest/sts/cross_domain/CrossDomainTest.java | 40 +
.../cxf-client-b.xml} | 10 +-
services/sts/systests/basic/pom.xml | 2 +-
...etrieverTest.java => AbstractSTSTokenTest.java} | 117 +--
.../sts/stsclient/STSTokenOutInterceptorTest.java | 209 +---
.../sts/stsclient/STSTokenRetrieverTest.java | 210 +---
services/sts/systests/pom.xml | 2 +-
services/sts/systests/sts-features/pom.xml | 2 +-
services/sts/systests/sts-itests/pom.xml | 2 +-
.../sts/itests/BasicSTSIntegrationTest.java | 14 +-
.../cxf/systest/sts/itests/unit/STSUnitTest.java | 46 +-
services/sts/systests/sts-osgi/pom.xml | 2 +-
services/ws-discovery/pom.xml | 2 +-
services/ws-discovery/ws-discovery-api/pom.xml | 2 +-
services/ws-discovery/ws-discovery-service/pom.xml | 2 +-
services/wsn/pom.xml | 2 +-
services/wsn/wsn-api/pom.xml | 2 +-
services/wsn/wsn-core/pom.xml | 2 +-
services/wsn/wsn-osgi/pom.xml | 2 +-
services/xkms/pom.xml | 2 +-
services/xkms/xkms-client/pom.xml | 2 +-
services/xkms/xkms-common/pom.xml | 2 +-
services/xkms/xkms-features/pom.xml | 2 +-
services/xkms/xkms-itests/pom.xml | 9 +-
.../cxf/xkms/itests/BasicIntegrationTest.java | 12 +-
services/xkms/xkms-osgi/pom.xml | 2 +-
services/xkms/xkms-service/pom.xml | 2 +-
services/xkms/xkms-war/pom.xml | 2 +-
services/xkms/xkms-x509-handlers/pom.xml | 2 +-
.../xkms/x509/repo/file/FileCertificateRepo.java | 23 +-
.../org/apache/cxf/xkms/x509/utils/X509Utils.java | 11 -
.../xkms/x509/validator/ValidateRequestParser.java | 2 +-
.../x509/repo/file/FileCertificateRepoTest.java | 80 +-
services/xkms/xkms-x509-repo-ldap/pom.xml | 2 +-
.../xkms/x509/repo/ldap/LdapCertificateRepo.java | 26 +-
.../x509/repo/ldap/LDAPCertificateRepoTest.java | 150 ---
.../cxf/xkms/x509/repo/ldap/LDAPSearchTest.java | 51 -
.../cdi/base/tomcat/AbstractTomcatServer.java | 3 +-
systests/cdi/cdi-owb/cdi-multiple-apps-owb/pom.xml | 2 +-
systests/cdi/cdi-owb/cdi-no-apps-owb/pom.xml | 2 +-
systests/cdi/cdi-owb/cdi-producers-owb/pom.xml | 2 +-
systests/cdi/cdi-owb/pom.xml | 8 +-
.../cdi/cdi-weld/cdi-multiple-apps-weld/pom.xml | 2 +-
systests/cdi/cdi-weld/cdi-no-apps-weld/pom.xml | 2 +-
systests/cdi/cdi-weld/cdi-producers-weld/pom.xml | 2 +-
systests/cdi/cdi-weld/pom.xml | 8 +-
systests/cdi/pom.xml | 12 +-
systests/container-integration/grizzly/pom.xml | 2 +-
systests/container-integration/pom.xml | 2 +-
systests/databinding/pom.xml | 2 +-
.../cxf/systest/aegis/AegisClientServerTest.java | 4 -
systests/jaxrs/pom.xml | 22 +-
.../java/org/apache/cxf/systest/jaxrs/Book.java | 40 +-
.../org/apache/cxf/systest/jaxrs/BookStore.java | 80 +-
.../systest/jaxrs/JAXRSClientServerBookTest.java | 36 +
.../jaxrs/JAXRSContinuationsServlet3Test.java | 6 +-
.../jaxrs/failover/AbstractFailoverTest.java | 34 +-
systests/jaxws/pom.xml | 7 +-
.../org/apache/cxf/systest/jaxws/CXF5061Test.java | 4 -
.../cxf/systest/jaxws/ClientServerMiscTest.java | 4 -
.../apache/cxf/systest/jaxws/ClientServerTest.java | 4 +
.../cxf/systest/jaxws/JaxWsDynamicClientTest.java | 9 -
.../apache/cxf/systest/jaxws/OASISCatalogTest.java | 16 +-
.../JavaFirstSchemaValidationTest.java | 6 +-
systests/kerberos/pom.xml | 2 +-
systests/ldap/pom.xml | 8 +-
.../systest/ldap/xkms/LDAPCertificateRepoTest.java | 151 +++
systests/ldap/src/test/resources/ldap.ldif | 5 +
.../org/apache/cxf/systest/ldap/xkms}/cert1.cer | 0
systests/microprofile/client/async/pom.xml | 28 +-
systests/microprofile/client/jaxrs/pom.xml | 48 +-
systests/microprofile/client/tracing/pom.xml | 4 +-
systests/microprofile/client/weld/pom.xml | 6 +-
systests/microprofile/client/weld/testng.xml | 3 +-
systests/microprofile/pom.xml | 71 +-
systests/pom.xml | 2 +-
systests/rs-http-sci/pom.xml | 4 +-
systests/rs-security/pom.xml | 6 +-
.../security/jose/jwejws/JwsHTTPHeaderTest.java | 1 +
.../security/oauth2/common/OAuth2TestUtils.java | 9 +-
.../security/oidc/OIDCDynamicRegistrationTest.java | 44 +-
.../systest/jaxrs/security/oidc/OIDCFlowTest.java | 143 +--
.../jaxrs/security/oidc/OIDCNegativeTest.java | 142 +--
...trationServer.java => SpringBusTestServer.java} | 32 +-
.../systest/jaxrs/security/oidc/UserInfoTest.java | 141 +--
.../cxf/systest/jaxrs/security/oidc/client.xml | 14 +-
...oidc-negative-server-jcache-jwt-non-persist.xml | 10 +-
.../oidc/oidc-negative-server-jcache-jwt.xml | 10 +-
.../security/oidc/oidc-negative-server-jcache.xml | 10 +-
.../security/oidc/oidc-negative-server-jpa.xml | 10 +-
.../jaxrs/security/oidc/oidc-server-dynreg.xml | 8 +-
.../oidc/oidc-server-jcache-jwt-non-persist.xml | 8 +-
.../jaxrs/security/oidc/oidc-server-jcache-jwt.xml | 8 +-
.../jaxrs/security/oidc/oidc-server-jcache.xml | 8 +-
.../jaxrs/security/oidc/oidc-server-jpa.xml | 8 +-
.../userinfo-server-jcache-jwt-non-persist.xml | 12 +-
.../security/oidc/userinfo-server-jcache-jwt.xml | 12 +-
.../jaxrs/security/oidc/userinfo-server-jcache.xml | 12 +-
.../jaxrs/security/oidc/userinfo-server-jpa.xml | 12 +-
systests/rs-sse/pom.xml | 4 +-
systests/rs-sse/rs-sse-base/pom.xml | 2 +-
systests/rs-sse/rs-sse-jetty/pom.xml | 2 +-
systests/rs-sse/rs-sse-tomcat/pom.xml | 2 +-
systests/rs-sse/rs-sse-undertow/pom.xml | 2 +-
systests/tracing/pom.xml | 2 +-
.../org/apache/cxf/systest/jaeger/TestSender.java | 10 +
.../opentracing/OpenTracingTracingTest.java | 44 +-
.../jaxws/tracing/opentracing/BookStore.java | 6 +-
.../opentracing/OpenTracingTracingTest.java | 12 +-
systests/transport-jms/pom.xml | 4 +-
systests/transport-undertow/pom.xml | 7 +-
systests/transports-ssl3/pom.xml | 2 +-
systests/transports/pom.xml | 7 +-
.../apache/cxf/systest/http/HTTPConduitTest.java | 6 +-
.../cxf/systest/https/conduit/HTTPSClientTest.java | 4 +-
.../systest/https/conduit/HTTPSConduitTest.java | 6 +-
.../https/constraints/CertConstraintsTest.java | 4 +-
systests/uncategorized/pom.xml | 6 +-
.../basicDOCBare/PutLastTradedPriceImpl.java | 2 +-
.../apache/cxf/systest/callback/CallbackImpl.java | 2 +-
.../apache/cxf/systest/callback/ServerImpl.java | 2 +-
.../cxf/systest/clustering/GreeterImplA.java | 2 +-
.../cxf/systest/clustering/GreeterImplB.java | 2 +-
.../cxf/systest/clustering/GreeterImplC.java | 2 +-
.../cxf/systest/clustering/GreeterImplD.java | 2 +-
.../cxf/systest/clustering/GreeterImplE.java | 2 +-
.../java/org/apache/cxf/systest/corba/Server.java | 15 +-
.../apache/cxf/systest/corba/ServerTimeout.java | 15 +-
.../factory_pattern/HttpNumberFactoryImpl.java | 2 +-
.../factory_pattern/ManualNumberFactoryImpl.java | 2 +-
.../systest/factory_pattern/NumberFactoryImpl.java | 2 +-
.../org/apache/cxf/systest/fault/GreeterImpl.java | 2 +-
.../cxf/systest/interceptor/GreeterImpl.java | 2 +-
.../cxf/systest/lifecycle/LifeCycleTest.java | 2 +-
.../apache/cxf/systest/mtom/TestMtomJMSImpl.java | 2 +-
.../cxf/systest/nested_callback/CallbackImpl.java | 2 +-
.../cxf/systest/nested_callback/ServerImpl.java | 2 +-
.../outofband/header/OOBHdrServiceImpl.java | 2 +-
.../cxf/systest/outofband/header/Server.java | 2 +-
.../ValidationClientServerTest.java | 12 +-
.../apache/cxf/systest/soap/TransformServer.java | 11 +-
.../org/apache/cxf/systest/soap/XSLTServer.java | 11 +-
.../org/apache/cxf/systest/soap12/GreeterImpl.java | 2 +-
.../cxf/systest/soapfault/SOAPFaultImpl.java | 2 +-
.../systest/soapfault/details/GreeterImpl12.java | 2 +-
.../systest/type_test/AbstractTypeTestClient.java | 6 +-
.../systest/type_test/AbstractTypeTestClient2.java | 25 +-
.../type_test/corba/CORBADocLitClientTypeTest.java | 339 ++++---
.../type_test/soap/SOAPDocLitClientTypeTest.java | 8 +-
.../type_test/soap/SOAPDocLitServerImpl.java | 2 +-
.../type_test/soap/SOAPRpcLitClientTypeTest.java | 2 +-
.../type_test/soap/SOAPRpcLitServerImpl.java | 2 +-
.../systest/type_test/xml/XMLClientTypeTest.java | 2 +-
.../cxf/systest/type_test/xml/XMLServerImpl.java | 2 +-
.../org/apache/cxf/systest/soap/client.xml | 15 +-
systests/ws-rm/pom.xml | 2 +-
.../ws/rm/AbstractClientPersistenceTest.java | 14 +-
.../ws/rm/AbstractServerPersistenceTest.java | 2 +-
systests/ws-security-examples/pom.xml | 2 +-
systests/ws-security/pom.xml | 2 +-
.../apache/cxf/systest/ws/action/ActionTest.java | 52 +
.../security/handler/UsernamePasswordCallback.java | 4 +-
.../org/apache/cxf/systest/ws/xkms/XKMSTest.java | 90 +-
.../ws/security/handler/Client_Encrypt.properties | 23 -
.../ws/security/handler/Client_Sign.properties | 24 -
.../ws/security/handler/Server_Decrypt.properties | 23 -
.../ws/security/handler/Server_SignVerf.properties | 23 -
.../ws/security/handler/client-keystore.jks | Bin 1344 -> 0 bytes
.../ws/security/handler/client-truststore.jks | Bin 639 -> 0 bytes
.../cxf/systest/ws/security/handler/client.xml | 6 +-
.../ws/security/handler/server-keystore.jks | Bin 1345 -> 0 bytes
.../ws/security/handler/server-truststore.jks | Bin 639 -> 0 bytes
.../cxf/systest/ws/security/handler/server.xml | 6 +-
.../org/apache/cxf/systest/ws/x509/server.xml | 3 +-
.../org/apache/cxf/systest/ws/xkms/xkms-server.xml | 10 +-
.../org/apache/cxf/systest/ws/xkms/xkmstest.cer | Bin 0 -> 709 bytes
systests/ws-specs/pom.xml | 2 +-
systests/ws-transfer/pom.xml | 2 +-
.../wsdl_maven/codegen/src/it/cxf-4004/pom.xml | 2 +-
.../wsdl_maven/codegen/src/it/it-parent/pom.xml | 4 +-
systests/wsdl_maven/pom.xml | 2 +-
testutils/pom.xml | 2 +-
.../greeter_control/FaultThrowingInterceptor.java | 7 +-
.../wsdl/type_test/type_test_tester_java.xsl | 2 -
tools/common/pom.xml | 2 +-
.../apache/cxf/tools/common/ProcessorTestBase.java | 9 -
.../java/org/apache/cxf/tools/util/JAXBUtils.java | 14 +-
tools/corba/pom.xml | 2 +-
tools/javato/pom.xml | 2 +-
tools/javato/ws/pom.xml | 2 +-
.../java2wsdl/generator/wsdl11/BeanGenerator.java | 2 +-
.../java2js/processor/JavaToJSProcessorTest.java | 3 -
.../generator/wsdl11/FaultBeanGeneratorTest.java | 19 +-
.../generator/wsdl11/WrapperBeanGeneratorTest.java | 3 -
.../java2wsdl/processor/JavaToProcessorTest.java | 4 -
tools/pom.xml | 2 +-
tools/validator/pom.xml | 2 +-
tools/wadlto/jaxrs/pom.xml | 2 +-
tools/wadlto/pom.xml | 2 +-
tools/wsdlto/core/pom.xml | 2 +-
.../cxf/tools/wsdlto/WSDLToJavaContainer.java | 34 +-
.../apache/cxf/tools/wsdlto/core/PluginLoader.java | 39 +-
tools/wsdlto/databinding/jaxb/pom.xml | 2 +-
tools/wsdlto/frontend/javascript/pom.xml | 2 +-
tools/wsdlto/frontend/jaxws/pom.xml | 2 +-
tools/wsdlto/misc/pom.xml | 2 +-
tools/wsdlto/pom.xml | 2 +-
tools/wsdlto/test/pom.xml | 2 +-
.../cxf/tools/wsdlto/AbstractCodeGenTest.java | 4 -
631 files changed, 6968 insertions(+), 6457 deletions(-)
copy core/src/main/java/org/apache/cxf/feature/{AbstractFeature.java => AbstractPortableFeature.java} (62%)
create mode 100644 core/src/main/java/org/apache/cxf/feature/DelegatingFeature.java
create mode 100644 core/src/test/java/org/apache/cxf/attachment/LazyDataSourceTest.java
copy testutils/src/main/java/org/apache/cxf/customer/book/Book.java => core/src/test/java/org/apache/cxf/service/invoker/PooledFactoryTest.java (65%)
copy integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/{TraceScope.java => ScopedSpan.java} (79%)
create mode 100644 maven-plugins/java2wadl-plugin/src/main/java13/org/apache/cxf/maven_plugin/javatowadl/DumpJavaDoc.java
delete mode 100644 rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java
delete mode 100644 rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiFeature.java
delete mode 100644 rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerProperties.java
delete mode 100644 rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerUi.java
copy rt/{frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfoTest.java => rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectProviderTest.java} (52%)
copy rt/{frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/AbstractStreamingResponseExtension.java => rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileServiceFactoryBean.java} (55%)
copy services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/{soap12/cxf-client.xml => cross_domain/cxf-client-b.xml} (91%)
copy services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/{STSTokenRetrieverTest.java => AbstractSTSTokenTest.java} (66%)
delete mode 100644 services/xkms/xkms-x509-repo-ldap/src/test/java/org/apache/cxf/xkms/x509/repo/ldap/LDAPCertificateRepoTest.java
delete mode 100644 services/xkms/xkms-x509-repo-ldap/src/test/java/org/apache/cxf/xkms/x509/repo/ldap/LDAPSearchTest.java
create mode 100644 systests/ldap/src/test/java/org/apache/cxf/systest/ldap/xkms/LDAPCertificateRepoTest.java
rename {services/xkms/xkms-x509-repo-ldap/src/test/resources => systests/ldap/src/test/resources/org/apache/cxf/systest/ldap/xkms}/cert1.cer (100%)
rename systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oidc/{OIDCDynRegistrationServer.java => SpringBusTestServer.java} (61%)
delete mode 100644 systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/security/handler/Client_Encrypt.properties
delete mode 100644 systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/security/handler/Client_Sign.properties
delete mode 100644 systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/security/handler/Server_Decrypt.properties
delete mode 100644 systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/security/handler/Server_SignVerf.properties
delete mode 100644 systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/security/handler/client-keystore.jks
delete mode 100644 systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/security/handler/client-truststore.jks
delete mode 100644 systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/security/handler/server-keystore.jks
delete mode 100644 systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/security/handler/server-truststore.jks
create mode 100644 systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/xkms/xkmstest.cer
[cxf] 01/08: [CXF-7601] Add support for Microprofile OpenAPI
implementation (as an alternative to Swagger Core 2.0)
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch CXF-7601_microProfileOpenApi
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 7b333d06910b3d4a84dd77a3c76b48d1b44525b3
Author: Dennis Kieselhorst <de...@apache.org>
AuthorDate: Wed Jan 23 14:41:54 2019 +0100
[CXF-7601] Add support for Microprofile OpenAPI implementation (as an alternative to Swagger Core 2.0)
---
rt/rs/description-microprofile-openapi/pom.xml | 99 +++++
.../cxf/jaxrs/mpopenapi/OpenApiEndpoint.java | 43 ++
.../apache/cxf/jaxrs/mpopenapi/OpenApiFeature.java | 474 +++++++++++++++++++++
.../cxf/jaxrs/mpopenapi/SwaggerProperties.java | 69 +++
.../org/apache/cxf/jaxrs/mpopenapi/SwaggerUi.java | 47 ++
rt/rs/pom.xml | 1 +
6 files changed, 733 insertions(+)
diff --git a/rt/rs/description-microprofile-openapi/pom.xml b/rt/rs/description-microprofile-openapi/pom.xml
new file mode 100644
index 0000000..e505aad
--- /dev/null
+++ b/rt/rs/description-microprofile-openapi/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>cxf-rt-rs-service-description-microprofile-openapi</artifactId>
+ <packaging>jar</packaging>
+ <name>Apache CXF JAX-RS Service Description Microprofile OpenAPI</name>
+ <description>Apache CXF JAX-RS Service Description Microprofile OpenAPI</description>
+ <url>http://cxf.apache.org</url>
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../../../parent/pom.xml</relativePath>
+ </parent>
+ <properties>
+ <cxf.module.name>org.apache.cxf.rs.openapi.microprofile</cxf.module.name>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${cxf.servlet-api.group}</groupId>
+ <artifactId>${cxf.servlet-api.artifact}</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-service-description-swagger-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-json-basic</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.microprofile.openapi</groupId>
+ <artifactId>microprofile-openapi-api</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo</groupId>
+ <artifactId>geronimo-openapi-impl</artifactId>
+ <version>1.0.5-SNAPSHOT</version>
+ </dependency>
+ <!--<dependency>-->
+ <!--<groupId>org.apache.geronimo.specs</groupId>-->
+ <!--<artifactId>geronimo-jsonb_1.0_spec</artifactId>-->
+ <!--<version>1.0</version>-->
+ <!--<scope>compile</scope>-->
+ <!--</dependency>-->
+ <!--<dependency>-->
+ <!--<groupId>org.apache.geronimo.specs</groupId>-->
+ <!--<artifactId>geronimo-json_1.1_spec</artifactId>-->
+ <!--<version>1.0</version>-->
+ <!--<scope>compile</scope>-->
+ <!--</dependency>-->
+ <!--<dependency>-->
+ <!--<groupId>org.apache.johnzon</groupId>-->
+ <!--<artifactId>johnzon-jsonb</artifactId>-->
+ <!--<version>${cxf.johnzon.version}</version>-->
+ <!--</dependency>-->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java
new file mode 100644
index 0000000..6b82611
--- /dev/null
+++ b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.mpopenapi;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.geronimo.microprofile.openapi.jaxrs.OpenAPIEndpoint;
+import org.eclipse.microprofile.openapi.models.OpenAPI;
+
+@Path("/openapi.{type:json|yaml}")
+public class OpenApiEndpoint extends OpenAPIEndpoint {
+ private OpenAPI openApi;
+
+ public OpenApiEndpoint(OpenAPI openApi) {
+ this.openApi = openApi;
+ }
+
+ @Override
+ @GET
+ @Produces({MediaType.APPLICATION_JSON, "application/yaml"})
+ public OpenAPI get() {
+ return openApi;
+ }
+}
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiFeature.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiFeature.java
new file mode 100644
index 0000000..c65fd9b
--- /dev/null
+++ b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiFeature.java
@@ -0,0 +1,474 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.mpopenapi;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.ws.rs.core.Application;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.annotations.Provider;
+import org.apache.cxf.annotations.Provider.Scope;
+import org.apache.cxf.annotations.Provider.Type;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.jaxrs.JAXRSServiceFactoryBean;
+import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
+import org.apache.cxf.jaxrs.model.ApplicationInfo;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
+import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
+import org.apache.cxf.jaxrs.swagger.ui.SwaggerUiConfig;
+import org.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport;
+import org.apache.geronimo.microprofile.openapi.config.GeronimoOpenAPIConfig;
+import org.apache.geronimo.microprofile.openapi.impl.model.ContactImpl;
+import org.apache.geronimo.microprofile.openapi.impl.model.InfoImpl;
+import org.apache.geronimo.microprofile.openapi.impl.model.LicenseImpl;
+import org.apache.geronimo.microprofile.openapi.impl.model.OpenAPIImpl;
+import org.apache.geronimo.microprofile.openapi.impl.processor.AnnotationProcessor;
+import org.apache.geronimo.microprofile.openapi.impl.processor.reflect.ClassElement;
+import org.apache.geronimo.microprofile.openapi.impl.processor.reflect.MethodElement;
+import org.apache.geronimo.microprofile.openapi.impl.processor.spi.NamingStrategy;
+import org.eclipse.microprofile.openapi.models.OpenAPI;
+
+
+@Provider(value = Type.Feature, scope = Scope.Server)
+public class OpenApiFeature extends AbstractFeature implements SwaggerUiSupport, SwaggerProperties {
+ private static final Logger LOG = LogUtils.getL7dLogger(OpenApiFeature.class);
+
+ private static final String DEFAULT_PROPS_LOCATION = "/swagger.properties";
+
+ private String version;
+ private String title;
+ private String description;
+ private String contactName;
+ private String contactEmail;
+ private String contactUrl;
+ private String license;
+ private String licenseUrl;
+ private String termsOfServiceUrl;
+ // Read all operations also with no @Operation
+ private boolean readAllResources = true;
+ // Scan all JAX-RS resources automatically
+ private boolean scan = true;
+ private boolean prettyPrint = true;
+ private boolean runAsFilter;
+ private Collection<String> ignoredRoutes;
+ private Set<String> resourcePackages;
+ private Set<String> resourceClasses;
+ private String filterClass;
+
+ private Boolean supportSwaggerUi;
+ private String swaggerUiVersion;
+ private String swaggerUiMavenGroupAndArtifact;
+ private Map<String, String> swaggerUiMediaTypes;
+
+ // Allows to pass the configuration location, usually openapi-configuration.json
+ // or openapi-configuration.yml file.
+ private String configLocation;
+ // Allows to pass the properties location, by default swagger.properties
+ private String propertiesLocation = DEFAULT_PROPS_LOCATION;
+ // Allows to disable automatic scan of known configuration locations (enabled by default)
+ private boolean scanKnownConfigLocations = true;
+ // Swagger UI configuration parameters (to be passed as query string).
+ private SwaggerUiConfig swaggerUiConfig;
+
+ protected static class DefaultApplication extends Application {
+
+ private final Set<Class<?>> serviceClasses;
+
+ DefaultApplication(final List<ClassResourceInfo> cris, final Set<String> resourcePackages) {
+ this.serviceClasses = cris.stream().map(ClassResourceInfo::getServiceClass).
+ filter(cls -> (resourcePackages == null || resourcePackages.isEmpty()) || resourcePackages.stream().
+ anyMatch(pkg -> cls.getPackage().getName().startsWith(pkg))).collect(Collectors.toSet());
+ }
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ return serviceClasses;
+ }
+ }
+
+ @Override
+ public void initialize(Server server, Bus bus) {
+ final JAXRSServiceFactoryBean sfb = (JAXRSServiceFactoryBean)server
+ .getEndpoint()
+ .get(JAXRSServiceFactoryBean.class.getName());
+
+ final ServerProviderFactory factory = (ServerProviderFactory)server
+ .getEndpoint()
+ .get(ServerProviderFactory.class.getName());
+
+ final Set<String> packages = new HashSet<>();
+ if (resourcePackages != null) {
+ packages.addAll(resourcePackages);
+ }
+
+ final Application application = getApplicationOrDefault(server, factory, sfb, bus);
+
+ final AnnotationProcessor processor = new AnnotationProcessor(GeronimoOpenAPIConfig.create(),
+ new NamingStrategy.Http());
+
+ final OpenAPIImpl api = new OpenAPIImpl();
+
+ if (isScan()) {
+ packages.addAll(scanResourcePackages(sfb));
+ }
+ if (application != null) {
+ processor.processApplication(api, new ClassElement(application.getClass()));
+ LOG.fine("Processed application " + application);
+ }
+ Set<Class<?>> endpointClasses = sfb
+ .getClassResourceInfo()
+ .stream()
+ .map(AbstractResourceInfo::getServiceClass)
+ .collect(Collectors.toSet());
+ if (!endpointClasses.isEmpty()) {
+ final String binding = application == null ? "" : processor.getApplicationBinding(application.getClass());
+ endpointClasses.stream()
+ .peek(c -> LOG.info("Processing class " + c.getName()))
+ .forEach(c -> processor.processClass(
+ binding, api, new ClassElement(c),
+ Stream.of(c.getMethods()).map(MethodElement::new)));
+ } else {
+ LOG.warning("No <endpointClasses> registered, your OpenAPI will be empty.");
+ }
+ Properties swaggerProps = getSwaggerProperties(propertiesLocation, bus);
+ if (api.getInfo() == null) {
+ api.setInfo(getInfo(swaggerProps));
+ }
+
+ registerOpenApiResources(sfb, api);
+ registerSwaggerUiResources(sfb, swaggerProps, factory, bus);
+ }
+
+ public boolean isScan() {
+ return scan;
+ }
+
+ public void setScan(boolean scan) {
+ this.scan = scan;
+ }
+
+ public String getFilterClass() {
+ return filterClass;
+ }
+
+ public void setFilterClass(String filterClass) {
+ this.filterClass = filterClass;
+ }
+
+ public Set<String> getResourcePackages() {
+ return resourcePackages;
+ }
+
+ public void setResourcePackages(Set<String> resourcePackages) {
+ this.resourcePackages = (resourcePackages == null) ? null : new HashSet<>(resourcePackages);
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getContactName() {
+ return contactName;
+ }
+
+ public void setContactName(String contactName) {
+ this.contactName = contactName;
+ }
+
+ public String getContactEmail() {
+ return contactEmail;
+ }
+
+ public void setContactEmail(String contactEmail) {
+ this.contactEmail = contactEmail;
+ }
+
+ public String getContactUrl() {
+ return contactUrl;
+ }
+
+ public void setContactUrl(String contactUrl) {
+ this.contactUrl = contactUrl;
+ }
+
+ public String getLicense() {
+ return license;
+ }
+
+ public void setLicense(String license) {
+ this.license = license;
+ }
+
+ public String getLicenseUrl() {
+ return licenseUrl;
+ }
+
+ public void setLicenseUrl(String licenseUrl) {
+ this.licenseUrl = licenseUrl;
+ }
+
+ public String getTermsOfServiceUrl() {
+ return termsOfServiceUrl;
+ }
+
+ public void setTermsOfServiceUrl(String termsOfServiceUrl) {
+ this.termsOfServiceUrl = termsOfServiceUrl;
+ }
+
+ public boolean isReadAllResources() {
+ return readAllResources;
+ }
+
+ public void setReadAllResources(boolean readAllResources) {
+ this.readAllResources = readAllResources;
+ }
+
+ public Set<String> getResourceClasses() {
+ return resourceClasses;
+ }
+
+ public void setResourceClasses(Set<String> resourceClasses) {
+ this.resourceClasses = (resourceClasses == null) ? null : new HashSet<>(resourceClasses);
+ }
+
+ public Collection<String> getIgnoredRoutes() {
+ return ignoredRoutes;
+ }
+
+ public void setIgnoredRoutes(Collection<String> ignoredRoutes) {
+ this.ignoredRoutes = (ignoredRoutes == null) ? null : new HashSet<>(ignoredRoutes);
+ }
+
+ public boolean isPrettyPrint() {
+ return prettyPrint;
+ }
+
+ public void setPrettyPrint(boolean prettyPrint) {
+ this.prettyPrint = prettyPrint;
+ }
+
+ public boolean isRunAsFilter() {
+ return runAsFilter;
+ }
+
+ @Override
+ public Boolean isSupportSwaggerUi() {
+ return supportSwaggerUi;
+ }
+
+ public void setSupportSwaggerUi(Boolean supportSwaggerUi) {
+ this.supportSwaggerUi = supportSwaggerUi;
+ }
+
+ public String getSwaggerUiVersion() {
+ return swaggerUiVersion;
+ }
+
+ public void setSwaggerUiVersion(String swaggerUiVersion) {
+ this.swaggerUiVersion = swaggerUiVersion;
+ }
+
+ public String getSwaggerUiMavenGroupAndArtifact() {
+ return swaggerUiMavenGroupAndArtifact;
+ }
+
+ public void setSwaggerUiMavenGroupAndArtifact(
+ String swaggerUiMavenGroupAndArtifact) {
+ this.swaggerUiMavenGroupAndArtifact = swaggerUiMavenGroupAndArtifact;
+ }
+
+ @Override
+ public Map<String, String> getSwaggerUiMediaTypes() {
+ return swaggerUiMediaTypes;
+ }
+
+ public void setSwaggerUiMediaTypes(Map<String, String> swaggerUiMediaTypes) {
+ this.swaggerUiMediaTypes = swaggerUiMediaTypes;
+ }
+
+ public String getConfigLocation() {
+ return configLocation;
+ }
+
+ public void setConfigLocation(String configLocation) {
+ this.configLocation = configLocation;
+ }
+
+ public String getPropertiesLocation() {
+ return propertiesLocation;
+ }
+
+ public void setPropertiesLocation(String propertiesLocation) {
+ this.propertiesLocation = propertiesLocation;
+ }
+
+ public void setRunAsFilter(boolean runAsFilter) {
+ this.runAsFilter = runAsFilter;
+ }
+
+ public void setScanKnownConfigLocations(boolean scanKnownConfigLocations) {
+ this.scanKnownConfigLocations = scanKnownConfigLocations;
+ }
+
+ public boolean isScanKnownConfigLocations() {
+ return scanKnownConfigLocations;
+ }
+
+ public void setSwaggerUiConfig(final SwaggerUiConfig swaggerUiConfig) {
+ this.swaggerUiConfig = swaggerUiConfig;
+ }
+
+ @Override
+ public SwaggerUiConfig getSwaggerUiConfig() {
+ return swaggerUiConfig;
+ }
+
+ @Override
+ public String findSwaggerUiRoot() {
+ return SwaggerUi.findSwaggerUiRoot(swaggerUiMavenGroupAndArtifact, swaggerUiVersion);
+ }
+
+ protected Properties getUserProperties(final Map<String, Object> userDefinedOptions) {
+ final Properties properties = new Properties();
+
+ if (userDefinedOptions != null) {
+ userDefinedOptions
+ .entrySet()
+ .stream()
+ .filter(entry -> entry.getValue() != null)
+ .forEach(entry -> properties.setProperty(entry.getKey(), entry.getValue().toString()));
+ }
+
+ return properties;
+ }
+
+ protected void registerOpenApiResources(
+ final JAXRSServiceFactoryBean sfb,
+ final OpenAPI openApiDefinition) {
+
+ sfb.setResourceClassesFromBeans(Collections.singletonList(new OpenApiEndpoint(openApiDefinition)));
+ }
+
+ protected void registerSwaggerUiResources(JAXRSServiceFactoryBean sfb, Properties properties,
+ ServerProviderFactory factory, Bus bus) {
+
+ final Registration swaggerUiRegistration = getSwaggerUi(bus, properties, isRunAsFilter());
+
+ if (!isRunAsFilter()) {
+ sfb.setResourceClassesFromBeans(swaggerUiRegistration.getResources());
+ }
+
+ factory.setUserProviders(swaggerUiRegistration.getProviders());
+ }
+
+ /**
+ * Detects the application (if present) or creates the default application (in case the scan is disabled).
+ */
+ protected Application getApplicationOrDefault(
+ final Server server,
+ final ServerProviderFactory factory,
+ final JAXRSServiceFactoryBean sfb,
+ final Bus bus) {
+
+ ApplicationInfo appInfo = null;
+ if (!isScan()) {
+ appInfo = factory.getApplicationProvider();
+
+ if (appInfo == null) {
+ appInfo = new ApplicationInfo(
+ new DefaultApplication(sfb.getClassResourceInfo(), resourcePackages), bus);
+ server.getEndpoint().put(Application.class.getName(), appInfo);
+ }
+ }
+
+ return (appInfo == null) ? null : appInfo.getProvider();
+ }
+
+ /**
+ * The info will be used only if there is no @OpenAPIDefinition annotation is present.
+ */
+ private org.eclipse.microprofile.openapi.models.info.Info getInfo(final Properties properties) {
+ org.eclipse.microprofile.openapi.models.info.Info info = new InfoImpl()
+ .title(getOrFallback(getTitle(), properties, TITLE_PROPERTY))
+ .version(getOrFallback(getVersion(), properties, VERSION_PROPERTY))
+ .description(getOrFallback(getDescription(), properties, DESCRIPTION_PROPERTY))
+ .termsOfService(getOrFallback(getTermsOfServiceUrl(), properties, TERMS_URL_PROPERTY))
+ .contact(new ContactImpl()
+ .name(getOrFallback(getContactName(), properties, CONTACT_PROPERTY))
+ .email(getContactEmail())
+ .url(getContactUrl()));
+
+ String licenseName = getOrFallback(getLicense(), properties, LICENSE_PROPERTY);
+ if (licenseName != null) {
+ info = info.license(new LicenseImpl()
+ .name(getOrFallback(getLicense(), properties, LICENSE_PROPERTY))
+ .url(getOrFallback(getLicenseUrl(), properties, LICENSE_URL_PROPERTY)));
+ }
+ return info;
+ }
+
+ private String getOrFallback(String value, Properties properties, String property) {
+ if (value == null && properties != null) {
+ return properties.getProperty(property);
+ } else {
+ return value;
+ }
+ }
+
+ private Collection<String> scanResourcePackages(JAXRSServiceFactoryBean sfb) {
+ return sfb
+ .getClassResourceInfo()
+ .stream()
+ .map(cri -> cri.getServiceClass().getPackage().getName())
+ .collect(Collectors.toSet());
+ }
+
+}
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerProperties.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerProperties.java
new file mode 100644
index 0000000..c4b4c2a
--- /dev/null
+++ b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerProperties.java
@@ -0,0 +1,69 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.mpopenapi;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.jaxrs.utils.ResourceUtils;
+
+interface SwaggerProperties {
+ String RESOURCE_PACKAGE_PROPERTY = "resource.package";
+ String TITLE_PROPERTY = "title";
+ String VERSION_PROPERTY = "version";
+ String DESCRIPTION_PROPERTY = "description";
+ String CONTACT_PROPERTY = "contact";
+ String LICENSE_PROPERTY = "license";
+ String LICENSE_URL_PROPERTY = "license.url";
+ String TERMS_URL_PROPERTY = "terms.url";
+ String PRETTY_PRINT_PROPERTY = "pretty.print";
+ String FILTER_CLASS_PROPERTY = "filter.class";
+
+ /**
+ * Read the Swagger-specific properties from the property file (to seamlessly
+ * support the migration from older Swagger features).
+ * @param location property file location
+ * @param bus bus instance
+ * @return the properties if available
+ */
+ default Properties getSwaggerProperties(String location, Bus bus) {
+ InputStream is = ResourceUtils.getClasspathResourceStream(location, SwaggerProperties.class, bus);
+ Properties props = null;
+
+ if (is != null) {
+ props = new Properties();
+ try {
+ props.load(is);
+ } catch (IOException ex) {
+ props = null;
+ } finally {
+ try {
+ is.close();
+ } catch (IOException ignore) {
+ // ignore
+ }
+ }
+ }
+
+ return props;
+ }
+}
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerUi.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerUi.java
new file mode 100644
index 0000000..f796dfb
--- /dev/null
+++ b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerUi.java
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.mpopenapi;
+
+import org.apache.cxf.jaxrs.swagger.ui.SwaggerUiResolver;
+
+/**
+ * SwaggerUI resolvers implementation for OpenAPI
+ */
+public final class SwaggerUi {
+ private static final SwaggerUiResolver HELPER;
+
+ static {
+ HELPER = new SwaggerUiResolver(OpenApiFeature.class.getClassLoader());
+ }
+
+ private SwaggerUi() {
+ }
+
+ public static String findSwaggerUiRoot(String swaggerUiMavenGroupAndArtifact,
+ String swaggerUiVersion) {
+ String root = HELPER.findSwaggerUiRootInternal(swaggerUiMavenGroupAndArtifact,
+ swaggerUiVersion);
+ if (root == null && HELPER.getClass() != SwaggerUiResolver.class) {
+ root = new SwaggerUiResolver(OpenApiFeature.class.getClassLoader())
+ .findSwaggerUiRootInternal(swaggerUiMavenGroupAndArtifact, swaggerUiVersion);
+ }
+ return root;
+ }
+}
diff --git a/rt/rs/pom.xml b/rt/rs/pom.xml
index 7dfbf5b..9dd53ba 100644
--- a/rt/rs/pom.xml
+++ b/rt/rs/pom.xml
@@ -44,6 +44,7 @@
<module>security</module>
<module>sse</module>
<module>description-openapi-v3</module>
+ <module>description-microprofile-openapi</module>
<module>description-swagger-ui</module>
<module>microprofile-client</module>
<module>description-common-openapi</module>
[cxf] 03/08: update to latest geronimo-openapi-impl release
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch CXF-7601_microProfileOpenApi
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 3886940ff54ca85aa989296b0c11f4941ccc5faa
Author: Dennis Kieselhorst <de...@apache.org>
AuthorDate: Fri Feb 8 11:33:46 2019 +0100
update to latest geronimo-openapi-impl release
---
rt/rs/description-microprofile-openapi/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rt/rs/description-microprofile-openapi/pom.xml b/rt/rs/description-microprofile-openapi/pom.xml
index c652843..8373cfd 100644
--- a/rt/rs/description-microprofile-openapi/pom.xml
+++ b/rt/rs/description-microprofile-openapi/pom.xml
@@ -70,7 +70,7 @@
<dependency>
<groupId>org.apache.geronimo</groupId>
<artifactId>geronimo-openapi-impl</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.5</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.geronimo.specs</groupId>-->
[cxf] 05/08: Rebased against latest master,
added a sample project for OpenAPI v3.0 using microprofile
implementation
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch CXF-7601_microProfileOpenApi
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 5aa0660a9fe324e5c8f36e47e270971d0e85b6f8
Author: reta <dr...@gmail.com>
AuthorDate: Sat Mar 30 18:31:26 2019 -0400
Rebased against latest master, added a sample project for OpenAPI v3.0 using microprofile implementation
---
.../README.txt | 32 ++++
.../pom.xml | 100 +++++++++++++
.../java/demo/jaxrs/openapi/server/AppConfig.java | 35 +++++
.../main/java/demo/jaxrs/openapi/server/Item.java | 40 ++---
.../java/demo/jaxrs/openapi/server/Sample.java | 161 +++++++++++++++++++++
.../java/demo/jaxrs/openapi/server/Server.java | 30 ++--
.../resources/META-INF/cxf/org.apache.cxf.Logger | 1 +
.../src/main/resources/logback.xml | 16 ++
distribution/src/main/release/samples/pom.xml | 1 +
parent/pom.xml | 19 ++-
rt/rs/description-microprofile-openapi/pom.xml | 17 ++-
.../openapi}/OpenApiEndpoint.java | 2 +-
.../openapi}/OpenApiFeature.java | 103 ++++++-------
.../openapi}/SwaggerUi.java | 2 +-
.../cxf/jaxrs/mpopenapi/SwaggerProperties.java | 69 ---------
15 files changed, 457 insertions(+), 171 deletions(-)
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt
new file mode 100644
index 0000000..ac8ab9b
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt
@@ -0,0 +1,32 @@
+JAX-RS Swagger2Feature Spring Demo
+=================
+
+The demo shows a basic usage of OpenAPI v3.0 API documentation with REST based Web Services using
+JAX-RS 2.0 (JSR-339) and Microprofile implementation.
+
+Building and running the demo using Maven
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the Maven pom.xml file can be used to build and run the demo.
+
+
+Using either UNIX or Windows:
+
+ mvn install
+ mvn -Pserver (from one command line window)
+
+
+After the service is started, the Swagger API documents in JSON and YAML
+are available at
+
+ http://localhost:9000/sample/openapi.json
+ http://localhost:9000/sample/openapi.yaml
+
+To remove the target dir, run mvn clean".
+
+To navigate to the hosted Swagger UI, please type in the browser:
+
+ http://localhost:9000/sample/api-docs/?url=/sample/openapi.json
+
+
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml
new file mode 100644
index 0000000..f44cbe6
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jax_rs_description_openapi_microprofile_spring</artifactId>
+ <name>JAX-RS OpenAPI v3.0 Microprofile Implementation and Spring Demo</name>
+ <description>JAX-RS OpenAPI v3.0 Microprofile Implementation and Spring Demo</description>
+ <parent>
+ <groupId>org.apache.cxf.samples</groupId>
+ <artifactId>cxf-samples</artifactId>
+ <version>3.3.2-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <properties>
+ <cxf.version>${project.version}</cxf.version>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>server</id>
+ <build>
+ <defaultGoal>test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>demo.jaxrs.openapi.server.Server</mainClass>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ </dependency>
+ <!-- This dependency is needed if you're using the Jetty container -->
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http-jetty</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-service-description-microprofile-openapi</artifactId>
+ <version>3.3.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.johnzon</groupId>
+ <artifactId>johnzon-jsonb</artifactId>
+ <version>1.1.11</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>swagger-ui</artifactId>
+ <version>3.20.9</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java
new file mode 100644
index 0000000..a5c039a
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java
@@ -0,0 +1,35 @@
+package demo.jaxrs.openapi.server;
+
+import java.util.Arrays;
+
+import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
+import org.apache.cxf.jaxrs.microprofile.openapi.OpenApiFeature;
+import org.apache.johnzon.jaxrs.jsonb.jaxrs.JsonbJaxrsProvider;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class AppConfig {
+ @Bean
+ OpenApiFeature openApiFeature() {
+ final OpenApiFeature openApiFeature = new OpenApiFeature();
+ openApiFeature.setTitle("Sample REST Application");
+ openApiFeature.setScan(false);
+ return openApiFeature;
+ }
+
+ @Bean
+ Sample sampleResource() {
+ return new Sample();
+ }
+
+ @Bean
+ org.apache.cxf.endpoint.Server server() {
+ final JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean ();
+ factory.setFeatures(Arrays.asList(openApiFeature()));
+ factory.setServiceBean(sampleResource());
+ factory.setAddress("http://localhost:9000/sample");
+ factory.setProvider(new JsonbJaxrsProvider<>());
+ return factory.create();
+ }
+}
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Item.java
similarity index 57%
copy from rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java
copy to distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Item.java
index 6b82611..7a32208 100644
--- a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Item.java
@@ -16,28 +16,34 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.jaxrs.mpopenapi;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
+package demo.jaxrs.openapi.server;
-import org.apache.geronimo.microprofile.openapi.jaxrs.OpenAPIEndpoint;
-import org.eclipse.microprofile.openapi.models.OpenAPI;
+public class Item {
+ private String name;
+ private String value;
-@Path("/openapi.{type:json|yaml}")
-public class OpenApiEndpoint extends OpenAPIEndpoint {
- private OpenAPI openApi;
+ public Item() {
+ }
+
+ public Item(final String name, final String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
- public OpenApiEndpoint(OpenAPI openApi) {
- this.openApi = openApi;
+ public String getValue() {
+ return value;
}
- @Override
- @GET
- @Produces({MediaType.APPLICATION_JSON, "application/yaml"})
- public OpenAPI get() {
- return openApi;
+ public void setValue(String value) {
+ this.value = value;
}
}
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Sample.java b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Sample.java
new file mode 100644
index 0000000..64bd691
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Sample.java
@@ -0,0 +1,161 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.jaxrs.openapi.server;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import javax.ws.rs.core.UriInfo;
+
+import org.eclipse.microprofile.openapi.annotations.Operation;
+import org.eclipse.microprofile.openapi.annotations.enums.ParameterIn;
+import org.eclipse.microprofile.openapi.annotations.enums.SchemaType;
+import org.eclipse.microprofile.openapi.annotations.headers.Header;
+import org.eclipse.microprofile.openapi.annotations.media.Content;
+import org.eclipse.microprofile.openapi.annotations.media.Schema;
+import org.eclipse.microprofile.openapi.annotations.parameters.Parameter;
+import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
+import org.eclipse.microprofile.openapi.annotations.responses.APIResponses;
+
+
+@Path("/sample")
+public class Sample {
+ private Map<String, Item> items;
+
+ public Sample() {
+ items = Collections.synchronizedMap(new TreeMap<String, Item>(String.CASE_INSENSITIVE_ORDER));
+ items.put("Item 1", new Item("Item 1", "Value 1"));
+ items.put("Item 2", new Item("Item 2", "Value 2"));
+ }
+
+ @Produces({ MediaType.APPLICATION_JSON })
+ @GET
+ @Operation(
+ summary = "Get all items",
+ description = "Get operation with Response and @Default value"
+ )
+ @APIResponses(
+ @APIResponse(
+ content = @Content(schema = @Schema(implementation = Item.class, type = SchemaType.ARRAY)),
+ responseCode = "200"
+ )
+ )
+ public Response getItems(@Parameter(required = true) @QueryParam("page") @DefaultValue("1") int page) {
+ return Response.ok(items.values()).build();
+ }
+
+ @Produces({ MediaType.APPLICATION_JSON })
+ @Path("/{name}")
+ @GET
+ @Operation(
+ summary = "Get item by name",
+ description = "Get operation with type and headers"
+ )
+ @APIResponses({
+ @APIResponse(content = @Content(schema = @Schema(implementation = Item.class)), responseCode = "200"),
+ @APIResponse(responseCode = "404")
+ })
+ public Response getItem(
+ @Parameter(required = true) @HeaderParam("Accept-Language") final String language,
+ @Parameter(required = true) @PathParam("name") String name) {
+ return items.containsKey(name)
+ ? Response.ok().entity(items.get(name)).build()
+ : Response.status(Status.NOT_FOUND).build();
+ }
+
+ @Consumes({ MediaType.APPLICATION_JSON })
+ @POST
+ @Operation(
+ summary = "Create new item",
+ description = "Post operation with entity in a body"
+ )
+ @APIResponses(
+ @APIResponse(
+ content = @Content(
+ schema = @Schema(implementation = Item.class),
+ mediaType = MediaType.APPLICATION_JSON
+ ),
+ headers = @Header(name = "Location"),
+ responseCode = "201"
+ )
+ )
+ public Response createItem(
+ @Context final UriInfo uriInfo,
+ @Parameter(required = true) final Item item) {
+ items.put(item.getName(), item);
+ return Response
+ .created(uriInfo.getBaseUriBuilder().path(item.getName()).build())
+ .entity(item).build();
+ }
+
+ @Produces({ MediaType.APPLICATION_JSON })
+ @Path("/{name}")
+ @PUT
+ @Operation(
+ summary = "Update an existing new item",
+ description = "Put operation with form parameter"
+ )
+ @APIResponse(
+ content = @Content(schema = @Schema(implementation = Item.class)),
+ responseCode = "200"
+ )
+ public Item updateItem(
+ @Parameter(required = true) @PathParam("name") String name,
+ @Parameter(required = true) @FormParam("value") String value) {
+ Item item = new Item(name, value);
+ items.put(name, item);
+ return item;
+ }
+
+ @Path("/{name}")
+ @DELETE
+ @Operation(
+ summary = "Delete an existing new item",
+ description = "Delete operation with implicit header"
+ )
+ @Parameter(
+ name = "Accept-Language",
+ description = "language",
+ required = true,
+ schema = @Schema(implementation = String.class),
+ in = ParameterIn.HEADER
+ )
+ @APIResponse(responseCode = "204", content = @Content(schema = @Schema()))
+ public void delete(@Parameter(required = true) @PathParam("name") String name) {
+ items.remove(name);
+ }
+}
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Server.java
similarity index 57%
copy from rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java
copy to distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Server.java
index 6b82611..9365ca1 100644
--- a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Server.java
@@ -16,28 +16,22 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.jaxrs.mpopenapi;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
+package demo.jaxrs.openapi.server;
-import org.apache.geronimo.microprofile.openapi.jaxrs.OpenAPIEndpoint;
-import org.eclipse.microprofile.openapi.models.OpenAPI;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
-@Path("/openapi.{type:json|yaml}")
-public class OpenApiEndpoint extends OpenAPIEndpoint {
- private OpenAPI openApi;
-
- public OpenApiEndpoint(OpenAPI openApi) {
- this.openApi = openApi;
+public final class Server {
+ private Server() {
}
- @Override
- @GET
- @Produces({MediaType.APPLICATION_JSON, "application/yaml"})
- public OpenAPI get() {
- return openApi;
+ public static void main(String[] args) throws Exception {
+ try (ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class)) {
+ System.out.println("Server ready...");
+ Thread.sleep(5 * 6000 * 1000);
+ System.out.println("Server exiting");
+ System.exit(0);
+ }
}
}
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/resources/META-INF/cxf/org.apache.cxf.Logger b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
new file mode 100644
index 0000000..27dd788
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
@@ -0,0 +1 @@
+org.apache.cxf.common.logging.Slf4jLogger
\ No newline at end of file
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/resources/logback.xml b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/resources/logback.xml
new file mode 100644
index 0000000..59bce12
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/resources/logback.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="5 seconds">
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>[%level] %d{yyyy-MM-dd HH:mm:ss.SSS} %logger{36} - [%X] %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="INFO">
+ <appender-ref ref="STDOUT" />
+ </root>
+
+ <logger category="io.swagger" name="swagger">
+ <level name="DEBUG"/>
+ </logger>
+</configuration>
diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml
index 2362276..51743c0 100644
--- a/distribution/src/main/release/samples/pom.xml
+++ b/distribution/src/main/release/samples/pom.xml
@@ -142,6 +142,7 @@
<module>wsdl_first_rpclit</module>
<module>wsdl_first_soap12</module>
<module>wsdl_first_xml_wrapped</module>
+ <module>jax_rs/description_openapi_microprofile_spring</module>
</modules>
<dependencyManagement>
<dependencies>
diff --git a/parent/pom.xml b/parent/pom.xml
index 6e657f4..b06fcc2 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -115,6 +115,7 @@
<cxf.geronimo.jta.version>1.1.1</cxf.geronimo.jta.version>
<cxf.geronimo.servlet25.version>1.2</cxf.geronimo.servlet25.version>
<cxf.geronimo.transaction.version>3.1.4</cxf.geronimo.transaction.version>
+ <cxf.geronimo.openapi.version>1.0.9</cxf.geronimo.openapi.version>
<cxf.glassfish.json.version>1.0.4</cxf.glassfish.json.version>
<cxf.guava.version>20.0</cxf.guava.version>
<cxf.hamcrest.version>1.3</cxf.hamcrest.version>
@@ -159,8 +160,9 @@
<cxf.logback.classic.version>1.2.3</cxf.logback.classic.version>
<cxf.lucene.version>4.9.0</cxf.lucene.version>
<cxf.maven.core.version>3.6.1</cxf.maven.core.version>
- <cxf.microprofile.config.version>1.1</cxf.microprofile.config.version>
+ <cxf.microprofile.config.version>1.2</cxf.microprofile.config.version>
<cxf.microprofile.rest.client.version>1.3.3</cxf.microprofile.rest.client.version>
+ <cxf.microprofile.openapi.version>1.1.2</cxf.microprofile.openapi.version>
<cxf.mina.version>2.0.21</cxf.mina.version>
<cxf.mockito.version>2.28.1</cxf.mockito.version>
<cxf.msv.version>2013.6.1</cxf.msv.version>
@@ -1609,6 +1611,16 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.eclipse.microprofile.openapi</groupId>
+ <artifactId>microprofile-openapi-api</artifactId>
+ <version>${cxf.microprofile.openapi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo</groupId>
+ <artifactId>geronimo-openapi-impl</artifactId>
+ <version>${cxf.geronimo.openapi.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>${cxf.slf4j.version}</version>
@@ -2171,6 +2183,11 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jsonb_1.0_spec</artifactId>
+ <version>${cxf.geronimo.jsonb.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-json_1.1_spec</artifactId>
<version>${cxf.geronimo.json.version}</version>
</dependency>
diff --git a/rt/rs/description-microprofile-openapi/pom.xml b/rt/rs/description-microprofile-openapi/pom.xml
index 1f6533e..a7e23ab 100644
--- a/rt/rs/description-microprofile-openapi/pom.xml
+++ b/rt/rs/description-microprofile-openapi/pom.xml
@@ -48,6 +48,10 @@
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-service-description-common-openapi</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
@@ -58,19 +62,26 @@
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-json-basic</artifactId>
- <version>${project.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
- <version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo</groupId>
<artifactId>geronimo-openapi-impl</artifactId>
- <version>1.0.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jsonb_1.0_spec</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-json_1.1_spec</artifactId>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiEndpoint.java
similarity index 96%
rename from rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java
rename to rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiEndpoint.java
index 6b82611..faba9fb 100644
--- a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiEndpoint.java
+++ b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiEndpoint.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.jaxrs.mpopenapi;
+package org.apache.cxf.jaxrs.microprofile.openapi;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiFeature.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java
similarity index 83%
rename from rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiFeature.java
rename to rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java
index c65fd9b..d07ec63 100644
--- a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/OpenApiFeature.java
+++ b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java
@@ -16,12 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.jaxrs.mpopenapi;
+package org.apache.cxf.jaxrs.microprofile.openapi;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
@@ -39,9 +38,9 @@ import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.feature.AbstractFeature;
import org.apache.cxf.jaxrs.JAXRSServiceFactoryBean;
+import org.apache.cxf.jaxrs.common.openapi.DefaultApplicationFactory;
+import org.apache.cxf.jaxrs.common.openapi.SwaggerProperties;
import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
-import org.apache.cxf.jaxrs.model.ApplicationInfo;
-import org.apache.cxf.jaxrs.model.ClassResourceInfo;
import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
import org.apache.cxf.jaxrs.swagger.ui.SwaggerUiConfig;
import org.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport;
@@ -61,8 +60,6 @@ import org.eclipse.microprofile.openapi.models.OpenAPI;
public class OpenApiFeature extends AbstractFeature implements SwaggerUiSupport, SwaggerProperties {
private static final Logger LOG = LogUtils.getL7dLogger(OpenApiFeature.class);
- private static final String DEFAULT_PROPS_LOCATION = "/swagger.properties";
-
private String version;
private String title;
private String description;
@@ -98,22 +95,6 @@ public class OpenApiFeature extends AbstractFeature implements SwaggerUiSupport,
// Swagger UI configuration parameters (to be passed as query string).
private SwaggerUiConfig swaggerUiConfig;
- protected static class DefaultApplication extends Application {
-
- private final Set<Class<?>> serviceClasses;
-
- DefaultApplication(final List<ClassResourceInfo> cris, final Set<String> resourcePackages) {
- this.serviceClasses = cris.stream().map(ClassResourceInfo::getServiceClass).
- filter(cls -> (resourcePackages == null || resourcePackages.isEmpty()) || resourcePackages.stream().
- anyMatch(pkg -> cls.getPackage().getName().startsWith(pkg))).collect(Collectors.toSet());
- }
-
- @Override
- public Set<Class<?>> getClasses() {
- return serviceClasses;
- }
- }
-
@Override
public void initialize(Server server, Bus bus) {
final JAXRSServiceFactoryBean sfb = (JAXRSServiceFactoryBean)server
@@ -129,35 +110,49 @@ public class OpenApiFeature extends AbstractFeature implements SwaggerUiSupport,
packages.addAll(resourcePackages);
}
- final Application application = getApplicationOrDefault(server, factory, sfb, bus);
+ final Application application = DefaultApplicationFactory.createApplicationOrDefault(server, factory,
+ sfb, bus, resourcePackages, isScan());
final AnnotationProcessor processor = new AnnotationProcessor(GeronimoOpenAPIConfig.create(),
- new NamingStrategy.Http());
+ new NamingStrategy.Http());
final OpenAPIImpl api = new OpenAPIImpl();
if (isScan()) {
packages.addAll(scanResourcePackages(sfb));
}
+
+ final Set<Class<?>> resources = new HashSet<>();
if (application != null) {
processor.processApplication(api, new ClassElement(application.getClass()));
LOG.fine("Processed application " + application);
- }
- Set<Class<?>> endpointClasses = sfb
- .getClassResourceInfo()
+
+ if (application.getClasses() != null) {
+ resources.addAll(application.getClasses());
+ }
+ }
+
+ resources.addAll(sfb
+ .getClassResourceInfo()
+ .stream()
+ .map(AbstractResourceInfo::getServiceClass)
+ .filter(cls -> filterByPackage(cls, packages))
+ .filter(cls -> filterByClassName(cls, resourceClasses))
+ .collect(Collectors.toSet()));
+
+ if (!resources.isEmpty()) {
+ final String binding = (application == null) ? ""
+ : processor.getApplicationBinding(application.getClass());
+
+ resources
.stream()
- .map(AbstractResourceInfo::getServiceClass)
- .collect(Collectors.toSet());
- if (!endpointClasses.isEmpty()) {
- final String binding = application == null ? "" : processor.getApplicationBinding(application.getClass());
- endpointClasses.stream()
- .peek(c -> LOG.info("Processing class " + c.getName()))
- .forEach(c -> processor.processClass(
- binding, api, new ClassElement(c),
- Stream.of(c.getMethods()).map(MethodElement::new)));
+ .peek(c -> LOG.info("Processing class " + c.getName()))
+ .forEach(c -> processor.processClass(binding, api, new ClassElement(c),
+ Stream.of(c.getMethods()).map(MethodElement::new)));
} else {
- LOG.warning("No <endpointClasses> registered, your OpenAPI will be empty.");
+ LOG.warning("No resource classes registered, the OpenAPI will not contain any endpoints.");
}
+
Properties swaggerProps = getSwaggerProperties(propertiesLocation, bus);
if (api.getInfo() == null) {
api.setInfo(getInfo(swaggerProps));
@@ -410,29 +405,6 @@ public class OpenApiFeature extends AbstractFeature implements SwaggerUiSupport,
}
/**
- * Detects the application (if present) or creates the default application (in case the scan is disabled).
- */
- protected Application getApplicationOrDefault(
- final Server server,
- final ServerProviderFactory factory,
- final JAXRSServiceFactoryBean sfb,
- final Bus bus) {
-
- ApplicationInfo appInfo = null;
- if (!isScan()) {
- appInfo = factory.getApplicationProvider();
-
- if (appInfo == null) {
- appInfo = new ApplicationInfo(
- new DefaultApplication(sfb.getClassResourceInfo(), resourcePackages), bus);
- server.getEndpoint().put(Application.class.getName(), appInfo);
- }
- }
-
- return (appInfo == null) ? null : appInfo.getProvider();
- }
-
- /**
* The info will be used only if there is no @OpenAPIDefinition annotation is present.
*/
private org.eclipse.microprofile.openapi.models.info.Info getInfo(final Properties properties) {
@@ -470,5 +442,14 @@ public class OpenApiFeature extends AbstractFeature implements SwaggerUiSupport,
.map(cri -> cri.getServiceClass().getPackage().getName())
.collect(Collectors.toSet());
}
-
+
+ private static boolean filterByPackage(final Class<?> cls, final Set<String> packages) {
+ return (packages == null || packages.isEmpty())
+ || packages.stream().anyMatch(pkg -> cls.getPackage().getName().startsWith(pkg));
+ }
+
+ private static boolean filterByClassName(final Class<?> cls, final Set<String> classes) {
+ return (classes == null || classes.isEmpty())
+ || classes.stream().anyMatch(cls.getName()::equalsIgnoreCase);
+ }
}
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerUi.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/SwaggerUi.java
similarity index 97%
rename from rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerUi.java
rename to rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/SwaggerUi.java
index f796dfb..b051030 100644
--- a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerUi.java
+++ b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/SwaggerUi.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.cxf.jaxrs.mpopenapi;
+package org.apache.cxf.jaxrs.microprofile.openapi;
import org.apache.cxf.jaxrs.swagger.ui.SwaggerUiResolver;
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerProperties.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerProperties.java
deleted file mode 100644
index c4b4c2a..0000000
--- a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/mpopenapi/SwaggerProperties.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.jaxrs.mpopenapi;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.jaxrs.utils.ResourceUtils;
-
-interface SwaggerProperties {
- String RESOURCE_PACKAGE_PROPERTY = "resource.package";
- String TITLE_PROPERTY = "title";
- String VERSION_PROPERTY = "version";
- String DESCRIPTION_PROPERTY = "description";
- String CONTACT_PROPERTY = "contact";
- String LICENSE_PROPERTY = "license";
- String LICENSE_URL_PROPERTY = "license.url";
- String TERMS_URL_PROPERTY = "terms.url";
- String PRETTY_PRINT_PROPERTY = "pretty.print";
- String FILTER_CLASS_PROPERTY = "filter.class";
-
- /**
- * Read the Swagger-specific properties from the property file (to seamlessly
- * support the migration from older Swagger features).
- * @param location property file location
- * @param bus bus instance
- * @return the properties if available
- */
- default Properties getSwaggerProperties(String location, Bus bus) {
- InputStream is = ResourceUtils.getClasspathResourceStream(location, SwaggerProperties.class, bus);
- Properties props = null;
-
- if (is != null) {
- props = new Properties();
- try {
- props.load(is);
- } catch (IOException ex) {
- props = null;
- } finally {
- try {
- is.close();
- } catch (IOException ignore) {
- // ignore
- }
- }
- }
-
- return props;
- }
-}
[cxf] 06/08: Upgrading Apache Johnzon dependencies to 1.1.11
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch CXF-7601_microProfileOpenApi
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 09ddfdeaef6f32537dba23fa6d7ef36992b3217b
Author: reta <dr...@gmail.com>
AuthorDate: Tue Apr 9 22:02:38 2019 -0400
Upgrading Apache Johnzon dependencies to 1.1.11
---
.../samples/jax_rs/description_openapi_microprofile_spring/pom.xml | 1 -
.../src/main/java/demo/jaxrs/openapi/server/Sample.java | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml
index f44cbe6..f4734b2 100644
--- a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml
@@ -81,7 +81,6 @@
<dependency>
<groupId>org.apache.johnzon</groupId>
<artifactId>johnzon-jsonb</artifactId>
- <version>1.1.11</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Sample.java b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Sample.java
index 64bd691..6ab3687 100644
--- a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Sample.java
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/Sample.java
@@ -141,6 +141,7 @@ public class Sample {
return item;
}
+ @Produces({ MediaType.APPLICATION_JSON })
@Path("/{name}")
@DELETE
@Operation(
@@ -154,7 +155,7 @@ public class Sample {
schema = @Schema(implementation = String.class),
in = ParameterIn.HEADER
)
- @APIResponse(responseCode = "204", content = @Content(schema = @Schema()))
+ @APIResponse(responseCode = "204")
public void delete(@Parameter(required = true) @PathParam("name") String name) {
items.remove(name);
}
[cxf] 08/08: Accomodate recent microprofile OpenApi changes
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch CXF-7601_microProfileOpenApi
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit e1b81269089d6e7cb53e949a9fde629d37bce421
Author: reta <dr...@gmail.com>
AuthorDate: Mon Jul 15 23:01:00 2019 -0400
Accomodate recent microprofile OpenApi changes
---
.../jax_rs/description_openapi_microprofile_spring/README.txt | 6 +++---
.../samples/jax_rs/description_openapi_microprofile_spring/pom.xml | 3 +--
.../src/main/java/demo/jaxrs/openapi/server/AppConfig.java | 2 +-
parent/pom.xml | 5 +++++
.../org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java | 2 +-
5 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt
index ac8ab9b..d1f673e 100644
--- a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt
@@ -20,13 +20,13 @@ Using either UNIX or Windows:
After the service is started, the Swagger API documents in JSON and YAML
are available at
- http://localhost:9000/sample/openapi.json
- http://localhost:9000/sample/openapi.yaml
+ http://localhost:9000/openapi.json
+ http://localhost:9000/openapi.yaml
To remove the target dir, run mvn clean".
To navigate to the hosted Swagger UI, please type in the browser:
- http://localhost:9000/sample/api-docs/?url=/sample/openapi.json
+ http://localhost:9000/api-docs/?url=/openapi.json
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml
index f4734b2..dea2f13 100644
--- a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.cxf.samples</groupId>
<artifactId>cxf-samples</artifactId>
- <version>3.3.2-SNAPSHOT</version>
+ <version>3.3.3-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
@@ -76,7 +76,6 @@
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description-microprofile-openapi</artifactId>
- <version>3.3.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.johnzon</groupId>
diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java
index a5c039a..0d6c33a 100644
--- a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java
@@ -28,7 +28,7 @@ public class AppConfig {
final JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean ();
factory.setFeatures(Arrays.asList(openApiFeature()));
factory.setServiceBean(sampleResource());
- factory.setAddress("http://localhost:9000/sample");
+ factory.setAddress("http://localhost:9000/");
factory.setProvider(new JsonbJaxrsProvider<>());
return factory.create();
}
diff --git a/parent/pom.xml b/parent/pom.xml
index fb37cb5..3708a46 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -912,6 +912,11 @@
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-service-description-microprofile-openapi</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java
index d07ec63..2ad6bdc 100644
--- a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java
+++ b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java
@@ -114,7 +114,7 @@ public class OpenApiFeature extends AbstractFeature implements SwaggerUiSupport,
sfb, bus, resourcePackages, isScan());
final AnnotationProcessor processor = new AnnotationProcessor(GeronimoOpenAPIConfig.create(),
- new NamingStrategy.Http());
+ new NamingStrategy.Http(), null /* default JsonReaderFactory */);
final OpenAPIImpl api = new OpenAPIImpl();
[cxf] 04/08: [CXF-7601] Add support for Microprofile OpenAPI
implementation (as an alternative to Swagger Core 2.0)
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch CXF-7601_microProfileOpenApi
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 3b96065d50dbfda39b6f09d641893fe50a74c786
Author: Dennis Kieselhorst <de...@apache.org>
AuthorDate: Wed Jan 23 14:41:54 2019 +0100
[CXF-7601] Add support for Microprofile OpenAPI implementation (as an alternative to Swagger Core 2.0)
---
rt/rs/description-microprofile-openapi/pom.xml | 23 +++--------------------
1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/rt/rs/description-microprofile-openapi/pom.xml b/rt/rs/description-microprofile-openapi/pom.xml
index 8373cfd..1f6533e 100644
--- a/rt/rs/description-microprofile-openapi/pom.xml
+++ b/rt/rs/description-microprofile-openapi/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.3-SNAPSHOT</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
<properties>
@@ -65,30 +65,13 @@
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
- <version>1.0.1</version>
+ <version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo</groupId>
<artifactId>geronimo-openapi-impl</artifactId>
- <version>1.0.5</version>
+ <version>1.0.9</version>
</dependency>
- <!--<dependency>-->
- <!--<groupId>org.apache.geronimo.specs</groupId>-->
- <!--<artifactId>geronimo-jsonb_1.0_spec</artifactId>-->
- <!--<version>1.0</version>-->
- <!--<scope>compile</scope>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>org.apache.geronimo.specs</groupId>-->
- <!--<artifactId>geronimo-json_1.1_spec</artifactId>-->
- <!--<version>1.0</version>-->
- <!--<scope>compile</scope>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>org.apache.johnzon</groupId>-->
- <!--<artifactId>johnzon-jsonb</artifactId>-->
- <!--<version>${cxf.johnzon.version}</version>-->
- <!--</dependency>-->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
[cxf] 07/08: update to latest geronimo-openapi-impl release
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch CXF-7601_microProfileOpenApi
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 0c7ab097483a2a30844cae32e6532f1028afc17e
Author: Dennis Kieselhorst <de...@apache.org>
AuthorDate: Sun May 12 20:50:16 2019 +0200
update to latest geronimo-openapi-impl release
---
parent/pom.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/parent/pom.xml b/parent/pom.xml
index b06fcc2..fb37cb5 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -111,6 +111,7 @@
<cxf.geronimo.j2ee.management.version>1.0.1</cxf.geronimo.j2ee.management.version>
<cxf.geronimo.jms.version>1.1.1</cxf.geronimo.jms.version>
<cxf.geronimo.jpa.version>1.0</cxf.geronimo.jpa.version>
+ <cxf.geronimo.jsonb.version>1.1</cxf.geronimo.jsonb.version>
<cxf.geronimo.json.version>1.2</cxf.geronimo.json.version>
<cxf.geronimo.jta.version>1.1.1</cxf.geronimo.jta.version>
<cxf.geronimo.servlet25.version>1.2</cxf.geronimo.servlet25.version>
[cxf] 02/08: update new module to 3.3.1-SNAPSHOT
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch CXF-7601_microProfileOpenApi
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 1c55f929bd90a5a50530b5eaf22216c93ce3f2f9
Author: Dennis Kieselhorst <de...@apache.org>
AuthorDate: Fri Jan 25 09:25:03 2019 +0100
update new module to 3.3.1-SNAPSHOT
---
rt/rs/description-microprofile-openapi/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rt/rs/description-microprofile-openapi/pom.xml b/rt/rs/description-microprofile-openapi/pom.xml
index e505aad..c652843 100644
--- a/rt/rs/description-microprofile-openapi/pom.xml
+++ b/rt/rs/description-microprofile-openapi/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.1-SNAPSHOT</version>
<relativePath>../../../parent/pom.xml</relativePath>
</parent>
<properties>