Skip to content

Commit

Permalink
chore: add smoke tests for generated api clients
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Pinsel <[email protected]>
  • Loading branch information
DominikPinsel committed Feb 2, 2024
1 parent 0fe8629 commit e59e245
Show file tree
Hide file tree
Showing 10 changed files with 230 additions and 50 deletions.
18 changes: 9 additions & 9 deletions documentation/api/v2/Apis/AdministratorApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create Verifiable Credential

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -62,7 +62,7 @@ Create Wallet for User

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -89,7 +89,7 @@ null (empty response body)

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -116,7 +116,7 @@ null (empty response body)

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -143,7 +143,7 @@ Get Verifiable Credentials by Id

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand Down Expand Up @@ -175,7 +175,7 @@ Get Verifiable Credentials

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -202,7 +202,7 @@ Get Wallet for User

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand Down Expand Up @@ -230,7 +230,7 @@ Get All Wallets

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -257,7 +257,7 @@ Update Wallet for User

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand Down
24 changes: 12 additions & 12 deletions documentation/api/v2/Apis/UserApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Create Verifiable Credential

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -65,7 +65,7 @@ null (empty response body)

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand Down Expand Up @@ -94,7 +94,7 @@ Get Issued Verifiable Credentials

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -121,7 +121,7 @@ Get Verifiable Credential by ID

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand Down Expand Up @@ -151,7 +151,7 @@ Get Verifiable Credentials

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -175,7 +175,7 @@ This endpoint does not need any parameter.

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -202,7 +202,7 @@ Issue Verifiable Credential

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -229,7 +229,7 @@ Issue Verifiable Presentation

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -256,7 +256,7 @@ Issue Verifiable Presentation as JWT

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -283,7 +283,7 @@ Validate Verifiable Credential

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -310,7 +310,7 @@ Validate Verifiable JWT Presentation

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand All @@ -337,7 +337,7 @@ Validate Verifiable Presentation

### Authorization

No authorization required
[OAuth2](../README.md#OAuth2)

### HTTP request headers

Expand Down
5 changes: 2 additions & 3 deletions documentation/api/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ All URIs are relative to */api/v2*
- **Flow**: accessCode
- **Authorization URL**: https://example.com/oauth/authorize
- **Scopes**:
- read: Grants read access
- write: Grants write access
- admin: Grants access to admin operations
- miw:admin: Grants access to admin operations
- miw:user: Grants access to user operations

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

@NoArgsConstructor(access = lombok.AccessLevel.PRIVATE)
public class ApiRolesV2 {
public static final String ADMIN = "MIW_ADMIN";
public static final String ADMIN = "miw:admin";
public static final String ADMIN_ROLE = "ROLE_" + ADMIN;
public static final String WALLET_OWNER = "MIW_WALLET_OWNER";
public static final String WALLET_OWNER = "miw:user";
public static final String WALLET_OWNER_ROLE = "ROLE_" + WALLET_OWNER;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.smartsensesolutions.java.commons.specification.SpecificationUtil;
Expand Down Expand Up @@ -80,8 +83,8 @@ public ObjectMapper objectMapper() {
SimpleModule simpleModule = new SimpleModule();
simpleModule.addSerializer(OffsetDateTime.class, new JsonSerializer<OffsetDateTime>() {
@Override
public void serialize(OffsetDateTime offsetDateTime, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException {
jsonGenerator.writeString(DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(offsetDateTime));
public void serialize(OffsetDateTime offsetDateTime, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
jsonGenerator.writeString(DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(offsetDateTime));
}
});
objectMapper.registerModule(simpleModule);
Expand Down
Loading

0 comments on commit e59e245

Please sign in to comment.