This repository was archived by the owner on Mar 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger-spec.yaml
More file actions
127 lines (125 loc) · 2.65 KB
/
Copy pathswagger-spec.yaml
File metadata and controls
127 lines (125 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
swagger: '2.0'
info:
description: |
Este es un ejemplo complejo para Interoperabilidad
version: 0.0.1
title: Servicio Complejo de Referencia
contact:
email: contacto@interoperabilidad.digital.gob.cl
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
schemes:
- http
host: complex-service-interop.herokuapp.com
basePath: /complex_example
paths:
/personas:
get:
summary: Listado de personas
operationId: peopleIndex
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/people'
post:
summary: Crear persona
consumes:
- application/json
produces:
- application/json
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/newpeople'
responses:
"201":
description: created
schema:
$ref: '#/definitions/people'
"422":
description: unprocessable entity
/personas/{id}:
delete:
summary: Eliminando Personas
produces:
- application/json
parameters:
- in: path
name: id
type: integer
required: true
description: Id de la persona a ser eliminada
responses:
"200":
description: successful operation with no return
definitions:
newpeople:
type: object
properties:
persona:
$ref: '#/definitions/formpeople'
formpeople:
type: object
required:
- nombres
- apellidos
properties:
nombres:
type: string
apellidos:
type: string
telefonos_attributes:
type: array
items:
$ref: '#/definitions/telefonoarray'
email:
type: string
format: email
telefonoarray:
type: object
properties:
numero:
type: string
nombreyapellido:
type: object
required:
- nombres
- apellidos
properties:
id:
type: integer
nombres:
type: string
apellidos:
type: string
telefono:
type: number
minimum: 111111
datos:
type: object
properties:
telefonos:
type: array
items:
$ref: '#/definitions/telefono'
email:
type: string
format: email
people:
type: object
required:
- persona
properties:
persona:
$ref: '#/definitions/nombreyapellido'
datos:
$ref: '#/definitions/datos'