-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathapi.yml
61 lines (59 loc) · 1.73 KB
/
api.yml
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
openapi: 3.0.0
info:
version: 1.0.0
title: Bright Website API
servers:
- url: https://brightinventions.pl/api
description: Production API
- url: https://staging.brightinventions.pl/api
description: Staging API
paths:
/ebooks/{ebookName}/sign-up:
post:
operationId: ebookSignUp
summary: Sign up for an e-book
description: Signs user up for newsletter and returns an ebook
parameters:
- name: ebookName
required: true
in: path
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [ name, email, consent ]
properties:
name:
type: string
example: Jhon Doe
email:
type: string
example: [email protected]
consent:
type: boolean
example: false
responses:
'400': # status code
description: Bad requiest
'200': # status code
description: A link to the ebook, only valid in the user context
content:
application/json:
schema:
type: object
required: [ ebook ]
properties:
ebook:
type: object
required: [ name, url ]
properties:
name:
type: string
example: Risk management in software
url:
type: string
example: https://brightinventions.pl