autorender 0.2.0 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 426e4be998a9a2f5390f49a44722ffa905009c5c9109f8b2bb562453041c2ad8
4
- data.tar.gz: 4a4831689e92143065e9ff65c952a89dc42d4b781078f63b00f0c4f845a89f3c
3
+ metadata.gz: defd4e8363dacdf1f19948eee28cc1af98be7d4d582fbe164f80da2c0653f2fd
4
+ data.tar.gz: 9eb9eca1bb6c55520f0a9d9f0e53a41f10da68a6a2dc68fdffaf87dffa7f2014
5
5
  SHA512:
6
- metadata.gz: fc773a3ffa3c1acc1dd37b32b5ce76ff1777bf56323e9100e51db56f78d0ed99480eb55fea33ab3d7f00efa3b278f0612808b31050edb1be93f8f8c58c584c94
7
- data.tar.gz: c07bdacddf2a5212e06639ab93343d81a11105f9a540987db2c60988777af47fbbef058bbebfa5704bb2522534108d2c01ae1d8b5a8c40bce54fb225b8127649
6
+ metadata.gz: 570081ccc7ceaa84f94ed9b4f28b4ccf7c99558f88e712934ad29f0a480b5c9e9b8ad7cd43bef16afd390d9f6dcfc148ed3c74f05e45c06b86d5ee7a3334d96c
7
+ data.tar.gz: ab593adc2d49f15766a5a1f5503ca8d507fbfb9211c5403b3e8d99152695ed04db921b343aeeef7dc658a57f6c53f39944d548dd436e9e65dbf12150a617ffd0
data/CHANGELOG.md CHANGED
@@ -1,71 +1,86 @@
1
1
  # Changelog
2
2
 
3
- ## [0.2.0](https://github.com/autorenderhq/autorender-ruby/compare/v0.1.0...v0.2.0) (2026-06-12)
3
+ ## [0.2.2](https://github.com/autorender/autorender-ruby/compare/v0.2.1...v0.2.2) (2026-07-12)
4
+
5
+
6
+ ### Chores
7
+
8
+ * rename autorenderhq -> autorender references (GitHub org rename) ([#11](https://github.com/autorender/autorender-ruby/issues/11)) ([36a12a6](https://github.com/autorender/autorender-ruby/commit/36a12a61bf4824ce266a5294911f74cd3075da6a))
9
+
10
+ ## [0.2.1](https://github.com/autorender/autorender-ruby/compare/v0.2.0...v0.2.1) (2026-06-29)
11
+
12
+
13
+ ### Chores
14
+
15
+ * remove Stainless attribution from README and SECURITY ([32ce08b](https://github.com/autorender/autorender-ruby/commit/32ce08b5603dd5e667b5eccccddf94fae9851e84))
16
+ * strip internal workflows; preserve production-managed files ([0a1a663](https://github.com/autorender/autorender-ruby/commit/0a1a663a70d3ac323769ca574a3e86d1c3cbbed4))
17
+
18
+ ## [0.2.0](https://github.com/autorender/autorender-ruby/compare/v0.1.0...v0.2.0) (2026-06-12)
4
19
 
5
20
 
6
21
  ### Features
7
22
 
8
- * **java:** enable maven publishing with release-please ([1786303](https://github.com/autorenderhq/autorender-ruby/commit/1786303cbb54cff6672d54e610b9ade78c7c5854))
9
- * **ruby:** enable rubygems publishing with release-please ([bc8804f](https://github.com/autorenderhq/autorender-ruby/commit/bc8804f6dcb6942d92c55b45da53010aa0f7655a))
23
+ * **java:** enable maven publishing with release-please ([1786303](https://github.com/autorender/autorender-ruby/commit/1786303cbb54cff6672d54e610b9ade78c7c5854))
24
+ * **ruby:** enable rubygems publishing with release-please ([bc8804f](https://github.com/autorender/autorender-ruby/commit/bc8804f6dcb6942d92c55b45da53010aa0f7655a))
10
25
 
11
26
 
12
27
  ### Bug Fixes
13
28
 
14
- * preserve production-managed files in release branch ([37f9bd5](https://github.com/autorenderhq/autorender-ruby/commit/37f9bd51d07018eff16ef491dc3fc4f747fc07ec))
15
- * strip internal workflows from production release branch ([cd8fd3f](https://github.com/autorenderhq/autorender-ruby/commit/cd8fd3f3dce0f1e02440ae92d9f5f6f5bd9fa087))
16
- * update promote workflow and add back-sync from production ([8604ca6](https://github.com/autorenderhq/autorender-ruby/commit/8604ca61b2b63aa688a5387fc2dd0b741996249d))
17
- * use blob comparison in overlay; add language-specific version files ([383f0ae](https://github.com/autorenderhq/autorender-ruby/commit/383f0ae3e39903225c4f22aecffb72b1745dba23))
18
- * use persist-credentials: false in sync workflow ([22a5b7c](https://github.com/autorenderhq/autorender-ruby/commit/22a5b7cd5104fa7addc8d8da5408a8aa53b6d542))
29
+ * preserve production-managed files in release branch ([37f9bd5](https://github.com/autorender/autorender-ruby/commit/37f9bd51d07018eff16ef491dc3fc4f747fc07ec))
30
+ * strip internal workflows from production release branch ([cd8fd3f](https://github.com/autorender/autorender-ruby/commit/cd8fd3f3dce0f1e02440ae92d9f5f6f5bd9fa087))
31
+ * update promote workflow and add back-sync from production ([8604ca6](https://github.com/autorender/autorender-ruby/commit/8604ca61b2b63aa688a5387fc2dd0b741996249d))
32
+ * use blob comparison in overlay; add language-specific version files ([383f0ae](https://github.com/autorender/autorender-ruby/commit/383f0ae3e39903225c4f22aecffb72b1745dba23))
33
+ * use persist-credentials: false in sync workflow ([22a5b7c](https://github.com/autorender/autorender-ruby/commit/22a5b7cd5104fa7addc8d8da5408a8aa53b6d542))
19
34
 
20
35
 
21
36
  ### Chores
22
37
 
23
- * preserve production-managed files ([04101d4](https://github.com/autorenderhq/autorender-ruby/commit/04101d4aad8a09a5e00a383c35f9b7fb1bba3481))
24
- * remove staging-only workflows from production ([446e9ad](https://github.com/autorenderhq/autorender-ruby/commit/446e9ad2ca81b41c7d18f62bb341c2303c0906a5))
25
- * remove staging-only workflows from production ([79686f1](https://github.com/autorenderhq/autorender-ruby/commit/79686f15b7c6c5f130bc05e00e8fe595c4877236))
26
- * strip internal workflows; preserve production-managed files ([c2cb80d](https://github.com/autorenderhq/autorender-ruby/commit/c2cb80de0aab1a578c5798c3fd99efc8bf8f4b77))
38
+ * preserve production-managed files ([04101d4](https://github.com/autorender/autorender-ruby/commit/04101d4aad8a09a5e00a383c35f9b7fb1bba3481))
39
+ * remove staging-only workflows from production ([446e9ad](https://github.com/autorender/autorender-ruby/commit/446e9ad2ca81b41c7d18f62bb341c2303c0906a5))
40
+ * remove staging-only workflows from production ([79686f1](https://github.com/autorender/autorender-ruby/commit/79686f15b7c6c5f130bc05e00e8fe595c4877236))
41
+ * strip internal workflows; preserve production-managed files ([c2cb80d](https://github.com/autorender/autorender-ruby/commit/c2cb80de0aab1a578c5798c3fd99efc8bf8f4b77))
27
42
 
28
43
 
29
44
  ### Documentation
30
45
 
31
- * add auto-generated notice to CONTRIBUTING.md ([802ed52](https://github.com/autorenderhq/autorender-ruby/commit/802ed521f5609bfedbc004c755835a97b060eff0))
46
+ * add auto-generated notice to CONTRIBUTING.md ([802ed52](https://github.com/autorender/autorender-ruby/commit/802ed521f5609bfedbc004c755835a97b060eff0))
32
47
 
33
- ## [0.1.0](https://github.com/autorenderhq/autorender-ruby/compare/v0.0.1...v0.1.0) (2026-05-25)
48
+ ## [0.1.0](https://github.com/autorender/autorender-ruby/compare/v0.0.1...v0.1.0) (2026-05-25)
34
49
 
35
50
 
36
51
  ### Features
37
52
 
38
- * add stlc generate workflow and setup-stlc action ([33702ec](https://github.com/autorenderhq/autorender-ruby/commit/33702eca050ca28e7f94e57cfec04b73f23c9df5))
39
- * add test CI job ([a8fbe66](https://github.com/autorenderhq/autorender-ruby/commit/a8fbe662d965ca5f29d9e3c6c22d566f4c2a8fc1))
40
- * **api:** api update ([5e0fc16](https://github.com/autorenderhq/autorender-ruby/commit/5e0fc16a5851c3352fbde1e93e7dfe113c01174d))
41
- * **api:** api update ([6dc9820](https://github.com/autorenderhq/autorender-ruby/commit/6dc98208876904a00fe6060c77bf37444402772b))
42
- * **api:** api update ([dd609a7](https://github.com/autorenderhq/autorender-ruby/commit/dd609a73898016e39ade678854a3eeeaa2b48238))
43
- * **api:** api update ([4cc94ad](https://github.com/autorenderhq/autorender-ruby/commit/4cc94adc26ad538f01d79808130029bd744a2ee3))
44
- * **api:** api update ([c8a41c7](https://github.com/autorenderhq/autorender-ruby/commit/c8a41c7d7564bc736de43fa4c791608348bdb0f7))
45
- * **api:** api update ([0e228df](https://github.com/autorenderhq/autorender-ruby/commit/0e228df68c6f36ce4daa497df77bbb053c2244f7))
46
- * **api:** api update ([4367475](https://github.com/autorenderhq/autorender-ruby/commit/4367475283baab31f04e1617ea462ae8784758d1))
47
- * **api:** api update ([a9470bb](https://github.com/autorenderhq/autorender-ruby/commit/a9470bb8ea34fd597ba981dd1aedbceda9bd0210))
48
- * **api:** api update ([df3c1b1](https://github.com/autorenderhq/autorender-ruby/commit/df3c1b1561943ccc9de1b51abe60adabcd576aa8))
49
- * **api:** api update ([fb07d3e](https://github.com/autorenderhq/autorender-ruby/commit/fb07d3eff80815340117fca67aae513e3a91b987))
50
- * initial stlc build ([8972f10](https://github.com/autorenderhq/autorender-ruby/commit/8972f10cca09ae385f9757795c55e658923c949b))
51
- * support setting headers via env ([3707a7d](https://github.com/autorenderhq/autorender-ruby/commit/3707a7d00abf789957185ad54eeddca000b3e398))
53
+ * add stlc generate workflow and setup-stlc action ([33702ec](https://github.com/autorender/autorender-ruby/commit/33702eca050ca28e7f94e57cfec04b73f23c9df5))
54
+ * add test CI job ([a8fbe66](https://github.com/autorender/autorender-ruby/commit/a8fbe662d965ca5f29d9e3c6c22d566f4c2a8fc1))
55
+ * **api:** api update ([5e0fc16](https://github.com/autorender/autorender-ruby/commit/5e0fc16a5851c3352fbde1e93e7dfe113c01174d))
56
+ * **api:** api update ([6dc9820](https://github.com/autorender/autorender-ruby/commit/6dc98208876904a00fe6060c77bf37444402772b))
57
+ * **api:** api update ([dd609a7](https://github.com/autorender/autorender-ruby/commit/dd609a73898016e39ade678854a3eeeaa2b48238))
58
+ * **api:** api update ([4cc94ad](https://github.com/autorender/autorender-ruby/commit/4cc94adc26ad538f01d79808130029bd744a2ee3))
59
+ * **api:** api update ([c8a41c7](https://github.com/autorender/autorender-ruby/commit/c8a41c7d7564bc736de43fa4c791608348bdb0f7))
60
+ * **api:** api update ([0e228df](https://github.com/autorender/autorender-ruby/commit/0e228df68c6f36ce4daa497df77bbb053c2244f7))
61
+ * **api:** api update ([4367475](https://github.com/autorender/autorender-ruby/commit/4367475283baab31f04e1617ea462ae8784758d1))
62
+ * **api:** api update ([a9470bb](https://github.com/autorender/autorender-ruby/commit/a9470bb8ea34fd597ba981dd1aedbceda9bd0210))
63
+ * **api:** api update ([df3c1b1](https://github.com/autorender/autorender-ruby/commit/df3c1b1561943ccc9de1b51abe60adabcd576aa8))
64
+ * **api:** api update ([fb07d3e](https://github.com/autorender/autorender-ruby/commit/fb07d3eff80815340117fca67aae513e3a91b987))
65
+ * initial stlc build ([8972f10](https://github.com/autorender/autorender-ruby/commit/8972f10cca09ae385f9757795c55e658923c949b))
66
+ * support setting headers via env ([3707a7d](https://github.com/autorender/autorender-ruby/commit/3707a7d00abf789957185ad54eeddca000b3e398))
52
67
 
53
68
 
54
69
  ### Bug Fixes
55
70
 
56
- * **client:** elide content type header on requests without body ([553ad30](https://github.com/autorenderhq/autorender-ruby/commit/553ad304fe2053211d95d0cefce4ed9c922f1d92))
57
- * patch multipart buffer replay, bodyless DELETE content-type, and test adapter ([eb66723](https://github.com/autorenderhq/autorender-ruby/commit/eb667233b4b537e158d25f357bf91adee5304675))
58
- * **python:** rename pagination field has_next_page -> has_next to fix pyright lint ([d49e480](https://github.com/autorenderhq/autorender-ruby/commit/d49e480c617a82896affa131551605b80ab84004))
59
- * restore content-type stripping and eager multipart buffering ([a67c6fb](https://github.com/autorenderhq/autorender-ruby/commit/a67c6fb5b4e7efc52152d6a8d9b642e198ab406b))
60
- * restore content-type stripping and eager multipart buffering ([5ae6d69](https://github.com/autorenderhq/autorender-ruby/commit/5ae6d69493de87916ed23ddaf7753fae116a4aa8))
61
- * restore content-type stripping and eager multipart buffering for retries ([8fc3542](https://github.com/autorenderhq/autorender-ruby/commit/8fc3542cbd8a1a5df00057846b890dbb2f1fde24))
62
- * restore content-type stripping and eager multipart buffering for retries ([c1ea3dd](https://github.com/autorenderhq/autorender-ruby/commit/c1ea3dd618ab041d7753b6d7ec0b99a5f94c349f))
63
- * restore content-type stripping and eager multipart buffering for retries ([16b199f](https://github.com/autorenderhq/autorender-ruby/commit/16b199ff3f5541ace9bc55bee9724db1c398c153))
64
- * **test:** pass body as String to ReadIOAdapter so CGI can multi-read ([09e3684](https://github.com/autorenderhq/autorender-ruby/commit/09e3684b6a6e9a921f4bf2ea2927d360622b5189))
65
- * update FakeCGI test helper to handle buffered String body ([b0bd179](https://github.com/autorenderhq/autorender-ruby/commit/b0bd179fb8ac25c6953fc75db832fe2ab734dd16))
71
+ * **client:** elide content type header on requests without body ([553ad30](https://github.com/autorender/autorender-ruby/commit/553ad304fe2053211d95d0cefce4ed9c922f1d92))
72
+ * patch multipart buffer replay, bodyless DELETE content-type, and test adapter ([eb66723](https://github.com/autorender/autorender-ruby/commit/eb667233b4b537e158d25f357bf91adee5304675))
73
+ * **python:** rename pagination field has_next_page -> has_next to fix pyright lint ([d49e480](https://github.com/autorender/autorender-ruby/commit/d49e480c617a82896affa131551605b80ab84004))
74
+ * restore content-type stripping and eager multipart buffering ([a67c6fb](https://github.com/autorender/autorender-ruby/commit/a67c6fb5b4e7efc52152d6a8d9b642e198ab406b))
75
+ * restore content-type stripping and eager multipart buffering ([5ae6d69](https://github.com/autorender/autorender-ruby/commit/5ae6d69493de87916ed23ddaf7753fae116a4aa8))
76
+ * restore content-type stripping and eager multipart buffering for retries ([8fc3542](https://github.com/autorender/autorender-ruby/commit/8fc3542cbd8a1a5df00057846b890dbb2f1fde24))
77
+ * restore content-type stripping and eager multipart buffering for retries ([c1ea3dd](https://github.com/autorender/autorender-ruby/commit/c1ea3dd618ab041d7753b6d7ec0b99a5f94c349f))
78
+ * restore content-type stripping and eager multipart buffering for retries ([16b199f](https://github.com/autorender/autorender-ruby/commit/16b199ff3f5541ace9bc55bee9724db1c398c153))
79
+ * **test:** pass body as String to ReadIOAdapter so CGI can multi-read ([09e3684](https://github.com/autorender/autorender-ruby/commit/09e3684b6a6e9a921f4bf2ea2927d360622b5189))
80
+ * update FakeCGI test helper to handle buffered String body ([b0bd179](https://github.com/autorender/autorender-ruby/commit/b0bd179fb8ac25c6953fc75db832fe2ab734dd16))
66
81
 
67
82
 
68
83
  ### Chores
69
84
 
70
- * **internal:** more robust bootstrap script ([127a1d1](https://github.com/autorenderhq/autorender-ruby/commit/127a1d1ae9215aff1f662e563de5dc48d269115e))
71
- * **tests:** bump steady to v0.22.1 ([9ddf2e0](https://github.com/autorenderhq/autorender-ruby/commit/9ddf2e0d1b60a4dd82f50d6c6c74e6e901c01e11))
85
+ * **internal:** more robust bootstrap script ([127a1d1](https://github.com/autorender/autorender-ruby/commit/127a1d1ae9215aff1f662e563de5dc48d269115e))
86
+ * **tests:** bump steady to v0.22.1 ([9ddf2e0](https://github.com/autorender/autorender-ruby/commit/9ddf2e0d1b60a4dd82f50d6c6c74e6e901c01e11))
data/README.md CHANGED
@@ -1,14 +1,12 @@
1
1
  # Autorender Ruby API library
2
2
 
3
- The Autorender Ruby library provides convenient access to the Autorender REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/autorenderhq/autorender-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
4
-
5
- It is generated with [Stainless](https://www.stainless.com/).
3
+ The Autorender Ruby library provides convenient access to the Autorender REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/autorender/autorender-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
6
4
 
7
5
  ## Documentation
8
6
 
9
7
  Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/autorender).
10
8
 
11
- The REST API documentation can be found on [autorender.mintlify.app](https://autorender.mintlify.app/).
9
+ The REST API documentation can be found on [autorender.io](https://autorender.io/docs).
12
10
 
13
11
  ## Installation
14
12
 
@@ -17,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
17
15
  <!-- x-release-please-start-version -->
18
16
 
19
17
  ```ruby
20
- gem "autorender", "~> 0.2.0"
18
+ gem "autorender", "~> 0.2.2"
21
19
  ```
22
20
 
23
21
  <!-- x-release-please-end -->
@@ -32,9 +30,37 @@ autorender = Autorender::Client.new(
32
30
  api_key: ENV["AUTORENDER_API_KEY"] # This is the default and can be omitted
33
31
  )
34
32
 
35
- files = autorender.files.list(limit: 10)
33
+ page = autorender.files.list(limit: 10)
34
+
35
+ puts(page.id)
36
+ ```
37
+
38
+ ### Pagination
39
+
40
+ List methods in the Autorender API are paginated.
41
+
42
+ This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
43
+
44
+ ```ruby
45
+ page = autorender.files.list
36
46
 
37
- puts(files.files)
47
+ # Fetch single item from page.
48
+ file = page.files[0]
49
+ puts(file.id)
50
+
51
+ # Automatically fetches more pages as needed.
52
+ page.auto_paging_each do |file|
53
+ puts(file.id)
54
+ end
55
+ ```
56
+
57
+ Alternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.
58
+
59
+ ```ruby
60
+ if page.next_page?
61
+ new_page = page.next_page
62
+ puts(new_page.files[0].id)
63
+ end
38
64
  ```
39
65
 
40
66
  ### File uploads
@@ -263,4 +289,4 @@ Ruby 3.2.0 or higher.
263
289
 
264
290
  ## Contributing
265
291
 
266
- See [the contributing documentation](https://github.com/autorenderhq/autorender-ruby/tree/main/CONTRIBUTING.md).
292
+ See [the contributing documentation](https://github.com/autorender/autorender-ruby/tree/main/CONTRIBUTING.md).
data/SECURITY.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Reporting Security Issues
4
4
 
5
- This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
5
+ We take security seriously, and encourage you to report any security vulnerability promptly so that appropriate action can be taken.
6
6
 
7
- To report a security issue, please contact the Stainless team at security@stainless.com.
7
+ To report a security issue, please contact us at engineering@autorender.io.
8
8
 
9
9
  ## Responsible Disclosure
10
10
 
@@ -10,27 +10,21 @@ module Autorender
10
10
  # end
11
11
  #
12
12
  # @example
13
- # page_pagination.auto_paging_each do |item|
14
- # puts(item)
13
+ # page_pagination.auto_paging_each do |file|
14
+ # puts(file)
15
15
  # end
16
16
  class PagePagination
17
17
  include Autorender::Internal::Type::BasePage
18
18
 
19
19
  # @return [Array<generic<Elem>>, nil]
20
- attr_accessor :data
20
+ attr_accessor :files
21
21
 
22
- # @return [Integer]
23
- attr_accessor :current_page
24
-
25
- # @return [Boolean]
26
- attr_accessor :has_next
27
-
28
- # @return [Integer]
29
- attr_accessor :total_results
22
+ # @return [Meta]
23
+ attr_accessor :meta
30
24
 
31
25
  # @return [Boolean]
32
26
  def next_page?
33
- !data.to_a.empty?
27
+ meta&.has_next
34
28
  end
35
29
 
36
30
  # @raise [Autorender::HTTP::Error]
@@ -41,7 +35,7 @@ module Autorender
41
35
  raise RuntimeError.new(message)
42
36
  end
43
37
 
44
- req = Autorender::Internal::Util.deep_merge(@req, {query: {page: (current_page || 1).to_i.succ}})
38
+ req = Autorender::Internal::Util.deep_merge(@req, {query: {page: (meta&.page || 1).to_i.succ}})
45
39
  @client.request(req)
46
40
  end
47
41
 
@@ -55,7 +49,7 @@ module Autorender
55
49
 
56
50
  page = self
57
51
  loop do
58
- page.data&.each(&blk)
52
+ page.files&.each(&blk)
59
53
 
60
54
  break unless page.next_page?
61
55
  page = page.next_page
@@ -72,24 +66,43 @@ module Autorender
72
66
  super
73
67
 
74
68
  case page_data
75
- in {data: Array => data}
76
- @data = data.map { Autorender::Internal::Type::Converter.coerce(@model, _1) }
69
+ in {files: Array => files}
70
+ @files = files.map { Autorender::Internal::Type::Converter.coerce(@model, _1) }
71
+ else
72
+ end
73
+ case page_data
74
+ in {meta: Hash | nil => meta}
75
+ @meta = Autorender::Internal::Type::Converter.coerce(
76
+ Autorender::Internal::PagePagination::Meta,
77
+ meta
78
+ )
77
79
  else
78
80
  end
79
- @current_page = page_data[:current_page]
80
- @has_next = page_data[:has_next]
81
- @total_results = page_data[:total_results]
82
81
  end
83
82
 
84
83
  # @api private
85
84
  #
86
85
  # @return [String]
87
86
  def inspect
88
- # rubocop:disable Layout/LineLength
89
87
  model = Autorender::Internal::Type::Converter.inspect(@model, depth: 1)
90
88
 
91
- "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)} current_page=#{current_page.inspect} has_next=#{has_next.inspect} total_results=#{total_results.inspect}>"
92
- # rubocop:enable Layout/LineLength
89
+ "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}>"
90
+ end
91
+
92
+ class Meta < Autorender::Internal::Type::BaseModel
93
+ # @!attribute has_next
94
+ #
95
+ # @return [Boolean, nil]
96
+ optional :has_next, Autorender::Internal::Type::Boolean, api_name: :hasNext
97
+
98
+ # @!attribute page
99
+ #
100
+ # @return [Integer, nil]
101
+ optional :page, Integer
102
+
103
+ # @!method initialize(has_next: nil, page: nil)
104
+ # @param has_next [Boolean]
105
+ # @param page [Integer]
93
106
  end
94
107
  end
95
108
  end
@@ -306,7 +306,10 @@ module Autorender
306
306
  Autorender::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
- headers.delete("content-type") if body.nil?
309
+ # Generated methods always pass `req[:body]` for operations that define a
310
+ # request body, so only elide the content-type header when the operation
311
+ # has no body at all, not when an optional body param was omitted.
312
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
310
313
 
311
314
  url = Autorender::Internal::Util.join_parsed_uri(
312
315
  @base_url_components,
@@ -4,164 +4,109 @@ module Autorender
4
4
  module Models
5
5
  # @see Autorender::Resources::Files#list
6
6
  class FileListResponse < Autorender::Internal::Type::BaseModel
7
- # @!attribute files
8
- #
9
- # @return [Array<Autorender::Models::FileListResponse::File>]
10
- required :files, -> { Autorender::Internal::Type::ArrayOf[Autorender::Models::FileListResponse::File] }
11
-
12
- # @!attribute meta
13
- #
14
- # @return [Autorender::Models::FileListResponse::Meta]
15
- required :meta, -> { Autorender::Models::FileListResponse::Meta }
16
-
17
- # @!method initialize(files:, meta:)
18
- # Files list
19
- #
20
- # @param files [Array<Autorender::Models::FileListResponse::File>]
21
- # @param meta [Autorender::Models::FileListResponse::Meta]
22
-
23
- class File < Autorender::Internal::Type::BaseModel
24
- # @!attribute id
25
- #
26
- # @return [String]
27
- required :id, String
28
-
29
- # @!attribute created_at
30
- #
31
- # @return [Time]
32
- required :created_at, Time
33
-
34
- # @!attribute file_no
35
- #
36
- # @return [String]
37
- required :file_no, String
38
-
39
- # @!attribute folder_name
40
- #
41
- # @return [String, nil]
42
- required :folder_name, String, nil?: true
43
-
44
- # @!attribute folder_no
45
- #
46
- # @return [String, nil]
47
- required :folder_no, String, nil?: true
48
-
49
- # @!attribute format_
50
- #
51
- # @return [String, nil]
52
- required :format_, String, api_name: :format, nil?: true
53
-
54
- # @!attribute height
55
- #
56
- # @return [Integer, nil]
57
- required :height, Integer, nil?: true
58
-
59
- # @!attribute metadata
60
- #
61
- # @return [Hash{Symbol=>Object}, nil]
62
- required :metadata,
63
- Autorender::Internal::Type::HashOf[Autorender::Internal::Type::Unknown],
64
- nil?: true
65
-
66
- # @!attribute mime_type
67
- #
68
- # @return [String]
69
- required :mime_type, String
70
-
71
- # @!attribute name
72
- #
73
- # @return [String]
74
- required :name, String
75
-
76
- # @!attribute path
77
- #
78
- # @return [String]
79
- required :path, String
80
-
81
- # @!attribute size
82
- #
83
- # @return [Integer]
84
- required :size, Integer
85
-
86
- # @!attribute source
87
- #
88
- # @return [String]
89
- required :source, String
90
-
91
- # @!attribute tags
92
- #
93
- # @return [Array<String>]
94
- required :tags, Autorender::Internal::Type::ArrayOf[String]
95
-
96
- # @!attribute updated_at
97
- #
98
- # @return [Time, nil]
99
- required :updated_at, Time, nil?: true
100
-
101
- # @!attribute url
102
- #
103
- # @return [String]
104
- required :url, String
105
-
106
- # @!attribute width
107
- #
108
- # @return [Integer, nil]
109
- required :width, Integer, nil?: true
110
-
111
- # @!method initialize(id:, created_at:, file_no:, folder_name:, folder_no:, format_:, height:, metadata:, mime_type:, name:, path:, size:, source:, tags:, updated_at:, url:, width:)
112
- # @param id [String]
113
- # @param created_at [Time]
114
- # @param file_no [String]
115
- # @param folder_name [String, nil]
116
- # @param folder_no [String, nil]
117
- # @param format_ [String, nil]
118
- # @param height [Integer, nil]
119
- # @param metadata [Hash{Symbol=>Object}, nil]
120
- # @param mime_type [String]
121
- # @param name [String]
122
- # @param path [String]
123
- # @param size [Integer]
124
- # @param source [String]
125
- # @param tags [Array<String>]
126
- # @param updated_at [Time, nil]
127
- # @param url [String]
128
- # @param width [Integer, nil]
129
- end
130
-
131
- # @see Autorender::Models::FileListResponse#meta
132
- class Meta < Autorender::Internal::Type::BaseModel
133
- # @!attribute has_next
134
- #
135
- # @return [Boolean]
136
- required :has_next, Autorender::Internal::Type::Boolean, api_name: :hasNext
137
-
138
- # @!attribute has_prev
139
- #
140
- # @return [Boolean]
141
- required :has_prev, Autorender::Internal::Type::Boolean, api_name: :hasPrev
142
-
143
- # @!attribute limit
144
- #
145
- # @return [Integer]
146
- required :limit, Integer
147
-
148
- # @!attribute page
149
- #
150
- # @return [Integer]
151
- required :page, Integer
152
-
153
- # @!attribute total
154
- #
155
- # @return [Integer]
156
- required :total, Integer
157
-
158
- # @!method initialize(has_next:, has_prev:, limit:, page:, total:)
159
- # @param has_next [Boolean]
160
- # @param has_prev [Boolean]
161
- # @param limit [Integer]
162
- # @param page [Integer]
163
- # @param total [Integer]
164
- end
7
+ # @!attribute id
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute created_at
13
+ #
14
+ # @return [Time]
15
+ required :created_at, Time
16
+
17
+ # @!attribute file_no
18
+ #
19
+ # @return [String]
20
+ required :file_no, String
21
+
22
+ # @!attribute folder_name
23
+ #
24
+ # @return [String, nil]
25
+ required :folder_name, String, nil?: true
26
+
27
+ # @!attribute folder_no
28
+ #
29
+ # @return [String, nil]
30
+ required :folder_no, String, nil?: true
31
+
32
+ # @!attribute format_
33
+ #
34
+ # @return [String, nil]
35
+ required :format_, String, api_name: :format, nil?: true
36
+
37
+ # @!attribute height
38
+ #
39
+ # @return [Integer, nil]
40
+ required :height, Integer, nil?: true
41
+
42
+ # @!attribute metadata
43
+ #
44
+ # @return [Hash{Symbol=>Object}, nil]
45
+ required :metadata, Autorender::Internal::Type::HashOf[Autorender::Internal::Type::Unknown], nil?: true
46
+
47
+ # @!attribute mime_type
48
+ #
49
+ # @return [String]
50
+ required :mime_type, String
51
+
52
+ # @!attribute name
53
+ #
54
+ # @return [String]
55
+ required :name, String
56
+
57
+ # @!attribute path
58
+ #
59
+ # @return [String]
60
+ required :path, String
61
+
62
+ # @!attribute size
63
+ #
64
+ # @return [Integer]
65
+ required :size, Integer
66
+
67
+ # @!attribute source
68
+ #
69
+ # @return [String]
70
+ required :source, String
71
+
72
+ # @!attribute tags
73
+ #
74
+ # @return [Array<String>]
75
+ required :tags, Autorender::Internal::Type::ArrayOf[String]
76
+
77
+ # @!attribute updated_at
78
+ #
79
+ # @return [Time, nil]
80
+ required :updated_at, Time, nil?: true
81
+
82
+ # @!attribute url
83
+ #
84
+ # @return [String]
85
+ required :url, String
86
+
87
+ # @!attribute width
88
+ #
89
+ # @return [Integer, nil]
90
+ required :width, Integer, nil?: true
91
+
92
+ # @!method initialize(id:, created_at:, file_no:, folder_name:, folder_no:, format_:, height:, metadata:, mime_type:, name:, path:, size:, source:, tags:, updated_at:, url:, width:)
93
+ # @param id [String]
94
+ # @param created_at [Time]
95
+ # @param file_no [String]
96
+ # @param folder_name [String, nil]
97
+ # @param folder_no [String, nil]
98
+ # @param format_ [String, nil]
99
+ # @param height [Integer, nil]
100
+ # @param metadata [Hash{Symbol=>Object}, nil]
101
+ # @param mime_type [String]
102
+ # @param name [String]
103
+ # @param path [String]
104
+ # @param size [Integer]
105
+ # @param source [String]
106
+ # @param tags [Array<String>]
107
+ # @param updated_at [Time, nil]
108
+ # @param url [String]
109
+ # @param width [Integer, nil]
165
110
  end
166
111
  end
167
112
  end