Skip to content

Instantly share code, notes, and snippets.

@felzan
Last active June 7, 2018 19:12
Show Gist options
  • Save felzan/74f9b62a73a40c7a5adb01181e7cd67b to your computer and use it in GitHub Desktop.
Save felzan/74f9b62a73a40c7a5adb01181e7cd67b to your computer and use it in GitHub Desktop.
test-MKTPpostman_collection-converted
openapi: '3.0.0'
info:
title: Marketplace
description: <p>REST API para serviços do marketplace.</p>
version: 0.0.1
servers:
- url: https://marketplace.test.4all.com/{basePath}
description: Homologação
- url: https://marketplace.4all.com/{basePath}
description: Produção
variables:
basePath:
default: mktplace/v1/
consumes:
- application/json
produces:
- application/json
tags:
- name: WPS
description: Leitura e pagamento de tickets de estacionamento
paths:
/wps/ticket/{barcode}:
get:
tags:
- WPS
summary: Valor do ticket
description: Busca o valor do ticket
operationId: getWPSTicketInfo
parameters:
- name: Authorization
in: header
required: true
deprecated: false
description: 'Bearer'
schema:
type: string
- name: barcode
in: path
description: 'Ticket a ser buscado'
required: true
schema:
type: string
responses:
'200':
description: Ticket com valor a pagar de R$ 2,00
# content:
# application/json:
# schema:
# $ref: '#/components/responses/getWPSTicketInfoResponse'
'500':
description: Ticket não encontrado
# content:
# application/json:
# schema:
# $ref: '#/components/responses/getWPSTicketInfoResponseError'
/wps/ticket/payments:
post:
tags:
- WPS
summary: Paga o ticket
description: Paga o ticket
operationId: getWPSTicketPayment
parameters:
- name: Authorization
in: header
required: true
deprecated: false
description: 'Bearer'
schema:
type: string
- name: barcode
in: query
description: 'Ticket a ser pago'
required: true
schema:
type: string
responses:
'200':
description: Ticket pago
# content:
# pag:
# schema:
# $ref: '#/components/responses/getWPSTicketPaidResponse'
# pago:
# schema:
# $ref: '#/components/responses/getWPSTicketPaidResponses'
'500':
description: Ticket não encontrado
# content:
# application/json:
# schema:
# $ref: '#/components/responses/getWPSTicketInfoResponseError'
requestBody:
$ref: '#/components/requestBodies/postWPSTicket'
components:
schemas:
postWPSTicket:
type: object
required:
- type
- id
discriminator:
propertyName: idType
mapping:
takeaway: '#/components/schemas/OrderTakeaway'
delivery: '#/components/schemas/OrderDelivery'
properties:
id:
description: ID
type: integer
readOnly: true
idType:
description: Tipo
type: string
OrderTakeaway:
description: pedido tipo takeaway
allOf:
- $ref: '#/components/schemas/postWPSTicket'
- type: object
required:
- address
- outraInformacao
properties:
address:
description: Address
type: string
outraInformacao:
description: Outra
type: string
OrderDelivery:
type: object
properties:
id:
description: ID
type: integer
readOnly: true
apenasNoDelivery:
description: Delivery
type: string
outraInformacaoTambem:
description: Tambem
type: string
requestBodies:
postWPSTicket:
content:
application/json:
schema:
allOf:
- description: My Post
title: Pettie
- $ref: '#/components/schemas/postWPSTicket'
unico:
schema:
type: 'object'
properties:
name:
type: string
description: hooray
description: Pet object that needs to be added to the store
required: tru
securitySchemes:
bearer:
type: http
description: Autenticação Bearer do Marketplace
scheme: bearer
bearerFormat: Bearer ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment