-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: George J Padayatti <[email protected]>
- Loading branch information
1 parent
afc40fa
commit 79f8778
Showing
26 changed files
with
754 additions
and
809 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
type: object | ||
title: DataAgreementRecord | ||
description: "A data agreement record expresses consent (as defined in this building block's specification) to a single DataAgreement. There must be a UNIQUE constraint on (data agreement revision, individual)" | ||
x-not-in-database: false | ||
|
||
required: | ||
- id | ||
- agreementRevisionHash | ||
- state | ||
properties: | ||
id: | ||
type: string | ||
format: "" | ||
example: "" | ||
description: 'Objects may be passed back by some API endpoints without an id (PK), denoting that they are a "draft", i.e. a ConsentRecord that is not yet stored in the database and only exist in transit. Draft ConsentRecords do not have a Revision, but if paired up with a Signature, a valid Revision should be generated.' | ||
|
||
dataAgreementId: | ||
type: string | ||
x-fk-model: "DataAgreement" | ||
description: "The DataAgreement to which consent has been given" | ||
|
||
dataAgreementRevisionId: | ||
type: string | ||
x-fk-model: "Revision" | ||
description: "The Revision of the data agreement which consent has been given to" | ||
|
||
dataAgreementRevisionHash: | ||
type: string | ||
format: "" | ||
example: "" | ||
description: "Copy of the revision hash. The hash is the included in the signature and ensures against tampering with the original agreement." | ||
|
||
dataAttributes: | ||
type: array | ||
items: | ||
$ref: "./DataAttributeIntegrity.yaml" | ||
|
||
individualId: | ||
type: string | ||
x-fk-model: "Individual" | ||
description: "The Individual who has signed this data agreement record" | ||
|
||
optIn: | ||
type: boolean | ||
format: "" | ||
example: "" | ||
description: "True: The individual has positively opted in. False: The individual has explicitly said no (or withdrawn a previous consent)." | ||
|
||
state: | ||
type: string | ||
format: "" | ||
example: "" | ||
description: "The state field is used to record state changes after-the-fact. It is maintained by the Consent BB itself. Valid states: unsigned/pending more signatures/signed" | ||
enum: | ||
- unsigned | ||
- signed | ||
|
||
signatureId: | ||
type: string | ||
x-fk-model: "Signature" | ||
description: "A signature that hashes all the values of the data agreement record and has signed it with the key of the Invidiual, making it verifiable and tamper-proof. TBD: Relation to a Signature schema?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
type: object | ||
title: DataAttributeIntegrity | ||
properties: | ||
dataAttributeId: | ||
type: string | ||
description: "Data attribute id" | ||
|
||
dataAttributeRevisionId: | ||
type: string | ||
x-fk-model: "Revision" | ||
description: "The Revision of the data attribute which consent has been given to" | ||
|
||
dataAttributeRevisionHash: | ||
type: string | ||
format: "" | ||
example: "" | ||
description: "Copy of the revision hash. The hash is the included in the signature and ensures against tampering with the original data attribute." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: Unique ID of an object | ||
in: path | ||
name: dataAgreementRecordId | ||
required: true | ||
schema: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: Unique ID of an object | ||
in: path | ||
name: individualId | ||
required: true | ||
schema: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: Unique ID of an object | ||
in: path | ||
name: policyId | ||
required: true | ||
schema: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
description: LIST - List active data agreements | ||
operationId: serviceAgreementList | ||
parameters: | ||
- $ref: "../parameters/revisionId.yaml" | ||
- $ref: "../parameters/offset.yaml" | ||
- $ref: "../parameters/limit.yaml" | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
dataAgreements: | ||
items: | ||
$ref: ../definitions/DataAgreement.yaml | ||
type: array | ||
pagination: | ||
$ref: "../definitions/Pagination.yaml" | ||
description: "" | ||
"400": | ||
description: bad input parameter | ||
security: | ||
- BearerAuth: [] | ||
summary: LIST - List active data agreements | ||
tags: | ||
- service | ||
x-specification-crudl-model: DataAgreement | ||
x-specification-pii-or-sensitive: "False" | ||
x-specification-scenario: "" | ||
x-specification-usecase: UC-C-PIC-A-003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 10 additions & 24 deletions
34
openapi/v2023.8.2/paths/serviceCreateIndividualConsentRecord.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.