diff --git a/CHANGELOG.md b/CHANGELOG.md
index fc9e0f5..afc7a7e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,20 @@
Mudanças relevantes na API do DICT serão documentadas aqui.
+## [1.0.0-RC4] - 2020-06-24
+### Adicionado
+- Campo Reason em ConfirmClaimRequest (correção da spec)
+- Campo Participant em AcknowledgeClaimRequest, CancelClaimRequest, ConfirmClaimRequest, CompleteClaimRequest e DeleteEntryRequest
+- Erro InternalServerError (spec omitia)
+- Definições de idempotência para operações de acknowledgeClaim, confirmClaim e cancelClaim
+
+### Alterado
+- Campo SyncVerifier tornou-se ParticipantSyncVerifier em SyncVerification
+
+### Removido
+- Campo Reason de CompleteClaimRequest (correção da spec)
+- Campo SyncVerifierLastModified de ExtendedSyncVerification
+
## [1.0.0-RC3] - 2020-05-29
### Adicionado
- Campo opcional correlationId a Problem
diff --git a/openapi/examples/claims/AcknowledgeClaimRequest.xml b/openapi/examples/claims/AcknowledgeClaimRequest.xml
index 32876a3..136259a 100644
--- a/openapi/examples/claims/AcknowledgeClaimRequest.xml
+++ b/openapi/examples/claims/AcknowledgeClaimRequest.xml
@@ -2,4 +2,5 @@
123e4567-e89b-12d3-a456-426655440000
+ 12345678
\ No newline at end of file
diff --git a/openapi/examples/claims/AcknowledgeClaimResponse.xml b/openapi/examples/claims/AcknowledgeClaimResponse.xml
index fe9495e..06ea1ba 100644
--- a/openapi/examples/claims/AcknowledgeClaimResponse.xml
+++ b/openapi/examples/claims/AcknowledgeClaimResponse.xml
@@ -7,7 +7,7 @@
PHONE
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/claims/CancelClaimRequest.xml b/openapi/examples/claims/CancelClaimRequest.xml
index 67a9317..18d6740 100644
--- a/openapi/examples/claims/CancelClaimRequest.xml
+++ b/openapi/examples/claims/CancelClaimRequest.xml
@@ -2,5 +2,6 @@
123e4567-e89b-12d3-a456-426655440000
+ 12345678
USER_REQUESTED
\ No newline at end of file
diff --git a/openapi/examples/claims/CancelClaimResponse.xml b/openapi/examples/claims/CancelClaimResponse.xml
index 55576fe..b5e1f51 100644
--- a/openapi/examples/claims/CancelClaimResponse.xml
+++ b/openapi/examples/claims/CancelClaimResponse.xml
@@ -7,7 +7,7 @@
PHONE
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/claims/CompleteClaimRequest.xml b/openapi/examples/claims/CompleteClaimRequest.xml
index 4eb00d5..c280759 100644
--- a/openapi/examples/claims/CompleteClaimRequest.xml
+++ b/openapi/examples/claims/CompleteClaimRequest.xml
@@ -2,5 +2,6 @@
123e4567-e89b-12d3-a456-426655440000
+ 12345678
a946d533-7f22-42a5-9a9b-e87cd55c0f4d
\ No newline at end of file
diff --git a/openapi/examples/claims/CompleteClaimResponse.xml b/openapi/examples/claims/CompleteClaimResponse.xml
index 052f06f..00277b1 100644
--- a/openapi/examples/claims/CompleteClaimResponse.xml
+++ b/openapi/examples/claims/CompleteClaimResponse.xml
@@ -7,7 +7,7 @@
PHONE
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/claims/ConfirmClaimRequest.xml b/openapi/examples/claims/ConfirmClaimRequest.xml
index ca384d4..9a53539 100644
--- a/openapi/examples/claims/ConfirmClaimRequest.xml
+++ b/openapi/examples/claims/ConfirmClaimRequest.xml
@@ -2,5 +2,6 @@
123e4567-e89b-12d3-a456-426655440000
+ 12345678
USER_REQUESTED
\ No newline at end of file
diff --git a/openapi/examples/claims/ConfirmClaimResponse.xml b/openapi/examples/claims/ConfirmClaimResponse.xml
index 8620197..db956fa 100644
--- a/openapi/examples/claims/ConfirmClaimResponse.xml
+++ b/openapi/examples/claims/ConfirmClaimResponse.xml
@@ -7,7 +7,7 @@
PHONE
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/claims/CreateClaimRequest.xml b/openapi/examples/claims/CreateClaimRequest.xml
index 30cb15e..c8dd0ad 100644
--- a/openapi/examples/claims/CreateClaimRequest.xml
+++ b/openapi/examples/claims/CreateClaimRequest.xml
@@ -7,7 +7,7 @@
PHONE
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/claims/CreateClaimResponse.xml b/openapi/examples/claims/CreateClaimResponse.xml
index e231fb8..baf3393 100644
--- a/openapi/examples/claims/CreateClaimResponse.xml
+++ b/openapi/examples/claims/CreateClaimResponse.xml
@@ -7,7 +7,7 @@
PHONE
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/claims/GetClaimResponse.xml b/openapi/examples/claims/GetClaimResponse.xml
index 5105264..b0e2a53 100644
--- a/openapi/examples/claims/GetClaimResponse.xml
+++ b/openapi/examples/claims/GetClaimResponse.xml
@@ -7,7 +7,7 @@
PHONE
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/claims/ListClaimsResponse.xml b/openapi/examples/claims/ListClaimsResponse.xml
index 58247ff..5d3714b 100644
--- a/openapi/examples/claims/ListClaimsResponse.xml
+++ b/openapi/examples/claims/ListClaimsResponse.xml
@@ -8,7 +8,7 @@
PHONE
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/entries/CreateEntryRequest.xml b/openapi/examples/entries/CreateEntryRequest.xml
index 773823e..46287d9 100644
--- a/openapi/examples/entries/CreateEntryRequest.xml
+++ b/openapi/examples/entries/CreateEntryRequest.xml
@@ -6,7 +6,7 @@
PHONE
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/entries/CreateEntryResponse.xml b/openapi/examples/entries/CreateEntryResponse.xml
index 22961d3..9bdcde8 100644
--- a/openapi/examples/entries/CreateEntryResponse.xml
+++ b/openapi/examples/entries/CreateEntryResponse.xml
@@ -6,7 +6,7 @@
CPF
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/entries/DeleteEntryRequest.xml b/openapi/examples/entries/DeleteEntryRequest.xml
index c43e706..da58014 100644
--- a/openapi/examples/entries/DeleteEntryRequest.xml
+++ b/openapi/examples/entries/DeleteEntryRequest.xml
@@ -2,5 +2,6 @@
+5561988887777
+ 12345678
ACCOUNT_CLOSURE
\ No newline at end of file
diff --git a/openapi/examples/entries/GetEntryResponse.xml b/openapi/examples/entries/GetEntryResponse.xml
index a389426..5dbad19 100644
--- a/openapi/examples/entries/GetEntryResponse.xml
+++ b/openapi/examples/entries/GetEntryResponse.xml
@@ -6,7 +6,7 @@
CPF
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/entries/UpdateEntryRequest.xml b/openapi/examples/entries/UpdateEntryRequest.xml
index e57eeaa..5886cbd 100644
--- a/openapi/examples/entries/UpdateEntryRequest.xml
+++ b/openapi/examples/entries/UpdateEntryRequest.xml
@@ -4,7 +4,7 @@
+5561988887777
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/entries/UpdateEntryResponse.xml b/openapi/examples/entries/UpdateEntryResponse.xml
index 6d7f73f..89bccae 100644
--- a/openapi/examples/entries/UpdateEntryResponse.xml
+++ b/openapi/examples/entries/UpdateEntryResponse.xml
@@ -6,7 +6,7 @@
CPF
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/examples/reconciliation/CreateSyncVerificationResponse.xml b/openapi/examples/reconciliation/CreateSyncVerificationResponse.xml
index af6685d..46fd74d 100644
--- a/openapi/examples/reconciliation/CreateSyncVerificationResponse.xml
+++ b/openapi/examples/reconciliation/CreateSyncVerificationResponse.xml
@@ -4,9 +4,8 @@
12345678
CPF
- e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
+ e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
1234
- 2020-01-10T10:00:00Z
OK
\ No newline at end of file
diff --git a/openapi/examples/reconciliation/GetEntryByCidResponse.xml b/openapi/examples/reconciliation/GetEntryByCidResponse.xml
index 711000b..168ce2f 100644
--- a/openapi/examples/reconciliation/GetEntryByCidResponse.xml
+++ b/openapi/examples/reconciliation/GetEntryByCidResponse.xml
@@ -7,7 +7,7 @@
CPF
12345678
- 00001
+ 0001
0007654321
CACC
diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml
index fadf57c..7f48085 100644
--- a/openapi/openapi.yaml
+++ b/openapi/openapi.yaml
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: DICT API
- version: '1.0.0-RC3'
+ version: '1.0.0-RC4'
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0
@@ -97,6 +97,10 @@ info:
- Limite de requisições foi atingido.
Ver seção sobre [limitação de requisições](#section/Seguranca/Limitacao-de-requisicoes)
+ - `InternalServerError`
+ - Condição inesperada ao processar requisição.
+ Ver [rfc7231](https://tools.ietf.org/html/rfc7231#section-6.6.1)
+
- `ServiceUnavailable`
- Serviço não está disponível no momento. Serviço solicitado pode estar em manutenção ou fora
da janela de funcionamento.
@@ -313,11 +317,11 @@ tags:
'4d4abb9168114e349672b934d16ed201a919cb49e28b7f66a240e62c92ee007f',
'fce514f84f37934bc8aa0f861e4f7392273d71b9d18e8209d21e4192a7842058']
- vsync = xor(xor(cids[0], cids[1]), cids[2]) = '996fc1dd3b6b14bcf0c9fe8320eb66d7e2a3fd874ccf767b2e939641b1ea8eaf'
+ vsync = xor(xor(cids[0], cids[1]), cids[2]) = '996fc1dd3b6b14bcf0c9fe8320eb66d7e2a3fd874ccf767b2e939641b1ea8eaf'
````
Observações:
- - VSync para um conjunto vazio de CIDs é definido como zero.
+ - VSync para um conjunto vazio de CIDs é definido como '0000000000000000000000000000000000000000000000000000000000000000'.
- Há três CIDs no exemplo acima, representados em hexadecimal. A operação bitwise-XOR é feita com os CIDs em formato binário.
- bitwise-XOR é comutativo, não importa a ordem da sua aplicação.
- Para calcular o novo VSync resultante da adição de um CID ao conjunto, basta calcular o XOR desse CID com o VSync atual.
@@ -716,6 +720,11 @@ paths:
operationId: acknowledgeClaim
description: |-
Notifica recebimento pelo participante doador de reivindicação com status `OPEN`.
+
+ ### Idempotência
+ A operação é idempotente. Caso reivindicação já tenha sido recebida e ela esteja ainda com
+ status `WAITING_RESOLUTION`, será retornada resposta equivalente à primeira requisição.
+
tags:
- Claim
requestBody:
@@ -807,6 +816,10 @@ paths:
+ ### Idempotência
+ A operação é idempotente. Caso reivindicação já tenha sido confirmada com os mesmos parâmetros
+ e esteja ainda com status `CONFIRMED`, será retornada resposta equivalente à primeira requisição.
+
tags:
- Claim
requestBody:
@@ -904,6 +917,10 @@ paths:
+ ### Idempotência
+ A operação é idempotente. Caso reivindicação já tenha sido cancelada com os mesmos parâmetros,
+ será retornada resposta equivalente à primeira requisição.
+
tags:
- Claim
requestBody:
diff --git a/openapi/schemas.yaml b/openapi/schemas.yaml
index 25e0841..bbdad74 100644
--- a/openapi/schemas.yaml
+++ b/openapi/schemas.yaml
@@ -273,10 +273,10 @@ SyncVerification:
- description: Identificador SPB do participante custodiante das chaves
KeyType:
$ref: '#/KeyType'
- SyncVerifier:
+ ParticipantSyncVerifier:
allOf:
- $ref: '#/SyncVerifier'
- - description: Verificador de sincronismo
+ - description: Verificador de sincronismo calculado pelo participante
required:
- Participant
- KeyType
@@ -290,15 +290,10 @@ ExtendedSyncVerification:
properties:
Id:
type: integer
- SyncVerifierLastModified:
- type: string
- format: date-time
- description: Data-hora do último evento que alterou SyncVerifier
Result:
$ref: '#/SyncVerificationResult'
required:
- Id
- - SyncVerifierLastModified
- Result
FileStatus:
type: string
@@ -507,8 +502,13 @@ AcknowledgeClaimRequest:
ClaimId:
type: string
format: uuid
+ Participant:
+ allOf:
+ - $ref: '#/ISPB'
+ - description: "Identificador SPB do doador"
required:
- ClaimId
+ - Participant
AcknowledgeClaimResponse:
type: object
properties:
@@ -532,8 +532,16 @@ ConfirmClaimRequest:
ClaimId:
type: string
format: uuid
+ Participant:
+ allOf:
+ - $ref: '#/ISPB'
+ - description: "Identificador SPB do doador"
+ Reason:
+ $ref: '#/ClaimOperationReason'
required:
- ClaimId
+ - Participant
+ - Reason
ConfirmClaimResponse:
type: object
properties:
@@ -557,10 +565,15 @@ CancelClaimRequest:
ClaimId:
type: string
format: uuid
+ Participant:
+ allOf:
+ - $ref: '#/ISPB'
+ - description: "Identificador SPB do doador ou reivindicador"
Reason:
$ref: '#/ClaimOperationReason'
required:
- ClaimId
+ - Participant
- Reason
CancelClaimResponse:
type: object
@@ -585,13 +598,15 @@ CompleteClaimRequest:
ClaimId:
type: string
format: uuid
- Reason:
- $ref: '#/ClaimOperationReason'
+ Participant:
+ allOf:
+ - $ref: '#/ISPB'
+ - description: "Identificador SPB do reivindicador"
RequestId:
$ref: '#/RequestId'
required:
- ClaimId
- - Reason
+ - Participant
- RequestId
CompleteClaimResponse:
type: object
@@ -705,12 +720,17 @@ DeleteEntryRequest:
namespace: 'http://www.w3.org/2000/09/xmldsig#'
Key:
$ref: "#/Key"
+ Participant:
+ allOf:
+ - $ref: '#/ISPB'
+ - description: "Identificador SPB do provedor da conta ao qual a chave está vinculada"
Reason:
allOf:
- $ref: '#/EntryOperationReason'
- description: "Valores válidos: `USER_REQUESTED`, `ACCOUNT_CLOSURE`, `ENTRY_INACTIVITY` e `RECONCILIATION`"
required:
- Key
+ - Participant
- Reason
DeleteEntryResponse:
type: object