Skip to content

Commit

Permalink
Upd: Use object in the response
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed Oct 12, 2023
1 parent 3c4a45e commit 549c5a5
Show file tree
Hide file tree
Showing 10 changed files with 193 additions and 129 deletions.
105 changes: 71 additions & 34 deletions openapi/v2023.8.2/bundled.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
components:
schemas:
Pagination:
type: object
title: Pagination
properties:
currentPage:
type: integer
description: Current page number
totalItems:
type: integer
description: Total number of items available
totalPages:
type: integer
description: Total number of pages based on limit
limit:
type: integer
description: Number of items per page
hasPrevious:
type: boolean
description: Indicates if there's a previous page
hasNext:
type: boolean
description: Indicates if there's a next page
Agreement:
type: object
title: Agreement
Expand Down Expand Up @@ -1069,21 +1091,33 @@ paths:
required: false
schema:
type: integer
- description: Requested number of resources to be provided in response requested by client
- name: limit
in: query
name: limit
description: Number of items returned per page. Requested number of resources to be provided in response requested by client
required: false
schema:
type: integer
default: 10
- name: page
in: query
description: Page number
required: false
schema:
type: integer
default: 1
responses:
'200':
content:
application/json:
schema:
items:
oneOf:
- $ref: '#/components/schemas/Policy'
type: array
type: object
properties:
policies:
items:
$ref: '#/components/schemas/Policy'
type: array
pagination:
$ref: '#/components/schemas/Pagination'
description: A list of Policy objects readable for the current session's credentials.
'400':
description: bad input parameter
Expand Down Expand Up @@ -1117,11 +1151,12 @@ paths:
content:
application/json:
schema:
items:
oneOf:
- $ref: '#/components/schemas/Policy'
- $ref: '#/components/schemas/Revision'
type: array
type: object
properties:
policy:
$ref: '#/components/schemas/Policy'
revision:
$ref: '#/components/schemas/Revision'
description: 'A set consisting of the new Policy object created, together with the initial Revision object.'
'400':
description: bad input parameter
Expand Down Expand Up @@ -1184,11 +1219,12 @@ paths:
content:
application/json:
schema:
items:
oneOf:
- $ref: '#/components/schemas/Policy'
- $ref: '#/components/schemas/Revision'
type: array
type: object
properties:
policy:
$ref: '#/components/schemas/Policy'
revision:
$ref: '#/components/schemas/Revision'
description: ''
'400':
description: bad input parameter
Expand Down Expand Up @@ -1227,11 +1263,12 @@ paths:
content:
application/json:
schema:
items:
oneOf:
- $ref: '#/components/schemas/Policy'
- $ref: '#/components/schemas/Revision'
type: array
type: object
properties:
policy:
$ref: '#/components/schemas/Policy'
revision:
$ref: '#/components/schemas/Revision'
description: ''
'400':
description: bad input parameter
Expand All @@ -1255,24 +1292,24 @@ paths:
required: true
schema:
type: string
- description: Requested index for start of resources to be provided in response requested by client
in: query
name: offset
required: false
schema:
type: integer
- description: Requested number of resources to be provided in response requested by client
in: query
name: limit
required: false
schema:
type: integer
- $ref: '#/paths/~1config~1policies/get/parameters/1'
- $ref: '#/paths/~1config~1policies/get/parameters/2'
- $ref: '#/paths/~1config~1policies/get/parameters/3'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Policy'
type: object
properties:
policy:
$ref: '#/components/schemas/Policy'
revisions:
type: array
items:
$ref: '#/components/schemas/Revision'
pagination:
$ref: '#/components/schemas/Pagination'
description: ''
'400':
description: bad input parameter
Expand Down
21 changes: 21 additions & 0 deletions openapi/v2023.8.2/definitions/Pagination.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
type: object
title: Pagination
properties:
currentPage:
type: integer
description: Current page number
totalItems:
type: integer
description: Total number of items available
totalPages:
type: integer
description: Total number of pages based on limit
limit:
type: integer
description: Number of items per page
hasPrevious:
type: boolean
description: Indicates if there's a previous page
hasNext:
type: boolean
description: Indicates if there's a next page
52 changes: 29 additions & 23 deletions openapi/v2023.8.2/index.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
components:
schemas:
Pagination:
$ref: "./definitions/Pagination.yaml"
Agreement:
$ref: ./definitions/Agreement.yaml
AgreementData:
Expand Down Expand Up @@ -45,7 +47,8 @@ info:
email: [email protected]
name: iGrant.io
url: https://igrant.io
description: The Consent Building Block enables services for individuals to approve
description:
The Consent Building Block enables services for individuals to approve
the use of their personal data by defining the principles, functions, and architecture of
an information system. For organisations that process personal data, it provides
the ability to know the individual's will and legitimately process such personal
Expand Down Expand Up @@ -196,26 +199,29 @@ paths:
post:
$ref: ./paths/serviceVerificationAgreementListFilter.yaml
servers:
- description: Development server
url: https://api.bb-consent.dev/v2
- description: Staging server
url: https://staging-consent-bb-api.igrant.io/v2
- description: Demo server
url: https://demo-consent-bb-api.igrant.io/v2
- description: Development server
url: https://api.bb-consent.dev/v2
- description: Staging server
url: https://staging-consent-bb-api.igrant.io/v2
- description: Demo server
url: https://demo-consent-bb-api.igrant.io/v2
tags:
- description: Operations for external auditing systems to query detailed data from
the system and subscribe to notifications.
name: audit
x-tag-expanded: false
- description: Secured operations available to organization API integration
name: config
x-tag-expanded: false
- description: Secured operations for individuals, data consumers and applications
to record and verify consent
name: service
x-tag-expanded: false
- description: These are used for onboard the organisation, organisation admin and
individual users to the system. It also deals with all authentication and authorisation
APIs that can be configured towards external IDPs.
name: onboard
x-tag-expanded: false
- description:
Operations for external auditing systems to query detailed data from
the system and subscribe to notifications.
name: audit
x-tag-expanded: false
- description: Secured operations available to organization API integration
name: config
x-tag-expanded: false
- description:
Secured operations for individuals, data consumers and applications
to record and verify consent
name: service
x-tag-expanded: false
- description:
These are used for onboard the organisation, organisation admin and
individual users to the system. It also deals with all authentication and authorisation
APIs that can be configured towards external IDPs.
name: onboard
x-tag-expanded: false
2 changes: 1 addition & 1 deletion openapi/v2023.8.2/parameters/limit.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: limit
in: query
description: Number of items to return per page
description: Number of items returned per page. Requested number of resources to be provided in response requested by client
required: false
schema:
type: integer
Expand Down
6 changes: 6 additions & 0 deletions openapi/v2023.8.2/parameters/offset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Requested index for start of resources to be provided in response requested by client
in: query
name: offset
required: false
schema:
type: integer
11 changes: 6 additions & 5 deletions openapi/v2023.8.2/paths/configCreatePolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ responses:
content:
application/json:
schema:
items:
oneOf:
- $ref: ../definitions/Policy.yaml
- $ref: ../definitions/Revision.yaml
type: array
type: object
properties:
policy:
$ref: ../definitions/Policy.yaml
revision:
$ref: ../definitions/Revision.yaml
description: A set consisting of the new Policy object created, together with
the initial Revision object.
'400':
Expand Down
51 changes: 22 additions & 29 deletions openapi/v2023.8.2/paths/configListPolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,37 @@
description: LIST - Fetch all policies
operationId: configListPolicy
parameters:
- description: An object with id revisionId
in: query
name: revisionId
required: false
schema:
type: string
- description: Requested index for start of resources to be provided in response requested
by client
in: query
name: offset
required: false
schema:
type: integer
- description: Requested number of resources to be provided in response requested
by client
in: query
name: limit
required: false
schema:
type: integer
- description: An object with id revisionId
in: query
name: revisionId
required: false
schema:
type: string
- $ref: "../parameters/offset.yaml"
- $ref: "../parameters/limit.yaml"
- $ref: "../parameters/page.yaml"
responses:
'200':
"200":
content:
application/json:
schema:
items:
oneOf:
- $ref: ../definitions/Policy.yaml
type: array
type: object
properties:
policies:
items:
$ref: ../definitions/Policy.yaml
type: array
pagination:
$ref: "../definitions/Pagination.yaml"
description: A list of Policy objects readable for the current session's credentials.
'400':
"400":
description: bad input parameter
security:
- BearerAuth: []
summary: LIST - Fetch all policies
tags:
- config
- config
x-specification-crudl-model: Policy
x-specification-pii-or-sensitive: 'False'
x-specification-scenario: ''
x-specification-pii-or-sensitive: "False"
x-specification-scenario: ""
x-specification-usecase: UC-C-PIC-A-001, UC-C-PIC-A-002
Loading

0 comments on commit 549c5a5

Please sign in to comment.