docraptor 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.docker_env.list +2 -0
- data/.docker_mounts.list +4 -0
- data/.generator-revision +1 -1
- data/.gitlab-ci.yml +1 -1
- data/.openapi-generator/FILES +5 -0
- data/.openapi-generator/VERSION +1 -1
- data/.openapi-generator-ignore +0 -10
- data/.review/generated_files/README.md +6 -5
- data/.review/generated_files/docs/AsyncDoc.md +18 -0
- data/.review/generated_files/docs/Doc.md +50 -0
- data/.review/generated_files/docs/DocApi.md +503 -0
- data/.review/generated_files/docs/DocStatus.md +28 -0
- data/.review/generated_files/docs/PrinceOptions.md +82 -0
- data/.review/generated_files/spec/api/doc_api_spec.rb +112 -0
- data/.review/generated_files/spec/api_client_spec.rb +228 -0
- data/.review/generated_files/spec/configuration_spec.rb +42 -0
- data/.review/generated_files/spec/models/async_doc_spec.rb +34 -0
- data/.review/generated_files/spec/models/doc_spec.rb +138 -0
- data/.review/generated_files/spec/models/doc_status_spec.rb +64 -0
- data/.review/generated_files/spec/models/prince_options_spec.rb +234 -0
- data/.review/generated_files/spec/spec_helper.rb +111 -0
- data/.runtime-environments +3 -0
- data/.travis.yml +2 -5
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/docraptor.gemspec +1 -1
- data/docraptor.yaml +281 -283
- data/gemfiles/Gemfile.3.1.lock +72 -0
- data/gemfiles/Gemfile.3.2.lock +72 -0
- data/gemfiles/Gemfile.3.3.lock +72 -0
- data/generator-config.json +1 -1
- data/lib/docraptor/api/doc_api.rb +33 -13
- data/lib/docraptor/api_client.rb +1 -1
- data/lib/docraptor/api_error.rb +2 -1
- data/lib/docraptor/configuration.rb +19 -3
- data/lib/docraptor/models/async_doc.rb +1 -1
- data/lib/docraptor/models/doc.rb +1 -6
- data/lib/docraptor/models/doc_status.rb +1 -1
- data/lib/docraptor/models/prince_options.rb +49 -10
- data/lib/docraptor/version.rb +2 -2
- data/lib/docraptor.rb +1 -1
- data/script/docker +21 -4
- data/script/generate_language +26 -4
- data/script/inside_container/test +52 -3
- data/script/post_generate_language +1 -3
- data/script/release +13 -0
- data/test/iframes_default.rb +40 -0
- data/test/iframes_false.rb +40 -0
- data/test/iframes_true.rb +40 -0
- data/test/prince_options.rb +45 -0
- data/test/xlsx.rb +6 -2
- metadata +32 -6
@@ -0,0 +1,72 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
docraptor (3.0.0)
|
5
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
byebug (11.1.3)
|
12
|
+
coderay (1.1.3)
|
13
|
+
diff-lcs (1.5.0)
|
14
|
+
ethon (0.16.0)
|
15
|
+
ffi (>= 1.15.0)
|
16
|
+
ffi (1.15.5)
|
17
|
+
jaro_winkler (1.5.6)
|
18
|
+
method_source (1.0.0)
|
19
|
+
parallel (1.23.0)
|
20
|
+
parser (3.2.2.3)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
racc
|
23
|
+
pry (0.14.2)
|
24
|
+
coderay (~> 1.1)
|
25
|
+
method_source (~> 1.0)
|
26
|
+
pry-byebug (3.10.1)
|
27
|
+
byebug (~> 11.0)
|
28
|
+
pry (>= 0.13, < 0.15)
|
29
|
+
psych (5.1.0)
|
30
|
+
stringio
|
31
|
+
racc (1.7.1)
|
32
|
+
rainbow (3.1.1)
|
33
|
+
rake (13.0.6)
|
34
|
+
rspec (3.12.0)
|
35
|
+
rspec-core (~> 3.12.0)
|
36
|
+
rspec-expectations (~> 3.12.0)
|
37
|
+
rspec-mocks (~> 3.12.0)
|
38
|
+
rspec-core (3.12.2)
|
39
|
+
rspec-support (~> 3.12.0)
|
40
|
+
rspec-expectations (3.12.3)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.12.0)
|
43
|
+
rspec-mocks (3.12.6)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.12.0)
|
46
|
+
rspec-support (3.12.1)
|
47
|
+
rubocop (0.66.0)
|
48
|
+
jaro_winkler (~> 1.5.1)
|
49
|
+
parallel (~> 1.10)
|
50
|
+
parser (>= 2.5, != 2.5.1.1)
|
51
|
+
psych (>= 3.1.0)
|
52
|
+
rainbow (>= 2.2.2, < 4.0)
|
53
|
+
ruby-progressbar (~> 1.7)
|
54
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
55
|
+
ruby-progressbar (1.13.0)
|
56
|
+
stringio (3.0.7)
|
57
|
+
typhoeus (1.4.0)
|
58
|
+
ethon (>= 0.9.0)
|
59
|
+
unicode-display_width (1.5.0)
|
60
|
+
|
61
|
+
PLATFORMS
|
62
|
+
aarch64-linux
|
63
|
+
|
64
|
+
DEPENDENCIES
|
65
|
+
docraptor!
|
66
|
+
pry-byebug
|
67
|
+
rake (~> 13.0.1)
|
68
|
+
rspec (~> 3.6, >= 3.6.0)
|
69
|
+
rubocop (~> 0.66.0)
|
70
|
+
|
71
|
+
BUNDLED WITH
|
72
|
+
2.3.26
|
@@ -0,0 +1,72 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
docraptor (3.0.0)
|
5
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
byebug (11.1.3)
|
12
|
+
coderay (1.1.3)
|
13
|
+
diff-lcs (1.5.0)
|
14
|
+
ethon (0.16.0)
|
15
|
+
ffi (>= 1.15.0)
|
16
|
+
ffi (1.15.5)
|
17
|
+
jaro_winkler (1.5.6)
|
18
|
+
method_source (1.0.0)
|
19
|
+
parallel (1.23.0)
|
20
|
+
parser (3.2.2.3)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
racc
|
23
|
+
pry (0.14.2)
|
24
|
+
coderay (~> 1.1)
|
25
|
+
method_source (~> 1.0)
|
26
|
+
pry-byebug (3.10.1)
|
27
|
+
byebug (~> 11.0)
|
28
|
+
pry (>= 0.13, < 0.15)
|
29
|
+
psych (5.1.0)
|
30
|
+
stringio
|
31
|
+
racc (1.7.1)
|
32
|
+
rainbow (3.1.1)
|
33
|
+
rake (13.0.6)
|
34
|
+
rspec (3.12.0)
|
35
|
+
rspec-core (~> 3.12.0)
|
36
|
+
rspec-expectations (~> 3.12.0)
|
37
|
+
rspec-mocks (~> 3.12.0)
|
38
|
+
rspec-core (3.12.2)
|
39
|
+
rspec-support (~> 3.12.0)
|
40
|
+
rspec-expectations (3.12.3)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.12.0)
|
43
|
+
rspec-mocks (3.12.6)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.12.0)
|
46
|
+
rspec-support (3.12.1)
|
47
|
+
rubocop (0.66.0)
|
48
|
+
jaro_winkler (~> 1.5.1)
|
49
|
+
parallel (~> 1.10)
|
50
|
+
parser (>= 2.5, != 2.5.1.1)
|
51
|
+
psych (>= 3.1.0)
|
52
|
+
rainbow (>= 2.2.2, < 4.0)
|
53
|
+
ruby-progressbar (~> 1.7)
|
54
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
55
|
+
ruby-progressbar (1.13.0)
|
56
|
+
stringio (3.0.7)
|
57
|
+
typhoeus (1.4.0)
|
58
|
+
ethon (>= 0.9.0)
|
59
|
+
unicode-display_width (1.5.0)
|
60
|
+
|
61
|
+
PLATFORMS
|
62
|
+
aarch64-linux
|
63
|
+
|
64
|
+
DEPENDENCIES
|
65
|
+
docraptor!
|
66
|
+
pry-byebug
|
67
|
+
rake (~> 13.0.1)
|
68
|
+
rspec (~> 3.6, >= 3.6.0)
|
69
|
+
rubocop (~> 0.66.0)
|
70
|
+
|
71
|
+
BUNDLED WITH
|
72
|
+
2.4.10
|
@@ -0,0 +1,72 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
docraptor (3.0.0)
|
5
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
byebug (11.1.3)
|
12
|
+
coderay (1.1.3)
|
13
|
+
diff-lcs (1.5.0)
|
14
|
+
ethon (0.16.0)
|
15
|
+
ffi (>= 1.15.0)
|
16
|
+
ffi (1.15.5)
|
17
|
+
jaro_winkler (1.5.6)
|
18
|
+
method_source (1.0.0)
|
19
|
+
parallel (1.23.0)
|
20
|
+
parser (3.2.2.3)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
racc
|
23
|
+
pry (0.14.2)
|
24
|
+
coderay (~> 1.1)
|
25
|
+
method_source (~> 1.0)
|
26
|
+
pry-byebug (3.10.1)
|
27
|
+
byebug (~> 11.0)
|
28
|
+
pry (>= 0.13, < 0.15)
|
29
|
+
psych (5.1.0)
|
30
|
+
stringio
|
31
|
+
racc (1.7.1)
|
32
|
+
rainbow (3.1.1)
|
33
|
+
rake (13.0.6)
|
34
|
+
rspec (3.12.0)
|
35
|
+
rspec-core (~> 3.12.0)
|
36
|
+
rspec-expectations (~> 3.12.0)
|
37
|
+
rspec-mocks (~> 3.12.0)
|
38
|
+
rspec-core (3.12.2)
|
39
|
+
rspec-support (~> 3.12.0)
|
40
|
+
rspec-expectations (3.12.3)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.12.0)
|
43
|
+
rspec-mocks (3.12.6)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.12.0)
|
46
|
+
rspec-support (3.12.1)
|
47
|
+
rubocop (0.66.0)
|
48
|
+
jaro_winkler (~> 1.5.1)
|
49
|
+
parallel (~> 1.10)
|
50
|
+
parser (>= 2.5, != 2.5.1.1)
|
51
|
+
psych (>= 3.1.0)
|
52
|
+
rainbow (>= 2.2.2, < 4.0)
|
53
|
+
ruby-progressbar (~> 1.7)
|
54
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
55
|
+
ruby-progressbar (1.13.0)
|
56
|
+
stringio (3.0.7)
|
57
|
+
typhoeus (1.4.0)
|
58
|
+
ethon (>= 0.9.0)
|
59
|
+
unicode-display_width (1.5.0)
|
60
|
+
|
61
|
+
PLATFORMS
|
62
|
+
aarch64-linux
|
63
|
+
|
64
|
+
DEPENDENCIES
|
65
|
+
docraptor!
|
66
|
+
pry-byebug
|
67
|
+
rake (~> 13.0.1)
|
68
|
+
rspec (~> 3.6, >= 3.6.0)
|
69
|
+
rubocop (~> 0.66.0)
|
70
|
+
|
71
|
+
BUNDLED WITH
|
72
|
+
2.5.0.dev
|
data/generator-config.json
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -20,7 +20,7 @@ module DocRaptor
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Creates a document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document.
|
23
|
-
# @param doc [Doc]
|
23
|
+
# @param doc [Doc]
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @return [AsyncDoc]
|
26
26
|
def create_async_doc(doc, opts = {})
|
@@ -29,7 +29,7 @@ module DocRaptor
|
|
29
29
|
end
|
30
30
|
|
31
31
|
# Creates a document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document.
|
32
|
-
# @param doc [Doc]
|
32
|
+
# @param doc [Doc]
|
33
33
|
# @param [Hash] opts the optional parameters
|
34
34
|
# @return [Array<(AsyncDoc, Integer, Hash)>] AsyncDoc data, response status code and response headers
|
35
35
|
def create_async_doc_with_http_info(doc, opts = {})
|
@@ -49,7 +49,12 @@ module DocRaptor
|
|
49
49
|
# header parameters
|
50
50
|
header_params = opts[:header_params] || {}
|
51
51
|
# HTTP header 'Accept' (if needed)
|
52
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
55
|
+
if !content_type.nil?
|
56
|
+
header_params['Content-Type'] = content_type
|
57
|
+
end
|
53
58
|
|
54
59
|
# form parameters
|
55
60
|
form_params = opts[:form_params] || {}
|
@@ -81,7 +86,7 @@ module DocRaptor
|
|
81
86
|
end
|
82
87
|
|
83
88
|
# Creates a document synchronously.
|
84
|
-
# @param doc [Doc]
|
89
|
+
# @param doc [Doc]
|
85
90
|
# @param [Hash] opts the optional parameters
|
86
91
|
# @return [String]
|
87
92
|
def create_doc(doc, opts = {})
|
@@ -90,7 +95,7 @@ module DocRaptor
|
|
90
95
|
end
|
91
96
|
|
92
97
|
# Creates a document synchronously.
|
93
|
-
# @param doc [Doc]
|
98
|
+
# @param doc [Doc]
|
94
99
|
# @param [Hash] opts the optional parameters
|
95
100
|
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
96
101
|
def create_doc_with_http_info(doc, opts = {})
|
@@ -110,7 +115,12 @@ module DocRaptor
|
|
110
115
|
# header parameters
|
111
116
|
header_params = opts[:header_params] || {}
|
112
117
|
# HTTP header 'Accept' (if needed)
|
113
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
119
|
+
# HTTP header 'Content-Type'
|
120
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
121
|
+
if !content_type.nil?
|
122
|
+
header_params['Content-Type'] = content_type
|
123
|
+
end
|
114
124
|
|
115
125
|
# form parameters
|
116
126
|
form_params = opts[:form_params] || {}
|
@@ -142,7 +152,7 @@ module DocRaptor
|
|
142
152
|
end
|
143
153
|
|
144
154
|
# Creates a hosted document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document.
|
145
|
-
# @param doc [Doc]
|
155
|
+
# @param doc [Doc]
|
146
156
|
# @param [Hash] opts the optional parameters
|
147
157
|
# @return [AsyncDoc]
|
148
158
|
def create_hosted_async_doc(doc, opts = {})
|
@@ -151,7 +161,7 @@ module DocRaptor
|
|
151
161
|
end
|
152
162
|
|
153
163
|
# Creates a hosted document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document.
|
154
|
-
# @param doc [Doc]
|
164
|
+
# @param doc [Doc]
|
155
165
|
# @param [Hash] opts the optional parameters
|
156
166
|
# @return [Array<(AsyncDoc, Integer, Hash)>] AsyncDoc data, response status code and response headers
|
157
167
|
def create_hosted_async_doc_with_http_info(doc, opts = {})
|
@@ -171,7 +181,12 @@ module DocRaptor
|
|
171
181
|
# header parameters
|
172
182
|
header_params = opts[:header_params] || {}
|
173
183
|
# HTTP header 'Accept' (if needed)
|
174
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
185
|
+
# HTTP header 'Content-Type'
|
186
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
187
|
+
if !content_type.nil?
|
188
|
+
header_params['Content-Type'] = content_type
|
189
|
+
end
|
175
190
|
|
176
191
|
# form parameters
|
177
192
|
form_params = opts[:form_params] || {}
|
@@ -232,7 +247,12 @@ module DocRaptor
|
|
232
247
|
# header parameters
|
233
248
|
header_params = opts[:header_params] || {}
|
234
249
|
# HTTP header 'Accept' (if needed)
|
235
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
251
|
+
# HTTP header 'Content-Type'
|
252
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
253
|
+
if !content_type.nil?
|
254
|
+
header_params['Content-Type'] = content_type
|
255
|
+
end
|
236
256
|
|
237
257
|
# form parameters
|
238
258
|
form_params = opts[:form_params] || {}
|
@@ -352,7 +372,7 @@ module DocRaptor
|
|
352
372
|
# header parameters
|
353
373
|
header_params = opts[:header_params] || {}
|
354
374
|
# HTTP header 'Accept' (if needed)
|
355
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
375
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
356
376
|
|
357
377
|
# form parameters
|
358
378
|
form_params = opts[:form_params] || {}
|
@@ -413,7 +433,7 @@ module DocRaptor
|
|
413
433
|
# header parameters
|
414
434
|
header_params = opts[:header_params] || {}
|
415
435
|
# HTTP header 'Accept' (if needed)
|
416
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
436
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
417
437
|
|
418
438
|
# form parameters
|
419
439
|
form_params = opts[:form_params] || {}
|
data/lib/docraptor/api_client.rb
CHANGED
data/lib/docraptor/api_error.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -32,6 +32,7 @@ module DocRaptor
|
|
32
32
|
end
|
33
33
|
else
|
34
34
|
super arg
|
35
|
+
@message = arg
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -62,6 +62,16 @@ module DocRaptor
|
|
62
62
|
# Defines the access token (Bearer) used with OAuth2.
|
63
63
|
attr_accessor :access_token
|
64
64
|
|
65
|
+
# Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
|
66
|
+
# Overrides the access_token if set
|
67
|
+
# @return [Proc]
|
68
|
+
attr_accessor :access_token_getter
|
69
|
+
|
70
|
+
# Set this to return data as binary instead of downloading a temp file. When enabled (set to true)
|
71
|
+
# HTTP responses with return type `File` will be returned as a stream of binary data.
|
72
|
+
# Default to false.
|
73
|
+
attr_accessor :return_binary_data
|
74
|
+
|
65
75
|
# Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
|
66
76
|
# details will be logged with `logger.debug` (see the `logger` attribute).
|
67
77
|
# Default to false.
|
@@ -190,7 +200,7 @@ module DocRaptor
|
|
190
200
|
|
191
201
|
# Returns base URL for specified operation based on server settings
|
192
202
|
def base_url(operation = nil)
|
193
|
-
index = server_operation_index
|
203
|
+
index = server_operation_index[operation]
|
194
204
|
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
|
195
205
|
|
196
206
|
server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
@@ -208,6 +218,12 @@ module DocRaptor
|
|
208
218
|
end
|
209
219
|
end
|
210
220
|
|
221
|
+
# Gets access_token using access_token_getter or uses the static access_token
|
222
|
+
def access_token_with_refresh
|
223
|
+
return access_token if access_token_getter.nil?
|
224
|
+
access_token_getter.call
|
225
|
+
end
|
226
|
+
|
211
227
|
# Gets Basic Auth token string
|
212
228
|
def basic_auth_token
|
213
229
|
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
@@ -231,7 +247,7 @@ module DocRaptor
|
|
231
247
|
[
|
232
248
|
{
|
233
249
|
url: "https://api.docraptor.com",
|
234
|
-
description: "
|
250
|
+
description: "DocRaptor API endpoint",
|
235
251
|
}
|
236
252
|
]
|
237
253
|
end
|
data/lib/docraptor/models/doc.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -250,10 +250,6 @@ module DocRaptor
|
|
250
250
|
invalid_properties.push('invalid value for "document_type", document_type cannot be nil.')
|
251
251
|
end
|
252
252
|
|
253
|
-
if @document_content.nil?
|
254
|
-
invalid_properties.push('invalid value for "document_content", document_content cannot be nil.')
|
255
|
-
end
|
256
|
-
|
257
253
|
invalid_properties
|
258
254
|
end
|
259
255
|
|
@@ -264,7 +260,6 @@ module DocRaptor
|
|
264
260
|
return false if @document_type.nil?
|
265
261
|
document_type_validator = EnumAttributeValidator.new('String', ["pdf", "xls", "xlsx"])
|
266
262
|
return false unless document_type_validator.valid?(@document_type)
|
267
|
-
return false if @document_content.nil?
|
268
263
|
strict_validator = EnumAttributeValidator.new('String', ["none", "html"])
|
269
264
|
return false unless strict_validator.valid?(@strict)
|
270
265
|
true
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -87,7 +87,7 @@ module DocRaptor
|
|
87
87
|
# Enable Prince debug mode.
|
88
88
|
attr_accessor :debug
|
89
89
|
|
90
|
-
# Specify the input format.
|
90
|
+
# Specify the input format, defaults to html.
|
91
91
|
attr_accessor :input
|
92
92
|
|
93
93
|
# Deprecated, use the appropriate `pipeline` version. Specify a specific verison of PrinceXML to use.
|
@@ -105,6 +105,15 @@ module DocRaptor
|
|
105
105
|
# Specify the PDF title, part of the document's metadata.
|
106
106
|
attr_accessor :pdf_title
|
107
107
|
|
108
|
+
# Enable loading of iframes.
|
109
|
+
attr_accessor :iframes
|
110
|
+
|
111
|
+
# Specify the page margin distance.
|
112
|
+
attr_accessor :page_margin
|
113
|
+
|
114
|
+
# Make form fields editable by default.
|
115
|
+
attr_accessor :pdf_forms
|
116
|
+
|
108
117
|
class EnumAttributeValidator
|
109
118
|
attr_reader :datatype
|
110
119
|
attr_reader :allowable_values
|
@@ -159,7 +168,10 @@ module DocRaptor
|
|
159
168
|
:'javascript' => :'javascript',
|
160
169
|
:'css_dpi' => :'css_dpi',
|
161
170
|
:'profile' => :'profile',
|
162
|
-
:'pdf_title' => :'pdf_title'
|
171
|
+
:'pdf_title' => :'pdf_title',
|
172
|
+
:'iframes' => :'iframes',
|
173
|
+
:'page_margin' => :'page_margin',
|
174
|
+
:'pdf_forms' => :'pdf_forms'
|
163
175
|
}
|
164
176
|
end
|
165
177
|
|
@@ -200,13 +212,17 @@ module DocRaptor
|
|
200
212
|
:'javascript' => :'Boolean',
|
201
213
|
:'css_dpi' => :'Integer',
|
202
214
|
:'profile' => :'String',
|
203
|
-
:'pdf_title' => :'String'
|
215
|
+
:'pdf_title' => :'String',
|
216
|
+
:'iframes' => :'Boolean',
|
217
|
+
:'page_margin' => :'String',
|
218
|
+
:'pdf_forms' => :'Boolean'
|
204
219
|
}
|
205
220
|
end
|
206
221
|
|
207
222
|
# List of attributes with nullable: true
|
208
223
|
def self.openapi_nullable
|
209
224
|
Set.new([
|
225
|
+
:'iframes',
|
210
226
|
])
|
211
227
|
end
|
212
228
|
|
@@ -263,8 +279,6 @@ module DocRaptor
|
|
263
279
|
|
264
280
|
if attributes.key?(:'media')
|
265
281
|
self.media = attributes[:'media']
|
266
|
-
else
|
267
|
-
self.media = 'print'
|
268
282
|
end
|
269
283
|
|
270
284
|
if attributes.key?(:'no_author_style')
|
@@ -325,8 +339,6 @@ module DocRaptor
|
|
325
339
|
|
326
340
|
if attributes.key?(:'input')
|
327
341
|
self.input = attributes[:'input']
|
328
|
-
else
|
329
|
-
self.input = 'html'
|
330
342
|
end
|
331
343
|
|
332
344
|
if attributes.key?(:'version')
|
@@ -348,6 +360,18 @@ module DocRaptor
|
|
348
360
|
if attributes.key?(:'pdf_title')
|
349
361
|
self.pdf_title = attributes[:'pdf_title']
|
350
362
|
end
|
363
|
+
|
364
|
+
if attributes.key?(:'iframes')
|
365
|
+
self.iframes = attributes[:'iframes']
|
366
|
+
end
|
367
|
+
|
368
|
+
if attributes.key?(:'page_margin')
|
369
|
+
self.page_margin = attributes[:'page_margin']
|
370
|
+
end
|
371
|
+
|
372
|
+
if attributes.key?(:'pdf_forms')
|
373
|
+
self.pdf_forms = attributes[:'pdf_forms']
|
374
|
+
end
|
351
375
|
end
|
352
376
|
|
353
377
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -360,11 +384,23 @@ module DocRaptor
|
|
360
384
|
# Check to see if the all the properties in the model are valid
|
361
385
|
# @return true if the model is valid
|
362
386
|
def valid?
|
387
|
+
key_bits_validator = EnumAttributeValidator.new('Integer', [40, 128])
|
388
|
+
return false unless key_bits_validator.valid?(@key_bits)
|
363
389
|
input_validator = EnumAttributeValidator.new('String', ["html", "xml", "auto"])
|
364
390
|
return false unless input_validator.valid?(@input)
|
365
391
|
true
|
366
392
|
end
|
367
393
|
|
394
|
+
# Custom attribute writer method checking allowed values (enum).
|
395
|
+
# @param [Object] key_bits Object to be assigned
|
396
|
+
def key_bits=(key_bits)
|
397
|
+
validator = EnumAttributeValidator.new('Integer', [40, 128])
|
398
|
+
unless validator.valid?(key_bits)
|
399
|
+
fail ArgumentError, "invalid value for \"key_bits\", must be one of #{validator.allowable_values}."
|
400
|
+
end
|
401
|
+
@key_bits = key_bits
|
402
|
+
end
|
403
|
+
|
368
404
|
# Custom attribute writer method checking allowed values (enum).
|
369
405
|
# @param [Object] input Object to be assigned
|
370
406
|
def input=(input)
|
@@ -409,7 +445,10 @@ module DocRaptor
|
|
409
445
|
javascript == o.javascript &&
|
410
446
|
css_dpi == o.css_dpi &&
|
411
447
|
profile == o.profile &&
|
412
|
-
pdf_title == o.pdf_title
|
448
|
+
pdf_title == o.pdf_title &&
|
449
|
+
iframes == o.iframes &&
|
450
|
+
page_margin == o.page_margin &&
|
451
|
+
pdf_forms == o.pdf_forms
|
413
452
|
end
|
414
453
|
|
415
454
|
# @see the `==` method
|
@@ -421,7 +460,7 @@ module DocRaptor
|
|
421
460
|
# Calculates hash code according to all attributes.
|
422
461
|
# @return [Integer] Hash code
|
423
462
|
def hash
|
424
|
-
[baseurl, no_xinclude, no_network, no_parallel_downloads, http_user, http_password, http_proxy, http_timeout, insecure, media, no_author_style, no_default_style, no_embed_fonts, no_subset_fonts, no_compress, encrypt, key_bits, user_password, owner_password, disallow_print, disallow_copy, disallow_annotate, disallow_modify, debug, input, version, javascript, css_dpi, profile, pdf_title].hash
|
463
|
+
[baseurl, no_xinclude, no_network, no_parallel_downloads, http_user, http_password, http_proxy, http_timeout, insecure, media, no_author_style, no_default_style, no_embed_fonts, no_subset_fonts, no_compress, encrypt, key_bits, user_password, owner_password, disallow_print, disallow_copy, disallow_annotate, disallow_modify, debug, input, version, javascript, css_dpi, profile, pdf_title, iframes, page_margin, pdf_forms].hash
|
425
464
|
end
|
426
465
|
|
427
466
|
# Builds the object from hash
|
data/lib/docraptor/version.rb
CHANGED
@@ -6,10 +6,10 @@
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module DocRaptor
|
14
|
-
VERSION = '3.
|
14
|
+
VERSION = '3.1.0'
|
15
15
|
end
|