Skip to content

Commit

Permalink
chore(documentation): [#639] deprecation note for GET /irs/policies
Browse files Browse the repository at this point in the history
(in future the paged endpoint should be used)
  • Loading branch information
dsmf committed Jul 23, 2024
1 parent cfd8475 commit 52ce755
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/src/api/irs-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ paths:
- Item Relationship Service
/irs/policies:
get:
deprecated: true
description: Lists the registered policies that should be accepted in EDC negotiation.
operationId: getAllowedPoliciesByBpn
parameters:
Expand Down Expand Up @@ -860,6 +861,7 @@ paths:
security:
- api_key: []
summary: Lists the registered policies that should be accepted in EDC negotiation.
(This method is DEPRECATED in favor of `/policies/paged`)
tags:
- Policy Store API
post:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr
}

@Operation(operationId = "getAllowedPoliciesByBpn",
summary = "Lists the registered policies that should be accepted in EDC negotiation.",
summary = "Lists the registered policies that should be accepted in EDC negotiation. "
+ "(This method is DEPRECATED in favor of `/policies/paged`)", deprecated = true,
security = @SecurityRequirement(name = API_KEY), tags = { POLICY_API_TAG },
description = "Lists the registered policies that should be accepted in EDC negotiation.")
@ApiResponses(value = { @ApiResponse(responseCode = "200",
Expand All @@ -192,11 +193,13 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr
@GetMapping("/policies")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("hasAuthority('" + IrsRoles.ADMIN_IRS + "')")
@Deprecated(forRemoval = true)
public Map<String, List<PolicyResponse>> getPolicies(//
@RequestParam(required = false) //
@ValidListOfBusinessPartnerNumbers(allowDefault = true) //
@Parameter(description = "List of business partner numbers. "
+ "This may also contain the value \"default\" in order to query the default policies.") //
+ "This may also contain the value \"default\" in order to query the default policies.")
//
final List<String> businessPartnerNumbers //
) {

Expand Down Expand Up @@ -263,7 +266,7 @@ public List<String> autocomplete(
@GetMapping("/policies/paged")
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "Find registered policies that should be accepted in EDC negotiation "
+ "(with filtering, sorting and paging).", //
+ "(with filtering, sorting and paging).", //
description = """
Fetch a page of policies with options to filter and sort.
\s
Expand Down Expand Up @@ -326,7 +329,8 @@ public Page<PolicyResponse> getPoliciesPaged(//
@RequestParam(required = false) //
@ValidListOfBusinessPartnerNumbers(allowDefault = true) //
@Parameter(name = "businessPartnerNumbers", description = "List of business partner numbers. "
+ "This may also contain the value \"default\" in order to query the default policies.") //
+ "This may also contain the value \"default\" in order to query the default policies.")
//
final List<String> businessPartnerNumbers) {

if (pageable.getPageSize() > MAX_PAGE_SIZE) {
Expand Down

0 comments on commit 52ce755

Please sign in to comment.