-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
73 lines (71 loc) · 1.6 KB
/
swagger.yaml
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
swagger: '2.0'
info:
version: 1.0.0
title: Ratings Aggregator API
description: An API for listing our user's aggregate ratings alongside IMDB, Rotten Tomatoes, etc.
basePath: /v1
consumes:
- application/json
produces:
- application/json
paths:
/movies:
get:
parameters:
- name: limit
in: query
description: number of movies to return
type: integer
default: 11
minimum: 11
maximum: 10000
responses:
200:
description: List all movies
schema:
title: Movies
type: array
items:
$ref: '#/definitions/Movie'
post:
parameters:
- name: movie
in: body
description: The movie JSON you want to post
schema:
$ref: '#/definitions/Movie'
required: true
responses:
200:
description: Make a new movie
put:
parameters:
- name: movie
in: body
description: The movie JSON you want to post
schema:
$ref: '#/definitions/Movie'
required: true
responses:
200:
description: Updates the movie
/movies/{movie_id}:
get:
parameters:
- name: movie_id
in: path
type: string
description: ID of the movie
required: true
responses:
200:
description: Sends the movie with movie ID
definitions:
Movie:
type: object
properties:
title:
type: string
rating:
type: number
format: float