Skip to content

Commit

Permalink
Merge pull request #1791 from Sensedia/ORB-2867
Browse files Browse the repository at this point in the history
feat(Common): ORB-2867 - PC118 - Status code
  • Loading branch information
FelipeBaumgartel authored Jul 13, 2023
2 parents c886985 + de52836 commit 3de998a
Showing 1 changed file with 179 additions and 0 deletions.
179 changes: 179 additions & 0 deletions swagger-apis/common/2.0.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ResponseDiscoveryStatusList'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'405':
$ref: '#/components/responses/MethodNotAllowed'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
'504':
$ref: '#/components/responses/GatewayTimeout'
'529':
$ref: '#/components/responses/SiteIsOverloaded'
default:
$ref: '#/components/responses/Default'
/outages:
get:
tags:
Expand All @@ -44,6 +60,22 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ResponseDiscoveryOutageList'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'405':
$ref: '#/components/responses/MethodNotAllowed'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
'504':
$ref: '#/components/responses/GatewayTimeout'
'529':
$ref: '#/components/responses/SiteIsOverloaded'
default:
$ref: '#/components/responses/Default'
components:
schemas:
ResponseDiscoveryStatusList:
Expand Down Expand Up @@ -192,6 +224,104 @@ components:
maxLength: 2000
example:
- 'https://api.banco.com.br/open-banking/channels/v1/electronic-channels'
ResponseErrorMetaSingle:
type: object
required:
- errors
properties:
errors:
type: array
minItems: 1
maxItems: 13
items:
type: object
required:
- code
- title
- detail
properties:
code:
description: Código de erro específico do endpoint
type: string
pattern: '[\w\W\s]*'
maxLength: 255
title:
description: Título legível por humanos deste erro específico
type: string
pattern: '[\w\W\s]*'
maxLength: 255
detail:
description: Descrição legível por humanos deste erro específico
type: string
pattern: '[\w\W\s]*'
maxLength: 2048
meta:
type: object
description: Meta informações referente à API requisitada.
required:
- requestDateTime
properties:
requestDateTime:
description: 'Data e hora da consulta, conforme especificação RFC-3339, formato UTC.'
type: string
maxLength: 20
format: date-time
example: '2021-05-21T08:30:00Z'
ResponseError:
type: object
required:
- errors
properties:
errors:
type: array
minItems: 1
maxItems: 13
items:
type: object
required:
- code
- title
- detail
properties:
code:
description: Código de erro específico do endpoint
type: string
pattern: '[\w\W\s]*'
maxLength: 255
title:
description: Título legível por humanos deste erro específico
type: string
pattern: '[\w\W\s]*'
maxLength: 255
detail:
description: Descrição legível por humanos deste erro específico
type: string
pattern: '[\w\W\s]*'
maxLength: 2048
meta:
type: object
description: Meta informações referente à API requisitada.
required:
- totalRecords
- totalPages
- requestDateTime
properties:
totalRecords:
type: integer
format: int32
description: Número total de registros no resultado
example: 1
totalPages:
type: integer
format: int32
description: Número total de páginas no resultado
example: 1
requestDateTime:
description: 'Data e hora da consulta, conforme especificação RFC-3339, formato UTC.'
type: string
maxLength: 20
format: date-time
example: '2021-05-21T08:30:00Z'
parameters:
page:
name: page
Expand All @@ -213,3 +343,52 @@ components:
minimum: 1
maximum: 1000
format: int32
responses:
BadRequest:
description: A requisição foi malformada, omitindo atributos obrigatórios, seja no payload ou através de atributos na URL.​
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/ResponseError'
NotFound:
description: O recurso solicitado não existe ou não foi implementado.
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/ResponseError'
MethodNotAllowed:
description: O consumidor tentou acessar o recurso com um método não suportado.
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/ResponseError'
TooManyRequests:
description: A operação foi recusada, pois muitas solicitações foram feitas dentro de um determinado período ou o limite global de requisições concorrentes foi atingido.
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/ResponseError'
InternalServerError:
description: Ocorreu um erro no gateway da API ou no microsserviço.
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/ResponseError'
GatewayTimeout:
description: GATEWAY TIMEOUT - A requisição não foi atendida dentro do tempo limite estabelecido.
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/ResponseError'
SiteIsOverloaded:
description: O site está sobrecarregado e a operação foi recusada, pois foi atingido o limite máximo de TPS global, neste momento.
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/ResponseErrorMetaSingle'
Default:
description: '\-'
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/ResponseError'

0 comments on commit 3de998a

Please sign in to comment.