Skip to content

Commit

Permalink
1.0.0-RC4
Browse files Browse the repository at this point in the history
  • Loading branch information
luizlaydner committed Jun 24, 2020
1 parent 7747e15 commit f85f14f
Show file tree
Hide file tree
Showing 23 changed files with 84 additions and 29 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions openapi/examples/claims/AcknowledgeClaimRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<AcknowledgeClaimRequest>
<Signature></Signature>
<ClaimId>123e4567-e89b-12d3-a456-426655440000</ClaimId>
<Participant>12345678</Participant>
</AcknowledgeClaimRequest>
2 changes: 1 addition & 1 deletion openapi/examples/claims/AcknowledgeClaimResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<KeyType>PHONE</KeyType>
<ClaimerAccount>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</ClaimerAccount>
Expand Down
1 change: 1 addition & 0 deletions openapi/examples/claims/CancelClaimRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<CancelClaimRequest>
<Signature></Signature>
<ClaimId>123e4567-e89b-12d3-a456-426655440000</ClaimId>
<Participant>12345678</Participant>
<Reason>USER_REQUESTED</Reason>
</CancelClaimRequest>
2 changes: 1 addition & 1 deletion openapi/examples/claims/CancelClaimResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<KeyType>PHONE</KeyType>
<ClaimerAccount>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</ClaimerAccount>
Expand Down
1 change: 1 addition & 0 deletions openapi/examples/claims/CompleteClaimRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<CompleteClaimRequest>
<Signature></Signature>
<ClaimId>123e4567-e89b-12d3-a456-426655440000</ClaimId>
<Participant>12345678</Participant>
<RequestId>a946d533-7f22-42a5-9a9b-e87cd55c0f4d</RequestId>
</CompleteClaimRequest>
2 changes: 1 addition & 1 deletion openapi/examples/claims/CompleteClaimResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<KeyType>PHONE</KeyType>
<ClaimerAccount>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</ClaimerAccount>
Expand Down
1 change: 1 addition & 0 deletions openapi/examples/claims/ConfirmClaimRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<ConfirmClaimRequest>
<Signature></Signature>
<ClaimId>123e4567-e89b-12d3-a456-426655440000</ClaimId>
<Participant>12345678</Participant>
<Reason>USER_REQUESTED</Reason>
</ConfirmClaimRequest>
2 changes: 1 addition & 1 deletion openapi/examples/claims/ConfirmClaimResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<KeyType>PHONE</KeyType>
<ClaimerAccount>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</ClaimerAccount>
Expand Down
2 changes: 1 addition & 1 deletion openapi/examples/claims/CreateClaimRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<KeyType>PHONE</KeyType>
<ClaimerAccount>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</ClaimerAccount>
Expand Down
2 changes: 1 addition & 1 deletion openapi/examples/claims/CreateClaimResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<KeyType>PHONE</KeyType>
<ClaimerAccount>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</ClaimerAccount>
Expand Down
2 changes: 1 addition & 1 deletion openapi/examples/claims/GetClaimResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<KeyType>PHONE</KeyType>
<ClaimerAccount>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</ClaimerAccount>
Expand Down
2 changes: 1 addition & 1 deletion openapi/examples/claims/ListClaimsResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<KeyType>PHONE</KeyType>
<ClaimerAccount>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</ClaimerAccount>
Expand Down
2 changes: 1 addition & 1 deletion openapi/examples/entries/CreateEntryRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<KeyType>PHONE</KeyType>
<Account>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</Account>
Expand Down
2 changes: 1 addition & 1 deletion openapi/examples/entries/CreateEntryResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<KeyType>CPF</KeyType>
<Account>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</Account>
Expand Down
1 change: 1 addition & 0 deletions openapi/examples/entries/DeleteEntryRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<DeleteEntryRequest>
<Signature></Signature>
<Key>+5561988887777</Key>
<Participant>12345678</Participant>
<Reason>ACCOUNT_CLOSURE</Reason>
</DeleteEntryRequest>
2 changes: 1 addition & 1 deletion openapi/examples/entries/GetEntryResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<KeyType>CPF</KeyType>
<Account>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</Account>
Expand Down
2 changes: 1 addition & 1 deletion openapi/examples/entries/UpdateEntryRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Key>+5561988887777</Key>
<Account>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</Account>
Expand Down
2 changes: 1 addition & 1 deletion openapi/examples/entries/UpdateEntryResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<KeyType>CPF</KeyType>
<Account>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</Account>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<SyncVerification>
<Participant>12345678</Participant>
<KeyType>CPF</KeyType>
<SyncVerifier>e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</SyncVerifier>
<ParticipantSyncVerifier>e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</ParticipantSyncVerifier>
<Id>1234</Id>
<SyncVerifierLastModified>2020-01-10T10:00:00Z</SyncVerifierLastModified>
<Result>OK</Result>
</SyncVerification>
</CreateSyncVerificationResponse>
2 changes: 1 addition & 1 deletion openapi/examples/reconciliation/GetEntryByCidResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<KeyType>CPF</KeyType>
<Account>
<Participant>12345678</Participant>
<Branch>00001</Branch>
<Branch>0001</Branch>
<AccountNumber>0007654321</AccountNumber>
<AccountType>CACC</AccountType>
</Account>
Expand Down
23 changes: 20 additions & 3 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -807,6 +816,10 @@ paths:
</tbody>
</table>
### 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:
Expand Down Expand Up @@ -904,6 +917,10 @@ paths:
</tbody>
</table>
### 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:
Expand Down
40 changes: 30 additions & 10 deletions openapi/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f85f14f

Please sign in to comment.