You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2018/02/08 10:01:10 UTC
syncope git commit: Swagger -> OpenAPI
Repository: syncope
Updated Branches:
refs/heads/master 5711421da -> 7423435ae
Swagger -> OpenAPI
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7423435a
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7423435a
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7423435a
Branch: refs/heads/master
Commit: 7423435ae55961c55813efac6ae4df700811b3ef
Parents: 5711421
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Feb 8 11:00:57 2018 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Feb 8 11:00:57 2018 +0100
----------------------------------------------------------------------
common/rest-api/pom.xml | 2 +-
.../rest/api/service/AccessTokenService.java | 32 ++++-----
.../rest/api/service/AnyObjectService.java | 12 ++--
.../rest/api/service/AnyTypeClassService.java | 12 ++--
.../common/rest/api/service/AnyTypeService.java | 12 ++--
.../rest/api/service/ConfigurationService.java | 12 ++--
.../api/service/ConnectorHistoryService.java | 12 ++--
.../rest/api/service/ConnectorService.java | 12 ++--
.../common/rest/api/service/DomainService.java | 12 ++--
.../rest/api/service/DynRealmService.java | 12 ++--
.../common/rest/api/service/GroupService.java | 12 ++--
.../rest/api/service/ImplementationService.java | 12 ++--
.../common/rest/api/service/LoggerService.java | 12 ++--
.../rest/api/service/MailTemplateService.java | 12 ++--
.../rest/api/service/NotificationService.java | 13 ++--
.../common/rest/api/service/PolicyService.java | 12 ++--
.../common/rest/api/service/RealmService.java | 12 ++--
.../api/service/RelationshipTypeService.java | 12 ++--
.../common/rest/api/service/ReportService.java | 12 ++--
.../rest/api/service/ReportTemplateService.java | 12 ++--
.../api/service/ResourceHistoryService.java | 12 ++--
.../rest/api/service/ResourceService.java | 12 ++--
.../common/rest/api/service/RoleService.java | 12 ++--
.../common/rest/api/service/SchemaService.java | 12 ++--
.../api/service/SecurityQuestionService.java | 12 ++--
.../common/rest/api/service/SyncopeService.java | 12 ++--
.../common/rest/api/service/TaskService.java | 12 ++--
.../rest/api/service/UserSelfService.java | 44 ++++++------
.../common/rest/api/service/UserService.java | 12 ++--
.../rest/api/service/UserWorkflowService.java | 12 ++--
.../rest/api/service/WorkflowService.java | 12 ++--
core/rest-cxf/pom.xml | 2 +-
.../core/rest/cxf/SyncopeOpenApiCustomizer.java | 76 ++++++++++++++++++++
.../core/rest/cxf/SyncopeOpenApiFeature.java | 72 +++++++++++++++++++
.../rest/cxf/SyncopeSwagger2Customizer.java | 72 -------------------
.../main/resources/META-INF/web-fragment.xml | 6 +-
.../src/main/resources/restCXFContext.xml | 35 +++++----
.../rest/api/service/CamelRouteService.java | 12 ++--
.../rest/api/service/SAML2IdPService.java | 12 ++--
.../common/rest/api/service/SAML2SPService.java | 12 ++--
.../rest/api/service/SCIMConfService.java | 12 ++--
ext/swagger-ui/pom.xml | 19 +----
.../src/main/resources/jboss/restCXFContext.xml | 39 ++++++----
pom.xml | 44 +++---------
44 files changed, 473 insertions(+), 355 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/pom.xml
----------------------------------------------------------------------
diff --git a/common/rest-api/pom.xml b/common/rest-api/pom.xml
index 7f848b7..5e1a137 100644
--- a/common/rest-api/pom.xml
+++ b/common/rest-api/pom.xml
@@ -49,7 +49,7 @@ under the License.
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
index 72ee648..e60b08a 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AccessTokenService.java
@@ -18,9 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
import javax.ws.rs.BeanParam;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -38,7 +38,7 @@ import org.apache.syncope.common.rest.api.beans.AccessTokenQuery;
/**
* REST operations for access tokens.
*/
-@Api(tags = "AccessTokens")
+@Tag(name = "AccessTokens")
@Path("accessTokens")
public interface AccessTokenService extends JAXRSService {
@@ -48,8 +48,8 @@ public interface AccessTokenService extends JAXRSService {
*
* @return empty response bearing the X-Syncope-Token header value, in case of successful authentication
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication") })
+ @Operation(security = {
+ @SecurityRequirement(name = "BasicAuthentication") })
@POST
@Path("login")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@@ -61,8 +61,8 @@ public interface AccessTokenService extends JAXRSService {
*
* @return an empty response bearing the X-Syncope-Token header value, with extended lifetime
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "Bearer") })
@POST
@Path("refresh")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@@ -73,8 +73,8 @@ public interface AccessTokenService extends JAXRSService {
*
* @return an empty response if operation was successful
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "Bearer") })
@POST
@Path("logout")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@@ -86,9 +86,9 @@ public interface AccessTokenService extends JAXRSService {
* @param query query conditions
* @return paged list of existing access tokens matching the given query
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@GET
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@@ -100,9 +100,9 @@ public interface AccessTokenService extends JAXRSService {
* @param key access token key
* @return an empty response if operation was successful
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@DELETE
@Path("{key}")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
index 6902227..ab68778 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.PATCH;
@@ -35,9 +36,10 @@ import org.apache.syncope.common.lib.to.AnyObjectTO;
/**
* REST operations for anyObjects.
*/
-@Api(tags = "AnyObjects", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "AnyObjects")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("anyObjects")
public interface AnyObjectService extends AnyService<AnyObjectTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
index 1d8ca1e..e026650 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeClassService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -37,9 +38,10 @@ import org.apache.syncope.common.lib.to.AnyTypeClassTO;
/**
* REST operations for any type classes.
*/
-@Api(tags = "AnyTypeClasses", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "AnyTypeClasses")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("anyTypeClasses")
public interface AnyTypeClassService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
index 11ae646..e9438d2 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyTypeService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -37,9 +38,10 @@ import org.apache.syncope.common.lib.to.AnyTypeTO;
/**
* REST operations for any types.
*/
-@Api(tags = "AnyTypes", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "AnyTypes")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("anyTypes")
public interface AnyTypeService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
index a338a74..55979f0 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConfigurationService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -36,9 +37,10 @@ import org.apache.syncope.common.lib.to.AttrTO;
/**
* REST operations for configuration.
*/
-@Api(tags = "Configuration", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Configuration")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("configurations")
public interface ConfigurationService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
index da4447a..1a30f9b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorHistoryService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.DELETE;
@@ -35,9 +36,10 @@ import org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO;
/**
* REST operations for connector configuration versioning.
*/
-@Api(tags = "ConnectorHistory", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "ConnectorHistory")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("connectorsHistory")
public interface ConnectorHistoryService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
index 882ab35..64647c5 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -41,9 +42,10 @@ import org.apache.syncope.common.lib.to.ConnInstanceTO;
/**
* REST operations for connector bundles and instances.
*/
-@Api(tags = "Connectors", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Connectors")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("connectors")
public interface ConnectorService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
index b336636..d367810 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DomainService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -37,9 +38,10 @@ import org.apache.syncope.common.lib.to.DomainTO;
/**
* REST operations for domains.
*/
-@Api(tags = "Domains", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Domains")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("domains")
public interface DomainService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
index 50114ce..c438d7e 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/DynRealmService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -37,9 +38,10 @@ import org.apache.syncope.common.lib.to.DynRealmTO;
/**
* REST operations for dynamic realms.
*/
-@Api(tags = "DynamicRealms", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "DynamicRealms")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("dynRealms")
public interface DynRealmService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
index 38f34db..c3f68e3 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -40,9 +41,10 @@ import org.apache.syncope.common.lib.types.BulkMembersActionType;
/**
* REST operations for groups.
*/
-@Api(tags = "Groups", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Groups")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("groups")
public interface GroupService extends AnyService<GroupTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ImplementationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ImplementationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ImplementationService.java
index daefbf2..fa5e59d 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ImplementationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ImplementationService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -39,9 +40,10 @@ import org.apache.syncope.common.lib.types.ImplementationType;
/**
* REST operations for implementations.
*/
-@Api(tags = "Implementations", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Implementations")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("implementations")
public interface ImplementationService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
index 378d118..f923200 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/LoggerService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -40,9 +41,10 @@ import org.apache.syncope.common.lib.types.LoggerType;
/**
* REST operations for logging and auditing.
*/
-@Api(tags = "Loggers", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Loggers")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("loggers")
public interface LoggerService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
index caf254a..7abfa36 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/MailTemplateService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.io.InputStream;
import java.util.List;
import javax.validation.constraints.NotNull;
@@ -39,9 +40,10 @@ import org.apache.syncope.common.lib.types.MailTemplateFormat;
/**
* REST operations for mail templates.
*/
-@Api(tags = "MailTemplates", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "MailTemplates")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("mailTemplates")
public interface MailTemplateService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
index 5a4fb81..0c761b3 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/NotificationService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -40,10 +41,10 @@ import org.apache.syncope.common.lib.types.JobAction;
/**
* REST operations for notifications.
*/
-@Api(tags = "Notifications", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
-
+@Tag(name = "Notifications")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("notifications")
public interface NotificationService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
index a8ca01c..5af2c0e 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/PolicyService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -39,9 +40,10 @@ import org.apache.syncope.common.lib.types.PolicyType;
/**
* REST operations for policies.
*/
-@Api(tags = "Policies", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Policies")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("policies")
public interface PolicyService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
index 75f6621..2909fc5 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RealmService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -37,9 +38,10 @@ import org.apache.syncope.common.lib.to.RealmTO;
/**
* REST operations for realms.
*/
-@Api(tags = "Realms", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Realms")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("realms")
public interface RealmService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
index c6ed7bc..bd72582 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RelationshipTypeService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -37,9 +38,10 @@ import org.apache.syncope.common.lib.to.RelationshipTypeTO;
/**
* REST operations for relationship types.
*/
-@Api(tags = "RelationshipTypes", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "RelationshipTypes")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("relationshipTypes")
public interface RelationshipTypeService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
index 2d9fa5a..4431faa 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -39,9 +40,10 @@ import org.apache.syncope.common.lib.types.ReportExecExportFormat;
/**
* REST operations for reports.
*/
-@Api(tags = "Reports", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Reports")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("reports")
public interface ReportService extends ExecutableService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
index 3172891..daf7e29 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportTemplateService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.io.InputStream;
import java.util.List;
import javax.validation.constraints.NotNull;
@@ -39,9 +40,10 @@ import org.apache.syncope.common.lib.types.ReportTemplateFormat;
/**
* REST operations for report templates.
*/
-@Api(tags = "ReportTemplates", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "ReportTemplates")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("reportTemplates")
public interface ReportTemplateService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
index 9412522..a30b136 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceHistoryService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.DELETE;
@@ -35,9 +36,10 @@ import org.apache.syncope.common.lib.to.ResourceHistoryConfTO;
/**
* REST operations for resource configuration versioning.
*/
-@Api(tags = "ResourceHistory", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "ResourceHistory")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("resourcesHistory")
public interface ResourceHistoryService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
index af91854..caaf7ee 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.BeanParam;
@@ -43,9 +44,10 @@ import org.apache.syncope.common.rest.api.beans.ConnObjectTOListQuery;
/**
* REST operations for external resources.
*/
-@Api(tags = "Resources", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Resources")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("resources")
public interface ResourceService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
index 5e55b1e..2ca9c5d 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/RoleService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.io.InputStream;
import java.util.List;
import javax.validation.constraints.NotNull;
@@ -38,9 +39,10 @@ import org.apache.syncope.common.lib.to.RoleTO;
/**
* REST operations for roles.
*/
-@Api(tags = "Roles", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Roles")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("roles")
public interface RoleService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
index 578e403..a22041a 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.BeanParam;
@@ -40,9 +41,10 @@ import org.apache.syncope.common.rest.api.beans.SchemaQuery;
/**
* REST operations for attribute schemas.
*/
-@Api(tags = "Schemas", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Schemas")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("schemas")
public interface SchemaService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
index 70c408d..eea01a5 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SecurityQuestionService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -37,9 +38,10 @@ import org.apache.syncope.common.lib.to.SecurityQuestionTO;
/**
* REST operations for configuration.
*/
-@Api(tags = "SecurityQuestions", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "SecurityQuestions")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("securityQuestions")
public interface SecurityQuestionService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
index 53d4bec..5bbf86b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SyncopeService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.ws.rs.DefaultValue;
@@ -40,9 +41,10 @@ import org.apache.syncope.common.lib.to.TypeExtensionTO;
/**
* General info about this Apache Syncope deployment.
*/
-@Api(tags = "Syncope", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Syncope")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("")
public interface SyncopeService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
index 1e7bcd2..0fc5091 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import javax.validation.constraints.NotNull;
import javax.ws.rs.BeanParam;
import javax.ws.rs.Consumes;
@@ -44,9 +45,10 @@ import org.apache.syncope.common.rest.api.beans.TaskQuery;
/**
* REST operations for tasks.
*/
-@Api(tags = "Tasks", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Tasks")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("tasks")
public interface TaskService extends ExecutableService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
index ee16aac..d25be67 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserSelfService.java
@@ -18,9 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -41,7 +41,7 @@ import org.apache.syncope.common.lib.to.UserTO;
/**
* REST operations for user self-management.
*/
-@Api(tags = "UserSelf")
+@Tag(name = "UserSelf")
@Path("users/self")
public interface UserSelfService extends JAXRSService {
@@ -51,9 +51,9 @@ public interface UserSelfService extends JAXRSService {
* @return calling user data, including owned entitlements as header value
* {@link org.apache.syncope.common.rest.api.RESTHeaders#OWNED_ENTITLEMENTS}
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@GET
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
Response read();
@@ -78,9 +78,9 @@ public interface UserSelfService extends JAXRSService {
* @param patch modification to be applied to self
* @return Response object featuring the updated user - ProvisioningResult as Entity
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@PATCH
@Path("{key}")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@@ -93,9 +93,9 @@ public interface UserSelfService extends JAXRSService {
* @param user complete update
* @return Response object featuring the updated user - ProvisioningResult as Entity
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@PUT
@Path("{key}")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@@ -109,9 +109,9 @@ public interface UserSelfService extends JAXRSService {
* @return Response object featuring the updated user enriched with propagation status information
* - ProvisioningResult as Entity
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@POST
@Path("{key}/status")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@@ -123,9 +123,9 @@ public interface UserSelfService extends JAXRSService {
*
* @return Response object featuring the deleted user - ProvisioningResult as Entity
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@DELETE
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
Response delete();
@@ -137,9 +137,9 @@ public interface UserSelfService extends JAXRSService {
*
* @return Response object featuring the updated user - ProvisioningResult as Entity
*/
- @ApiOperation(value = "", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+ @Operation(security = {
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@POST
@Path("changePassword")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
index a9d9fa6..1cddfdd 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.DefaultValue;
@@ -38,9 +39,10 @@ import org.apache.syncope.common.lib.to.UserTO;
/**
* REST operations for users.
*/
-@Api(tags = "Users", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Users")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("users")
public interface UserService extends AnyService<UserTO> {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
index e1e7960..350542b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserWorkflowService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -35,9 +36,10 @@ import org.apache.syncope.common.lib.to.WorkflowFormTO;
/**
* REST operations related to user workflow.
*/
-@Api(tags = "UserWorkflow", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "UserWorkflow")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("userworkflow")
public interface UserWorkflowService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
index 74febf5..15f406b 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/WorkflowService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -37,9 +38,10 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
/**
* REST operations for workflow definition.
*/
-@Api(tags = "Workflow", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "Workflow")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("workflows")
public interface WorkflowService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/core/rest-cxf/pom.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/pom.xml b/core/rest-cxf/pom.xml
index b0f1bf5..1ba05a7 100644
--- a/core/rest-cxf/pom.xml
+++ b/core/rest-cxf/pom.xml
@@ -102,7 +102,7 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
+ <artifactId>cxf-rt-rs-service-description-openapi-v3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeOpenApiCustomizer.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeOpenApiCustomizer.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeOpenApiCustomizer.java
new file mode 100644
index 0000000..80a6f61
--- /dev/null
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeOpenApiCustomizer.java
@@ -0,0 +1,76 @@
+/*
+ * 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.syncope.core.rest.cxf;
+
+import io.swagger.v3.oas.models.media.Schema;
+import io.swagger.v3.oas.models.parameters.HeaderParameter;
+import io.swagger.v3.oas.models.parameters.Parameter;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.cxf.jaxrs.openapi.OpenApiCustomizer;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.syncope.common.rest.api.RESTHeaders;
+import org.apache.syncope.core.persistence.api.DomainsHolder;
+import org.apache.syncope.core.spring.ApplicationContextProvider;
+
+public class SyncopeOpenApiCustomizer extends OpenApiCustomizer {
+
+ private List<String> domains;
+
+ public SyncopeOpenApiCustomizer() {
+ super();
+
+ URL[] javaDocURLs = JavaDocUtils.getJavaDocURLs();
+ if (javaDocURLs != null) {
+ super.setJavaDocURLs(javaDocURLs);
+ }
+ }
+
+ @Override
+ protected void addParameters(final List<Parameter> parameters) {
+ if (domains == null) {
+ domains = new ArrayList<>(
+ ApplicationContextProvider.getApplicationContext().
+ getBean(DomainsHolder.class).getDomains().keySet());
+ }
+
+ boolean domainHeaderParameterFound = false;
+ for (int i = 0; i < parameters.size(); i++) {
+ if (parameters.get(i) instanceof HeaderParameter
+ && RESTHeaders.DOMAIN.equals(parameters.get(i).getName())) {
+
+ domainHeaderParameterFound = true;
+ }
+ }
+ if (!domainHeaderParameterFound) {
+ HeaderParameter domainHeaderParameter = new HeaderParameter();
+ domainHeaderParameter.setName(RESTHeaders.DOMAIN);
+ domainHeaderParameter.setRequired(true);
+
+ Schema<String> schema = new Schema<>();
+ schema.setType("string");
+ schema.setEnum(domains);
+ schema.setDefault(SyncopeConstants.MASTER_DOMAIN);
+ domainHeaderParameter.setSchema(schema);
+
+ parameters.add(domainHeaderParameter);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeOpenApiFeature.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeOpenApiFeature.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeOpenApiFeature.java
new file mode 100644
index 0000000..ca0148f
--- /dev/null
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeOpenApiFeature.java
@@ -0,0 +1,72 @@
+/*
+ * 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.syncope.core.rest.cxf;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+import javax.ws.rs.core.Application;
+import org.apache.cxf.Bus;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.jaxrs.JAXRSServiceFactoryBean;
+import org.apache.cxf.jaxrs.model.ApplicationInfo;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
+import org.apache.cxf.jaxrs.openapi.OpenApiFeature;
+import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
+
+public class SyncopeOpenApiFeature extends OpenApiFeature {
+
+ protected static class SyncopeDefaultApplication extends Application {
+
+ private final Set<Class<?>> serviceClasses;
+
+ SyncopeDefaultApplication(final List<ClassResourceInfo> cris, final Set<String> resourcePackages) {
+ this.serviceClasses = cris.stream().map(ClassResourceInfo::getServiceClass).
+ filter(cls -> {
+ return resourcePackages == null || resourcePackages.isEmpty()
+ ? true
+ : resourcePackages.stream().
+ anyMatch(pkg -> cls.getPackage().getName().startsWith(pkg));
+ }).
+ collect(Collectors.toSet());
+ }
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ return serviceClasses;
+ }
+ }
+
+ @Override
+ protected Application getApplicationOrDefault(
+ final Server server,
+ final ServerProviderFactory factory,
+ final JAXRSServiceFactoryBean sfb,
+ final Bus bus) {
+
+ ApplicationInfo appInfo = null;
+ if (!isScan()) {
+ appInfo = new ApplicationInfo(
+ new SyncopeDefaultApplication(sfb.getClassResourceInfo(), getResourcePackages()), bus);
+ server.getEndpoint().put(Application.class.getName(), appInfo);
+ }
+
+ return (appInfo == null) ? null : appInfo.getProvider();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeSwagger2Customizer.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeSwagger2Customizer.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeSwagger2Customizer.java
deleted file mode 100644
index 2d38625..0000000
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/SyncopeSwagger2Customizer.java
+++ /dev/null
@@ -1,72 +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.syncope.core.rest.cxf;
-
-import io.swagger.models.parameters.HeaderParameter;
-import io.swagger.models.parameters.Parameter;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.cxf.jaxrs.swagger.Swagger2Customizer;
-import org.apache.syncope.common.lib.SyncopeConstants;
-import org.apache.syncope.common.rest.api.RESTHeaders;
-import org.apache.syncope.core.persistence.api.DomainsHolder;
-import org.apache.syncope.core.spring.ApplicationContextProvider;
-
-public class SyncopeSwagger2Customizer extends Swagger2Customizer {
-
- private List<String> domains;
-
- public SyncopeSwagger2Customizer() {
- super();
-
- URL[] javaDocURLs = JavaDocUtils.getJavaDocURLs();
- if (javaDocURLs != null) {
- super.setJavaDocURLs(javaDocURLs);
- }
- }
-
- @Override
- protected void addParameters(final List<Parameter> parameters) {
- if (domains == null) {
- domains = new ArrayList<>(
- ApplicationContextProvider.getApplicationContext().
- getBean(DomainsHolder.class).getDomains().keySet());
- }
-
- boolean domainHeaderParameterFound = false;
- for (int i = 0; i < parameters.size(); i++) {
- if (parameters.get(i) instanceof HeaderParameter
- && RESTHeaders.DOMAIN.equals(parameters.get(i).getName())) {
-
- domainHeaderParameterFound = true;
- }
- }
- if (!domainHeaderParameterFound) {
- HeaderParameter domainHeaderParameter = new HeaderParameter();
- domainHeaderParameter.setName(RESTHeaders.DOMAIN);
- domainHeaderParameter.setRequired(true);
- domainHeaderParameter.setType("string");
- domainHeaderParameter.setEnum(domains);
- domainHeaderParameter.setDefault(SyncopeConstants.MASTER_DOMAIN);
-
- parameters.add(domainHeaderParameter);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/core/rest-cxf/src/main/resources/META-INF/web-fragment.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/resources/META-INF/web-fragment.xml b/core/rest-cxf/src/main/resources/META-INF/web-fragment.xml
index 024f211..1346471 100644
--- a/core/rest-cxf/src/main/resources/META-INF/web-fragment.xml
+++ b/core/rest-cxf/src/main/resources/META-INF/web-fragment.xml
@@ -30,7 +30,11 @@ under the License.
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
+ <load-on-startup>1</load-on-startup>
+ <init-param>
+ <param-name>openapi.context.id</param-name>
+ <param-value>openapi.context.id.default</param-value>
+ </init-param>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/core/rest-cxf/src/main/resources/restCXFContext.xml
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/resources/restCXFContext.xml b/core/rest-cxf/src/main/resources/restCXFContext.xml
index 6e6d778..3d4ac8b 100644
--- a/core/rest-cxf/src/main/resources/restCXFContext.xml
+++ b/core/rest-cxf/src/main/resources/restCXFContext.xml
@@ -97,26 +97,35 @@ under the License.
<property name="usePathParamsToCompareOperations" value="false"/>
</bean>
- <bean id="basicAuth" class="io.swagger.models.auth.BasicAuthDefinition"/>
- <bean id="bearer" class="io.swagger.models.auth.ApiKeyAuthDefinition">
- <property name="name" value="Authorization"/>
- <property name="in" value="HEADER"/>
+ <bean id="basicAuth" class="io.swagger.v3.oas.models.security.SecurityScheme">
+ <property name="type" value="HTTP"/>
+ <property name="scheme" value="basic"/>
</bean>
- <bean id="swagger2customizer" class="org.apache.syncope.core.rest.cxf.SyncopeSwagger2Customizer">
+ <bean id="bearer" class="io.swagger.v3.oas.models.security.SecurityScheme">
+ <property name="type" value="HTTP"/>
+ <property name="scheme" value="bearer"/>
+ <property name="bearerFormat" value="JWT"/>
+ </bean>
+ <bean id="openApiCustomizer" class="org.apache.syncope.core.rest.cxf.SyncopeOpenApiCustomizer">
<property name="dynamicBasePath" value="true"/>
<property name="replaceTags" value="false"/>
</bean>
- <bean id="swagger2Feature" class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
+ <bean id="openapiFeature" class="org.apache.syncope.core.rest.cxf.SyncopeOpenApiFeature">
<property name="title" value="Apache Syncope"/>
<property name="version" value="${syncope.version}"/>
<property name="description" value="Apache Syncope ${syncope.version}"/>
- <property name="contact" value="dev@syncope.apache.org"/>
+ <property name="contactName" value="The Apache Syncope community"/>
+ <property name="contactEmail" value="dev@syncope.apache.org"/>
+ <property name="contactUrl" value="http://syncope.apache.org"/>
- <property name="resourcePackage" value="org.apache.syncope.common.rest.api.service"/>
- <property name="scanAllResources" value="true"/>
- <property name="activateOnlyIfJaxrsSupported" value="true"/>
+ <property name="scan" value="false"/>
+ <property name="resourcePackages">
+ <set>
+ <value>org.apache.syncope.common.rest.api.service</value>
+ </set>
+ </property>
- <property name="customizer" ref="swagger2customizer"/>
+ <property name="customizer" ref="openApiCustomizer"/>
<property name="securityDefinitions">
<map>
@@ -125,7 +134,6 @@ under the License.
</map>
</property>
</bean>
- <bean id="sw2OpenAPI" class="org.apache.cxf.jaxrs.swagger.openapi.SwaggerToOpenApiConversionFilter"/>
<jaxrs:server id="restContainer" address="/"
basePackages="org.apache.syncope.common.rest.api.service, org.apache.syncope.core.rest.cxf.service"
@@ -152,10 +160,9 @@ under the License.
<ref bean="addDomainFilter"/>
<ref bean="addETagFilter"/>
<ref bean="wadlGenerator"/>
- <ref bean="sw2OpenAPI"/>
</jaxrs:providers>
<jaxrs:features>
- <ref bean="swagger2Feature"/>
+ <ref bean="openapiFeature"/>
</jaxrs:features>
</jaxrs:server>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
index 00a14d1..1de6313 100644
--- a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
+++ b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -39,9 +40,10 @@ import org.apache.syncope.common.lib.types.AnyTypeKind;
/**
* REST operations for Camel routes.
*/
-@Api(tags = "CamelRoutes", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "CamelRoutes")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("camelRoutes")
public interface CamelRouteService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
index a3c9bd5..90c79e2 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2IdPService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import java.io.InputStream;
import java.util.List;
import java.util.Set;
@@ -39,9 +40,10 @@ import org.apache.syncope.common.lib.to.SAML2IdPTO;
/**
* REST operations for SAML 2.0 Identity Providers.
*/
-@Api(tags = "SAML2IdP", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "SAML2IdP")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("saml2sp/identityProviders")
public interface SAML2IdPService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
----------------------------------------------------------------------
diff --git a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
index e67cc0b..0718538 100644
--- a/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
+++ b/ext/saml2sp/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2SPService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
@@ -35,9 +36,10 @@ import org.apache.syncope.common.lib.to.SAML2ReceivedResponseTO;
/**
* REST operations for the provided SAML 2.0 Service Provider.
*/
-@Api(tags = "SAML2SP", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "SAML2SP")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("saml2sp/serviceProvider")
public interface SAML2SPService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
index 3a98255..7bdc050 100644
--- a/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
+++ b/ext/scimv2/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SCIMConfService.java
@@ -18,8 +18,9 @@
*/
package org.apache.syncope.common.rest.api.service;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.Authorization;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
@@ -33,9 +34,10 @@ import org.apache.syncope.common.lib.scim.SCIMConf;
/**
* REST operations for SCIM 2.0 configuration.
*/
-@Api(tags = "SCIMConf", authorizations = {
- @Authorization(value = "BasicAuthentication")
- , @Authorization(value = "Bearer") })
+@Tag(name = "SCIMConf")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication")
+ , @SecurityRequirement(name = "Bearer") })
@Path("scimv2conf")
public interface SCIMConfService extends JAXRSService {
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/ext/swagger-ui/pom.xml
----------------------------------------------------------------------
diff --git a/ext/swagger-ui/pom.xml b/ext/swagger-ui/pom.xml
index 62248f6..be72a97 100644
--- a/ext/swagger-ui/pom.xml
+++ b/ext/swagger-ui/pom.xml
@@ -39,27 +39,10 @@ under the License.
<dependencies>
<dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jaxrs</artifactId>
- </dependency>
- <dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-xml</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-joda</artifactId>
- </dependency>
-
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- </dependency>
-
+
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/restCXFContext.xml b/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
index 33807f2..b3af331 100644
--- a/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
+++ b/fit/core-reference/src/main/resources/jboss/restCXFContext.xml
@@ -103,15 +103,19 @@ under the License.
</list>
</property>
</bean>
-
- <bean id="basicAuth" class="io.swagger.models.auth.BasicAuthDefinition"/>
- <bean id="bearer" class="io.swagger.models.auth.ApiKeyAuthDefinition">
- <property name="name" value="Authorization"/>
- <property name="in" value="HEADER"/>
+
+ <bean id="basicAuth" class="io.swagger.v3.oas.models.security.SecurityScheme">
+ <property name="type" value="HTTP"/>
+ <property name="scheme" value="basic"/>
+ </bean>
+ <bean id="bearer" class="io.swagger.v3.oas.models.security.SecurityScheme">
+ <property name="type" value="HTTP"/>
+ <property name="scheme" value="bearer"/>
+ <property name="bearerFormat" value="JWT"/>
</bean>
- <bean id="swagger2customizer" class="org.apache.syncope.core.rest.cxf.SyncopeSwagger2Customizer">
+ <bean id="openApiCustomizer" class="org.apache.syncope.core.rest.cxf.SyncopeOpenApiCustomizer">
<property name="dynamicBasePath" value="true"/>
- <property name="replaceTags" value="true"/>
+ <property name="replaceTags" value="false"/>
<property name="javaDocPaths">
<list>
<value>/WEB-INF/lib/syncope-common-rest-api-${syncope.version}-javadoc.jar</value>
@@ -120,18 +124,23 @@ under the License.
</list>
</property>
</bean>
- <bean id="swagger2Feature" class="org.apache.cxf.jaxrs.swagger.Swagger2Feature">
+ <bean id="openapiFeature" class="org.apache.syncope.core.rest.cxf.SyncopeOpenApiFeature">
<property name="title" value="Apache Syncope"/>
<property name="version" value="${syncope.version}"/>
<property name="description" value="Apache Syncope ${syncope.version}"/>
- <property name="contact" value="dev@syncope.apache.org"/>
+ <property name="contactName" value="The Apache Syncope community"/>
+ <property name="contactEmail" value="dev@syncope.apache.org"/>
+ <property name="contactUrl" value="http://syncope.apache.org"/>
- <property name="resourcePackage" value="org.apache.syncope.common.rest.api.service"/>
- <property name="scanAllResources" value="true"/>
- <property name="activateOnlyIfJaxrsSupported" value="true"/>
-
- <property name="customizer" ref="swagger2customizer"/>
+ <property name="scan" value="false"/>
+ <property name="resourcePackages">
+ <set>
+ <value>org.apache.syncope.common.rest.api.service</value>
+ </set>
+ </property>
+ <property name="customizer" ref="openApiCustomizer"/>
+
<property name="securityDefinitions">
<map>
<entry key="BasicAuthentication" value-ref="basicAuth"/>
@@ -167,7 +176,7 @@ under the License.
<ref bean="wadlGenerator"/>
</jaxrs:providers>
<jaxrs:features>
- <ref bean="swagger2Feature"/>
+ <ref bean="openapiFeature"/>
</jaxrs:features>
</jaxrs:server>
http://git-wip-us.apache.org/repos/asf/syncope/blob/7423435a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7afcc23..e77e3db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -417,8 +417,8 @@ under the License.
<log.directory>${project.build.directory}/log</log.directory>
<flowable-modeler.directory>${project.build.directory}/flowable-modeler</flowable-modeler.directory>
- <swagger-core.version>1.5.17</swagger-core.version>
- <swagger-ui.version>3.9.3</swagger-ui.version>
+ <swagger-core.version>2.0.0-rc4</swagger-core.version>
+ <swagger-ui.version>3.9.2</swagger-ui.version>
<guava.version>20.0</guava.version>
<jquery.version>2.2.4</jquery.version>
@@ -576,7 +576,7 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
+ <artifactId>cxf-rt-rs-service-description-openapi-v3</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
@@ -608,44 +608,20 @@ under the License.
<!-- Swagger -->
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-core.version}</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jaxrs</artifactId>
- <version>${swagger-core.version}</version>
<exclusions>
<exclusion>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-xml</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-yaml</artifactId>
- </exclusion>
- <exclusion>
<groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-joda</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>annotations</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
+ <artifactId>jackson-dataformat-yaml</artifactId>
</exclusion>
</exclusions>
+ </dependency>
+ <dependency>
+ <groupId>io.swagger.core.v3</groupId>
+ <artifactId>swagger-jaxrs2</artifactId>
+ <version>${swagger-core.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>