Skip to content

Commit

Permalink
Upd: Remove consentRecord.yaml and replace with ConsentRecord.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed Nov 21, 2023
1 parent cb150c4 commit 7922a2f
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 151 deletions.
98 changes: 27 additions & 71 deletions openapi/v2023.11.1/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ components:
ConsentRecord:
type: object
title: ConsentRecord
description: 'A Consent Record expresses consent (as defined in this building block''s specification) to a single DataAgreement. There must be a UNIQUE constraint on (agreementRevision, individual)'
description: 'A consent 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
Expand All @@ -394,21 +394,21 @@ components:
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.'
agreement:
$ref: '#/components/schemas/DataAgreement'
dataAgreementId:
type: string
x-fk-model: DataAgreement
description: The DataAgreement to which consent has been given
agreementRevision:
$ref: '#/components/schemas/Revision'
dataAgreementRevisionId:
type: string
x-fk-model: Revision
description: The Revision of the agreement which consent has been given to
agreementRevisionHash:
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.
individual:
$ref: '#/components/schemas/Individual'
individualId:
type: string
x-fk-model: Individual
description: The Individual who has signed this consent record
optIn:
Expand All @@ -421,8 +421,11 @@ components:
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'
signature:
$ref: '#/components/schemas/Signature'
enum:
- unsigned
- signed
signatureId:
type: string
x-fk-model: Signature
description: 'A signature that hashes all the values of the consent record and has signed it with the key of the Invidiual, making it verifiable and tamper-proof. TBD: Relation to a Signature schema?'
ConsentRecordFilter:
Expand Down Expand Up @@ -3271,7 +3274,7 @@ paths:
consentRecords:
type: array
items:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
pagination:
$ref: '#/components/schemas/Pagination'
description: ''
Expand Down Expand Up @@ -3301,7 +3304,7 @@ paths:
type: object
properties:
consentRecord:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
revision:
$ref: '#/components/schemas/Revision'
description: ''
Expand Down Expand Up @@ -3334,7 +3337,7 @@ paths:
consentRecords:
type: array
items:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
pagination:
$ref: '#/components/schemas/Pagination'
description: ''
Expand Down Expand Up @@ -3365,7 +3368,7 @@ paths:
type: object
properties:
consentRecord:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
revision:
$ref: '#/components/schemas/Revision'
description: ''
Expand Down Expand Up @@ -3394,7 +3397,7 @@ paths:
type: object
properties:
consentRecord:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
description: ''
'400':
description: bad input parameter
Expand Down Expand Up @@ -3439,7 +3442,7 @@ paths:
type: object
properties:
consentRecord:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
signature:
$ref: '#/components/schemas/Signature'
description: ''
Expand All @@ -3466,7 +3469,7 @@ paths:
schema:
properties:
consentRecord:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
description: An object of type DataAgreementRecord
signature:
$ref: '#/components/schemas/Signature'
Expand All @@ -3483,7 +3486,7 @@ paths:
type: object
properties:
consentRecord:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
revision:
$ref: '#/components/schemas/Revision'
signature:
Expand Down Expand Up @@ -3516,7 +3519,7 @@ paths:
properties:
consentRecords:
items:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
type: array
pagination:
$ref: '#/components/schemas/Pagination'
Expand Down Expand Up @@ -3596,7 +3599,7 @@ paths:
type: object
properties:
consentRecord:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
revision:
$ref: '#/components/schemas/Revision'
description: ''
Expand Down Expand Up @@ -3705,7 +3708,7 @@ paths:
properties:
consentRecords:
items:
$ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
$ref: '#/components/schemas/ConsentRecord'
type: array
pagination:
$ref: '#/components/schemas/Pagination'
Expand Down Expand Up @@ -4111,7 +4114,7 @@ paths:
consentRecords:
items:
allOf:
- $ref: '#/paths/~1audit~1consent-record~1%7BconsentRecordId%7D/get/responses/200/content/application~1json/schema/properties/consentRecord'
- $ref: '#/components/schemas/ConsentRecord'
- type: object
properties:
timestamp:
Expand Down Expand Up @@ -4171,54 +4174,7 @@ paths:
type: object
properties:
consentRecord:
type: object
title: ConsentRecord
description: 'A consent 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.
individualId:
type: string
x-fk-model: Individual
description: The Individual who has signed this consent 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 consent record and has signed it with the key of the Invidiual, making it verifiable and tamper-proof. TBD: Relation to a Signature schema?'
$ref: '#/components/schemas/ConsentRecord'
description: ''
'400':
description: bad input parameter
Expand Down
25 changes: 14 additions & 11 deletions openapi/v2023.11.1/definitions/ConsentRecord.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
type: object
title: ConsentRecord
description: "A Consent Record expresses consent (as defined in this building block's specification) to a single DataAgreement. There must be a UNIQUE constraint on (agreementRevision, individual)"
description: "A consent 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:
Expand All @@ -14,24 +14,24 @@ properties:
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.'

agreement:
$ref: "./DataAgreement.yaml"
dataAgreementId:
type: string
x-fk-model: "DataAgreement"
description: "The DataAgreement to which consent has been given"

agreementRevision:
$ref: "./Revision.yaml"
dataAgreementRevisionId:
type: string
x-fk-model: "Revision"
description: "The Revision of the agreement which consent has been given to"
description: "The Revision of the data agreement which consent has been given to"

agreementRevisionHash:
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."

individual:
$ref: "./Individual.yaml"
individualId:
type: string
x-fk-model: "Individual"
description: "The Individual who has signed this consent record"

Expand All @@ -46,8 +46,11 @@ properties:
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

signature:
$ref: "./Signature.yaml"
signatureId:
type: string
x-fk-model: "Signature"
description: "A signature that hashes all the values of the consent record and has signed it with the key of the Invidiual, making it verifiable and tamper-proof. TBD: Relation to a Signature schema?"
56 changes: 0 additions & 56 deletions openapi/v2023.11.1/definitions/consentRecord.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion openapi/v2023.11.1/paths/auditDataAgreementRecordRead.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ responses:
type: object
properties:
consentRecord:
$ref: ../definitions/consentRecord.yaml
$ref: ../definitions/ConsentRecord.yaml
description: ""
"400":
description: bad input parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ responses:
consentRecords:
items:
allOf:
- $ref: ../definitions/consentRecord.yaml
- $ref: ../definitions/ConsentRecord.yaml
- $ref: "../definitions/ListDataAgreementRecordExtras.yaml"
type: array
pagination:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ responses:
type: object
properties:
consentRecord:
$ref: ../definitions/consentRecord.yaml
$ref: ../definitions/ConsentRecord.yaml
revision:
$ref: ../definitions/Revision.yaml
description: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requestBody:
schema:
properties:
consentRecord:
$ref: ../definitions/consentRecord.yaml
$ref: ../definitions/ConsentRecord.yaml
description: An object of type DataAgreementRecord
signature:
$ref: ../definitions/Signature.yaml
Expand All @@ -26,7 +26,7 @@ responses:
type: object
properties:
consentRecord:
$ref: ../definitions/consentRecord.yaml
$ref: ../definitions/ConsentRecord.yaml
revision:
$ref: ../definitions/Revision.yaml
signature:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ responses:
type: object
properties:
consentRecord:
$ref: ../definitions/consentRecord.yaml
$ref: ../definitions/ConsentRecord.yaml
signature:
$ref: ../definitions/Signature.yaml
description: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ responses:
properties:
consentRecords:
items:
$ref: ../definitions/consentRecord.yaml
$ref: ../definitions/ConsentRecord.yaml
type: array
pagination:
$ref: "../definitions/Pagination.yaml"
Expand Down
Loading

0 comments on commit 7922a2f

Please sign in to comment.