Created
February 20, 2017 13:38
-
-
Save kiquetal/9379a92684e43a178370529772f22fb6 to your computer and use it in GitHub Desktop.
swagger2 example definitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
paths: | |
/clientes: | |
get: | |
summary: Lista de clientes | |
responses: | |
'200': | |
description: Retorna todos los clientes. | |
schema: | |
type: array | |
items: | |
$ref: '#/definitions/Cliente' | |
x-auth-type: Application & Application User | |
x-throttling-tier: Unlimited | |
post: | |
summary: Creación de nuevo usuario | |
description: Creacion nuevo usuarios | |
parameters: | |
- name: cliente | |
in: body | |
required: true | |
schema: | |
$ref: '#/definitions/NewClient' | |
responses: | |
'200': | |
description: OK | |
schema: | |
$ref: '#/definitions/UserCreated' | |
x-auth-type: Application & Application User | |
x-throttling-tier: Unlimited | |
'/clientes/{clienteId}': | |
get: | |
summary: Obtener los detalle del cliente | |
description: Detalle Del cliente | |
parameters: | |
- name: clienteId | |
in: path | |
description: Id del cliente | |
required: true | |
type: string | |
responses: | |
'200': | |
description: OK | |
schema: | |
$ref: '#/definitions/Cliente' | |
default: | |
description: Error no manejado | |
schema: | |
$ref: '#/definitions/ErrorApi' | |
x-auth-type: Application & Application User | |
x-throttling-tier: Unlimited | |
info: | |
title: procard | |
version: v1.0 | |
description: Implementación sencilla de api. | |
definitions: | |
Cliente: | |
type: object | |
properties: | |
name: | |
type: string | |
ci: | |
type: string | |
id: | |
type: string | |
UserCreated: | |
type: object | |
properties: | |
response: | |
type: object | |
properties: | |
message: | |
type: string | |
NewClient: | |
type: object | |
properties: | |
name: | |
type: string | |
ci: | |
type: string | |
ErrorApi: | |
type: object | |
properties: | |
error: | |
type: object | |
properties: | |
message: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment