Skip to content

Instantly share code, notes, and snippets.

@ramiresnas
Last active July 12, 2023 15:45
Show Gist options
  • Save ramiresnas/e8600f3da55de4b21b6fa1c1391f91a0 to your computer and use it in GitHub Desktop.
Save ramiresnas/e8600f3da55de4b21b6fa1c1391f91a0 to your computer and use it in GitHub Desktop.
Swagger example
openapi: 3.0.3
info:
title: Swagger Global Investment BFF - OpenAPI 3.0
description: |-
Descrição
version: 1.0.11
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
servers:
- url: https://mobile.hom.c6bank.app/app
tags:
- name: order
description: Tudo sobre a criação e acompanhamento de ordens para produtos de Renda Fixa e Fundos
paths:
/overseas/orders/tracking?accountId=\{accountId}&market={market}&sub_market={sub_market}:
get:
tags:
- order
summary: Lista as ordens de Renda Fixa e Funds de acordo com os filtros passados
description: O parâmetro `sub_market` deve ser enviado somente para ordens de Renda Fixa
operationId: listOrders
parameters:
- name: market
in: query
required: true
schema:
type: string
enum:
- MutualFund
- HedgeFund
- Equities
- fixed-income-gia
- tech-invest-gia
- name: sub_market
in: query
required: false
schema:
type: string
enum:
- CD
- BONDS
- TREASURY
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PendingOperation'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
'500':
description: Server Error
security:
- global_inveswtment_auth:
- write
- read
components:
schemas:
PendingOperation:
type: object
properties:
operationId:
type: string
operationName:
type: string
productName:
type: string
amount:
type: string
example: "500.35"
referenceDate:
type: string
format: date-time
operationType:
type: string
description: Tipo de ordem
example: REDEEM
enum:
- ENTRY
- REDEEM
productType:
type: string
description: Tipo do produto
example: MutualFund
enum:
- MutualFund
- HedgeFund
- Equities
- fixed-income-gia
- tech-invest-gia
scheduled:
type: boolean
detail:
type: object
$ref: '#/components/schemas/PendingOperationDetailResponse'
PendingOperationDetailResponse:
type: object
properties:
title:
type: string
description:
type: string
amount:
type: string
status:
type: string
enum:
- waiting
- success
- error
- alert
timeline:
type: array
items:
$ref: '#/components/schemas/PendingOperationDetailTimelineResponse'
PendingOperationDetailTimelineResponse:
type: object
properties:
name:
type: string
date:
type: string
format: date-time
additionalInfo:
type: string
nullable: true
processed:
type: boolean
status:
type: object
$ref: '#/components/schemas/PendingOperationLineStatusResponse'
PendingOperationLineStatusResponse:
enum:
- waiting
- processed
- none
- error
securitySchemes:
global_inveswtment_auth:
type: oauth2
flows:
implicit:
authorizationUrl: https://petstore3.swagger.io/oauth/authorize
scopes:
write: permissão de leitura
read: permissão de escrita
api_key:
type: apiKey
name: api_key
in: header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment