forked from barchart/aws-lambda-pdf-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yml
More file actions
100 lines (94 loc) · 2.8 KB
/
openapi.yml
File metadata and controls
100 lines (94 loc) · 2.8 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
openapi: 3.0.1
info:
title: PDF generator API
description: PDF generator API
version: 2.1.0
components:
responses:
Success:
description: Generated PDF file.
content:
application/pdf:
schema:
type: string
format: binary
BadRequest:
description: Bad request.
content:
application/json:
schema:
type: array
items:
type: object
properties:
value:
type: object
properties:
code:
type: string
example: PRINT_FAILED_NO_HTML_LAYOUT
message:
type: string
example: Failed to print PDF, missing html layout.
children:
type: array
example: []
items: {}
ServerError:
description: Server error.
content:
application/json:
schema:
type: array
items:
type: object
properties:
value:
type: object
properties:
code:
type: string
example: REQUEST_GENERAL_FAILURE
message:
type: string
example: An attempt to print html page failed for unspecified reason(s).
children:
type: array
example: []
items: {}
tags:
- name: Pdf
paths:
/print:
post:
summary: Prints PDF page from html layout (chrome v92 by default).
description: Prints PDF page from html layout (chrome v92 by default).
tags:
- Pdf
requestBody:
content:
application/json:
schema:
type: object
properties:
source:
type: string
description: Optional string to define the source of request
example: crude-oil-price-report
html:
type: string
description: HTML layout to print
example: '<html><head></head><body>test</body></html>'
settings:
type: object
description: 'Optional [settings](https://github.com/puppeteer/puppeteer/blob/v5.2.1/docs/api.md#pagepdfoptions) passed to page.pdf()'
example: { width: '100px' }
required:
- html
responses:
'200':
$ref: '#/components/responses/Success'
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/ServerError'