This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/archiva-redback-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 99f4c31  REST API build changes
99f4c31 is described below

commit 99f4c31d7209d03a5182d66d6dd755624a9acb80
Author: Martin Stockhammer <[email protected]>
AuthorDate: Fri Sep 24 21:50:02 2021 +0200

    REST API build changes
---
 redback-integrations/redback-rest/redback-rest-api/pom.xml        | 1 +
 .../src/main/resources/redback/openapi-configuration.yaml         | 8 ++++++--
 redback-integrations/redback-rest/redback-rest-services/pom.xml   | 2 +-
 .../redback/rest/services/v2/AbstractNativeRestServices.java      | 3 +--
 .../redback/rest/services/v2/NativeAuthenticationServiceTest.java | 1 -
 .../archiva/redback/rest/services/v2/NativeRoleServiceTest.java   | 2 --
 .../archiva/redback/rest/services/v2/NativeUserServiceTest.java   | 8 --------
 7 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/redback-integrations/redback-rest/redback-rest-api/pom.xml 
b/redback-integrations/redback-rest/redback-rest-api/pom.xml
index 2b30768..c6ad1dd 100644
--- a/redback-integrations/redback-rest/redback-rest-api/pom.xml
+++ b/redback-integrations/redback-rest/redback-rest-api/pom.xml
@@ -96,6 +96,7 @@
             <exclude>target/generated</exclude>
             <exclude>src/main/resources/templates/*</exclude>
             <exclude>src/main/resources/openapi-codegen-ignore</exclude>
+            
<exclude>src/main/resources/redback/openapi-configuration.yaml</exclude>
           </excludes>
         </configuration>
       </plugin>
diff --git 
a/redback-integrations/redback-rest/redback-rest-api/src/main/resources/redback/openapi-configuration.yaml
 
b/redback-integrations/redback-rest/redback-rest-api/src/main/resources/redback/openapi-configuration.yaml
index 6160011..2c6b163 100644
--- 
a/redback-integrations/redback-rest/redback-rest-api/src/main/resources/redback/openapi-configuration.yaml
+++ 
b/redback-integrations/redback-rest/redback-rest-api/src/main/resources/redback/openapi-configuration.yaml
@@ -26,11 +26,15 @@ openAPI:
       description: Authentication operations for Login and token refresh
     - name: v2/Groups
       description: Group operations
+    - name: v2/Users
+      description: User operations
+    - name: v2/Roles
+      description: Managing of roles
     - name: v1
       description: Version 1 REST API (deprecated)
 
   info:
-    version: '3.0'
+    version: '3.0.0'
     title: Apache Archiva Redback REST API
     description: 'This is the Apache Archiva Redback REST API documentation'
     termsOfService: https://archiva.apache.org
@@ -39,4 +43,4 @@ openAPI:
       url: https://archiva.apache.org/index.html
     license:
       name: Apache 2.0
-      url: http://www.apache.org/licenses/LICENSE-2.0.html
\ No newline at end of file
+      url: https://www.apache.org/licenses/LICENSE-2.0.html
\ No newline at end of file
diff --git a/redback-integrations/redback-rest/redback-rest-services/pom.xml 
b/redback-integrations/redback-rest/redback-rest-services/pom.xml
index 781283c..93bf9f7 100644
--- a/redback-integrations/redback-rest/redback-rest-services/pom.xml
+++ b/redback-integrations/redback-rest/redback-rest-services/pom.xml
@@ -223,7 +223,7 @@
     <dependency>
       <groupId>org.webjars</groupId>
       <artifactId>swagger-ui</artifactId>
-      <version>3.28.0</version>
+      <version>3.51.2</version>
     </dependency>
 
     <dependency>
diff --git 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/AbstractNativeRestServices.java
 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/AbstractNativeRestServices.java
index 1523387..a9ea6d6 100644
--- 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/AbstractNativeRestServices.java
+++ 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/AbstractNativeRestServices.java
@@ -419,9 +419,8 @@ public abstract class AbstractNativeRestServices
         Response result = given( ).spec( getAuthRequestSpecBuilder().build() )
             .contentType( JSON )
             .body( jsonAsMap )
-            .when( ).post( "/authenticate").prettyPeek().then( ).statusCode( 
200 )
+            .when( ).post( "/authenticate").then( ).statusCode( 200 )
             .extract( ).response( );
-        result.getBody( ).prettyPrint( );
         return result.body( ).jsonPath( ).getString( "access_token" );
     }
     protected String getAdminToken()  {
diff --git 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeAuthenticationServiceTest.java
 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeAuthenticationServiceTest.java
index 9c0eda0..1733d70 100644
--- 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeAuthenticationServiceTest.java
+++ 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeAuthenticationServiceTest.java
@@ -177,7 +177,6 @@ public class NativeAuthenticationServiceTest extends 
AbstractNativeRestServices
             .contentType( JSON )
             .when( ).get( "/authenticated" ).then( ).statusCode( 200 )
             .extract( ).response( );
-        System.out.println( result.getBody( ).prettyPrint( ) );
         assertEquals( "admin", result.getBody( ).jsonPath( ).getString( 
"user_id" ) );
 
     }
diff --git 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeRoleServiceTest.java
 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeRoleServiceTest.java
index 59b2c25..b2cb0bd 100644
--- 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeRoleServiceTest.java
+++ 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeRoleServiceTest.java
@@ -253,7 +253,6 @@ public class NativeRoleServiceTest extends 
AbstractNativeRestServices
                 .when( ).params( params ).get( ).then( ).statusCode( 200 
).extract( ).response( );
             List<RoleInfo> userData = response.body( ).jsonPath( ).getList( 
"data", RoleInfo.class );
             assertNotNull( userData );
-            response.getBody( ).jsonPath( ).prettyPrint( );
             assertEquals( 10, userData.size( ) );
             assertEquals( Integer.valueOf( 1 ), response.body( ).jsonPath( 
).get( "pagination.offset" ) );
             assertEquals( Integer.valueOf( 10 ), response.body( ).jsonPath( 
).get( "pagination.limit" ) );
@@ -292,7 +291,6 @@ public class NativeRoleServiceTest extends 
AbstractNativeRestServices
             params.put( "order", "desc" );
             Response response = given( ).spec( getRequestSpec( token ) 
).contentType( JSON )
                 .when( ).params( params ).get( ).then( ).statusCode( 200 
).extract( ).response( );
-            response.getBody( ).jsonPath( ).prettyPrint( );
             List<RoleInfo> userData = response.body( ).jsonPath( ).getList( 
"data", RoleInfo.class );
             assertNotNull( userData );
             // admin user has [email protected] as email so is after aragorn
diff --git 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeUserServiceTest.java
 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeUserServiceTest.java
index 5571266..3480af3 100644
--- 
a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeUserServiceTest.java
+++ 
b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeUserServiceTest.java
@@ -419,8 +419,6 @@ public class NativeUserServiceTest extends 
AbstractNativeRestServices
                 .when( )
                 .redirects( ).follow( false ) // Rest assured default is 
following the 303 redirect
                 .post( )
-                .prettyPeek( )
-                .peek( )
                 .then( ).statusCode( 303 ).extract( ).response( );
             assertTrue( response.getHeader( "Location" ).endsWith( "/aragorn" 
) );
         }
@@ -567,7 +565,6 @@ public class NativeUserServiceTest extends 
AbstractNativeRestServices
                 .body( jsonAsMap )
                 .when( )
                 .put( "aragorn" )
-                .prettyPeek( )
                 .then( ).statusCode( 422 ).extract( ).response( );
             assertNotNull( response );
             assertEquals( "user.password.violation.reuse", response.body( 
).jsonPath( ).get( "error_messages[0].error_key" ) );
@@ -1336,7 +1333,6 @@ public class NativeUserServiceTest extends 
AbstractNativeRestServices
             Response response = given( ).spec( getRequestSpec( token ) 
).contentType( JSON )
                 .when( )
                 .get( "aragorn/operations" )
-                .prettyPeek( )
                 .then( ).statusCode( 200 ).extract( ).response( );
             List<Operation> result = response.getBody( ).jsonPath( ).getList( 
"", Operation.class );
             assertNotNull( result );
@@ -1376,7 +1372,6 @@ public class NativeUserServiceTest extends 
AbstractNativeRestServices
             given( ).spec( getRequestSpec( token ) ).contentType( JSON )
                 .when( )
                 .get( "admin/operations" )
-                .prettyPeek( )
                 .then( ).statusCode( 403 );
         }
         finally
@@ -1446,7 +1441,6 @@ public class NativeUserServiceTest extends 
AbstractNativeRestServices
             Response response = given( ).spec( getRequestSpec( token ) 
).contentType( JSON )
                 .when( )
                 .get( "me/operations" )
-                .prettyPeek( )
                 .then( ).statusCode( 200 ).extract( ).response( );
             List<Operation> result = response.getBody( ).jsonPath( ).getList( 
"", Operation.class );
             assertNotNull( result );
@@ -1550,7 +1544,6 @@ public class NativeUserServiceTest extends 
AbstractNativeRestServices
             assertNotNull( response );
             jsonPath = response.getBody( ).jsonPath( );
             roleList = jsonPath.getList( "", RoleInfo.class );
-            jsonPath.prettyPrint( );
             assertEquals( 4, roleList.size( ) );
             assertTrue( roleList.stream( ).filter( role -> 
"system-administrator".equals( role.getId( ) ) ).findAny( ).isPresent( ) );
             assertTrue( roleList.stream( ).filter( role -> 
"archiva-global-repository-manager".equals( role.getId( ) ) ).findAny( 
).isPresent( ) );
@@ -1612,7 +1605,6 @@ public class NativeUserServiceTest extends 
AbstractNativeRestServices
                 .get( "admin/roletree" )
                 .then( ).statusCode( 200 ).extract( ).response( );
             assertNotNull( response );
-            System.out.println( response.getBody( ).prettyPrint( ) );
             jsonPath = response.getBody( ).jsonPath( );
             assertTrue( jsonPath.getMap( "applications" ).containsKey( 
"System" ) );
             assertTrue( jsonPath.getMap( "applications" ).containsKey( 
"Archiva" ) );

Reply via email to