-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathswagger.yaml
More file actions
86 lines (81 loc) · 1.92 KB
/
Copy pathswagger.yaml
File metadata and controls
86 lines (81 loc) · 1.92 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
---
swagger: '2.0'
info:
version: 0.0.0
title: Time tracker API
paths:
/projects/:
get:
summary: View all projects
description: |
This endpoint returns all projects the user is authorized to view.
responses:
200:
description: OK
schema:
type: array
items:
$ref: "#/definitions/Project"
post:
summary: Create a project
description: |
This endpoint will create a new project.
parameters:
- in: body
name: name
required: true
type: string
description: The name of the project to add.
responses:
201:
description: Project successfully created.
/projects/{projectId}/:
get:
summary: Retrieve a single project.
parameters:
- name: projectId
in: path
required: true
type: number
description: ID of the project
responses:
200:
description: The retrieved project.
schema:
$ref: '#/definitions/Project'
put:
summary: Update the name of a single project.
parameters:
- name: projectId
in: path
type: number
required: true
description: ID of the project
- in: body
name: name
type: string
required: true
description: The fields to update.
responses:
200:
description: The modified project.
schema:
$ref: '#/definitions/Project'
delete:
summary: Deletes a project.
parameters:
- in: path
name: projectId
required: true
type: number
responses:
204:
description: Successfully deleted
definitions:
Project:
type: object
properties:
id:
type: number
name:
type: string