Skip to content

Commit

Permalink
chore: docs / typos
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtreier committed Aug 18, 2023
1 parent 9672815 commit b516133
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void test_create_list() {
createPolicyDefinition("my-policy-def-1");

// act
var response = client.uiApi().policyPage();
var response = client.uiApi().policyDefinitionPage();

// assert
var policyDefinitions = response.getPolicies();
Expand All @@ -81,7 +81,7 @@ void test_sorting(PolicyDefinitionService policyDefinitionService) {
createPolicyDefinition(policyDefinitionService, "my-policy-def-1", 1628956801000L);

// act
var result = client.uiApi().policyPage();
var result = client.uiApi().policyDefinitionPage();

// assert
assertThat(result.getPolicies())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
import lombok.Setter;
import lombok.ToString;

/**
* Opinionated subset of the EDC policy for our EDC UI.
*/
@Getter
@Setter
@ToString
Expand All @@ -33,10 +30,10 @@
@RequiredArgsConstructor
@Schema(description = "Data for creating a Policy Definition")
public class PolicyDefinitionCreateRequest {
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "Policy Definition ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String policyDefinitionId;

@Schema(description = "UIPolicy Create Dto", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "Policy Contents", requiredMode = Schema.RequiredMode.REQUIRED)
private UiPolicyCreateRequest uiPolicyDto;
}

Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

/**
* Opinionated subset of the EDC policy for our EDC UI.
*/
@Getter
@Setter
@ToString
Expand All @@ -28,10 +25,10 @@
@RequiredArgsConstructor
@Schema(description = "Policy Definition as required for the Policy Definition Page")
public class PolicyDefinitionDto {
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "Policy Definition ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String policyDefinitionId;

@Schema(description = "UIPolicy Dto", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "Policy Contents", requiredMode = Schema.RequiredMode.REQUIRED)
private UiPolicyDto uiPolicyDto;
}

Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,23 @@ public IdResponseDto deleteContractDefinition(@PathParam("contractDefinitionId")
}

@GET
@Path("pages/policy/page/policies")
@Path("pages/policy-page")
@Produces(MediaType.APPLICATION_JSON)
@Operation(description = "Collect all data for Policy Page")
public PolicyDefinitionPage policyPage() {
public PolicyDefinitionPage policyDefinitionPage() {
return new PolicyDefinitionPage(policyDefinitionApiService.getPolicies());
}

@POST
@Path("pages/policy/page/policies")
@Path("pages/policy-page/policies")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Operation(description = "Create a new Policy")
public IdResponseDto createPolicyDefinition(PolicyDefinitionCreateRequest policyDefinitionDtoDto) {
return policyDefinitionApiService.createPolicy(policyDefinitionDtoDto);
}
@DELETE
@Path("pages/policy/page/policies/{policyId}")
@Path("pages/policy-page/policies/{policyId}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(description = "Delete a Policy")
public IdResponseDto deletePolicyDefinition(@PathParam("policyId") String policyId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/

package de.sovity.edc.ext.wrapper.api.ui.model;

import de.sovity.edc.ext.wrapper.api.common.model.PolicyDefinitionDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
Expand All @@ -22,6 +23,7 @@

@Data
@AllArgsConstructor
@Schema(description = "All data for the policy page as required by the UI", requiredMode = Schema.RequiredMode.REQUIRED)
public class PolicyDefinitionPage {
@Schema(description = "Policy Entries", requiredMode = Schema.RequiredMode.REQUIRED)
private List<PolicyDefinitionDto> policies;
Expand Down

0 comments on commit b516133

Please sign in to comment.