Skip to content

Instantly share code, notes, and snippets.

@edgars
Created August 11, 2020 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edgars/0bd8eb575f9f26dc9c3d2c57590b7d34 to your computer and use it in GitHub Desktop.
Save edgars/0bd8eb575f9f26dc9c3d2c57590b7d34 to your computer and use it in GitHub Desktop.
openapi: 3.0.2
info:
title: OperacoesBancarias
version: 1.0.0
description: API de Pagamento
paths:
/clientes:
summary: Path used to manage the list of clientes.
description: >-
The REST endpoint/path used to list and create zero or more `Clientes` entities. This path
contains a `GET` and `POST` operation to perform the list and create tasks, respectively.
get:
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Clientes'
description: Successful response - returns an array of `Clientes` entities.
operationId: getclientes
summary: List All clientes
description: Gets a list of all `Clientes` entities.
post:
requestBody:
description: A new `Clientes` to be created.
content:
application/json:
schema:
$ref: '#/components/schemas/Clientes'
required: true
responses:
'201':
description: Successful response.
operationId: createClientes
summary: Create a Clientes
description: Creates a new instance of a `Clientes`.
'/clientes/{clientesId}':
summary: Path used to manage a single Clientes.
description: >-
The REST endpoint/path used to get, update, and delete single instances of an `Clientes`. This
path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete
tasks, respectively.
get:
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Clientes'
description: Successful response - returns a single `Clientes`.
operationId: getClientes
summary: Get a Clientes
description: Gets the details of a single instance of a `Clientes`.
put:
requestBody:
description: Updated `Clientes` information.
content:
application/json:
schema:
$ref: '#/components/schemas/Clientes'
required: true
responses:
'202':
description: Successful response.
operationId: updateClientes
summary: Update a Clientes
description: Updates an existing `Clientes`.
delete:
responses:
'204':
description: Successful response.
operationId: deleteClientes
summary: Delete a Clientes
description: Deletes an existing `Clientes`.
parameters:
-
name: clientesId
description: A unique identifier for a `Clientes`.
schema:
type: string
in: path
required: true
components:
schemas:
Clientes:
title: Root Type for Clientes
description: Informacoes de Clientes
type: object
properties:
idCliente:
description: ID do Cliente
type: string
tipoConta:
type: string
nome:
type: string
UUID:
type: string
movimentos:
type: array
items:
type: object
properties:
id:
type: string
tipo:
type: string
valor:
format: double
type: number
documentos:
description: Lista de Documentos de Cliente
type: array
items:
type: object
properties:
id:
type: string
tipo:
type: string
example:
idCliente: '0001'
tipoConta: conta-corrente
nome: Hommer J Simpson
UUID: 98989843-343434-3434343-3343434343
movimentos:
-
id: '1001'
tipo: debito
valor: 44.9
-
id: '1002'
tipo: credito
valor: 19.2
-
id: '1003'
tipo: debito
valor: 5.04
-
id: '1004'
tipo: debito
valor: 1.22
documentos:
-
id: '5001'
tipo: RG
-
id: '5002'
tipo: CNH
-
id: '5005'
tipo: RESIDENCIA
responses:
Clientes:
description: Operacao Realizada com Sucesso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment