-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
66 lines (63 loc) · 1.51 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
swagger: "2.0"
info:
title: Marvel API
description: Marvel APIs to fetch list of character ids and specific character details
version: 0.0.1
contact:
email: "[email protected]"
host: "localhost:8080"
basePath: "/api"
schemes:
- "http"
tags:
- name: "characters"
description: "Everything about Marvel characters"
paths:
/characters:
get:
tags:
- "characters"
summary: "Fetch list of character ids"
description: "Retrieve the full list of character ids"
produces:
- "application/json"
responses:
"200":
description: "A JSON array of character"
schema:
type: "array"
items:
type: integer
"500":
description: "Interal server error"
/characters/{characterId}:
get:
tags:
- "characters"
summary: "Fetch a single character"
description: "Retrieve the details of a single character"
produces:
- "application/json"
parameters:
- name: "characterId"
in: "path"
description: "Id of a character"
required: true
type: "integer"
responses:
"200":
description: "A JSON object of character details"
schema:
$ref: "#/definitions/Character"
"500":
description: "Interal server error"
definitions:
Character:
type: "object"
properties:
id:
type: "integer"
name:
type: "string"
description:
type: "string"