Skip to content

Commit

Permalink
Merge pull request #779 from dsmf/chore/639-fix-swagger-example-name
Browse files Browse the repository at this point in the history
Chore/639 fix swagger example name and improve formatting
  • Loading branch information
ds-jhartmann authored Jul 9, 2024
2 parents ec26668 + 8eda450 commit 21ba469
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 62 deletions.
112 changes: 56 additions & 56 deletions docs/src/api/irs-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ paths:
- api_key: []
summary: Lists the registered policies that should be accepted in EDC negotiation.
tags:
- Policy Store API
- Policy Store API
post:
description: Register a policy that should be accepted in EDC negotiation.
operationId: registerAllowedPolicy
Expand Down Expand Up @@ -917,7 +917,7 @@ paths:
- api_key: []
summary: Register a policy that should be accepted in EDC negotiation.
tags:
- Policy Store API
- Policy Store API
put:
description: Updates existing policies.
operationId: updateAllowedPolicy
Expand Down Expand Up @@ -970,38 +970,38 @@ paths:
- api_key: []
summary: Updates existing policies.
tags:
- Policy Store API
- Policy Store API
/irs/policies/paged:
get:
description: |
Fetch a page of policies with options to filter and sort.
- **Filtering:**
`search=<property>,[EQUALS|STARTS_WITH|BEFORE_LOCAL_DATE|AFTER_LOCAL_DATE],<value>`.
Example: 'search=BPN,STARTS_WITH,BPNL12&search=policyId,STARTS_WITH,policy2'.
Example: `search=BPN,STARTS_WITH,BPNL12&search=policyId,STARTS_WITH,policy2`.
- **Sorting:**
`sort=<property>,[asc|desc]`.
Example: 'sort=BPN,asc&sort=policyId,desc'.
Example: `sort=BPN,asc&sort=policyId,desc`.
- **Paging:**
Example: `page=1&size=20`
operationId: getPoliciesPaged
parameters:
- description: List of business partner numbers.
in: query
name: businessPartnerNumbers
required: false
schema:
type: array
items:
type: string
- description: List of business partner numbers.
in: query
name: businessPartnerNumbers
required: false
schema:
type: array
items:
type: string
responses:
"200":
content:
application/json:
examples:
error:
success:
$ref: '#/components/examples/get-policies-paged-result'
schema:
$ref: '#/components/schemas/Page'
Expand All @@ -1025,10 +1025,10 @@ paths:
$ref: '#/components/schemas/ErrorResponse'
description: Authorization refused by server.
security:
- api_key: [ ]
- api_key: []
summary: Find policies.
tags:
- Policy Store API
- Policy Store API
/irs/policies/{policyId}:
delete:
description: Removes a policy that should no longer be accepted in EDC negotiation.
Expand Down Expand Up @@ -1073,7 +1073,7 @@ paths:
- api_key: []
summary: Removes a policy that should no longer be accepted in EDC negotiation.
tags:
- Policy Store API
- Policy Store API
/irs/policies/{policyId}/bpnl/{bpnl}:
delete:
description: Removes a policy from BPNL that should no longer be accepted in
Expand Down Expand Up @@ -1126,7 +1126,7 @@ paths:
summary: Removes a policy from BPNL that should no longer be accepted in EDC
negotiation.
tags:
- Policy Store API
- Policy Store API
components:
examples:
aspect-models-list:
Expand Down Expand Up @@ -1520,44 +1520,44 @@ components:
get-policies-paged-result:
value:
content:
- bpn: BPNL1234567890AB
policy:
createdOn: 2024-07-08T12:01:19.4677109+02:00
permissions:
- action: use
constraint:
and: [ ]
or:
- leftOperand: Membership
operator:
'@id': eq
rightOperand: active
- leftOperand: FrameworkAgreement.traceability
operator:
'@id': eq
rightOperand: active
- leftOperand: PURPOSE
operator:
'@id': eq
rightOperand: ID 3.1 Trace
- action: access
constraint:
and: [ ]
or:
- leftOperand: Membership
operator:
'@id': eq
rightOperand: active
- leftOperand: FrameworkAgreement.traceability
operator:
'@id': eq
rightOperand: active
- leftOperand: PURPOSE
operator:
'@id': eq
rightOperand: ID 3.1 Trace
policyId: 13a8523f-c80a-40b8-9e43-faab47fbceaa
validUntil: 2025-07-08T12:01:19.4677109+02:00
- bpn: BPNL1234567890AB
policy:
createdOn: 2024-07-08T12:01:19.4677109+02:00
permissions:
- action: use
constraint:
and: []
or:
- leftOperand: Membership
operator:
'@id': eq
rightOperand: active
- leftOperand: FrameworkAgreement.traceability
operator:
'@id': eq
rightOperand: active
- leftOperand: PURPOSE
operator:
'@id': eq
rightOperand: ID 3.1 Trace
- action: access
constraint:
and: []
or:
- leftOperand: Membership
operator:
'@id': eq
rightOperand: active
- leftOperand: FrameworkAgreement.traceability
operator:
'@id': eq
rightOperand: active
- leftOperand: PURPOSE
operator:
'@id': eq
rightOperand: ID 3.1 Trace
policyId: 13a8523f-c80a-40b8-9e43-faab47fbceaa
validUntil: 2025-07-08T12:01:19.4677109+02:00
empty: false
first: false
last: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ public Map<String, List<PolicyResponse>> getPolicies(//
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "Find policies.", //
description = """
Fetch a page of policies with options to filter and sort.
Fetch a page of policies with options to filter and sort.
- **Filtering:**
- **Filtering:**
`search=<property>,[EQUALS|STARTS_WITH|BEFORE_LOCAL_DATE|AFTER_LOCAL_DATE],<value>`.
Example: 'search=BPN,STARTS_WITH,BPNL12&search=policyId,STARTS_WITH,policy2'.
Example: `search=BPN,STARTS_WITH,BPNL12&search=policyId,STARTS_WITH,policy2`.
- **Sorting:**
- **Sorting:**
`sort=<property>,[asc|desc]`.
Example: 'sort=BPN,asc&sort=policyId,desc'.
Example: `sort=BPN,asc&sort=policyId,desc`.
- **Paging:**
Example: `page=1&size=20`
Expand All @@ -234,7 +234,7 @@ public Map<String, List<PolicyResponse>> getPolicies(//
description = "Successfully retrieved the paged policies",
content = @Content(mediaType = APPLICATION_JSON_VALUE,
schema = @Schema(implementation = Page.class),
examples = @ExampleObject(name = "error",
examples = @ExampleObject(name = "success",
ref = "#/components/examples/get-policies-paged-result"))),

@ApiResponse(responseCode = "401", description = UNAUTHORIZED_DESC,
Expand Down

0 comments on commit 21ba469

Please sign in to comment.