Skip to content

Commit d0c2772

Browse files
release: 0.1.0-alpha.7 (#115)
* chore(internal): version bump (#113) * chore: simplify internal utils (#114) * chore: misc sdk polish (#116) * chore: document LSP support in read me (#117) * feat: support query, header, and body params that have identical names (#118) * feat: allow all valid `JSON` types to be encoded (#119) * chore: rename confusing `Type::BooleanModel` to `Type::Boolean` (#120) * fix: converter should transform stringio into string where applicable (#121) * chore(internal): misc small improvements (#122) * chore(internal): run rubocop linter in parallel (#123) * chore(internal): rubocop rules (#124) * chore: always fold up method bodies in sorbet type definitions (#125) * chore: update yard comment formatting (#126) * chore(internal): more concise handling of parameter naming conflicts (#127) * codegen metadata * release: 0.1.0-alpha.7 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 2ebd4fd commit d0c2772

File tree

261 files changed

+2026
-2936
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

261 files changed

+2026
-2936
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.6"
2+
".": "0.1.0-alpha.7"
33
}

.rubocop.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ Layout/LineLength:
3939
AllowedPatterns:
4040
- "^\\s*#.*$"
4141
- ^require(_relative)?
42-
- "FinchAPI::(Models|Resources)::"
42+
- "FinchAPI::Internal::Type::BaseModel$"
43+
- "^\\s*[A-Z0-9_]+ = :"
44+
- "FinchAPI::(Models|Resources|Test)::"
4345
Max: 110
4446

4547
Layout/MultilineArrayLineBreaks:
@@ -109,8 +111,7 @@ Metrics/MethodLength:
109111
Enabled: false
110112

111113
Metrics/ModuleLength:
112-
Exclude:
113-
- "**/*.rbi"
114+
Enabled: false
114115

115116
Metrics/ParameterLists:
116117
Enabled: false
@@ -122,9 +123,9 @@ Metrics/PerceivedComplexity:
122123
Naming/BlockForwarding:
123124
Enabled: false
124125

126+
# Underscores are generally useful for disambiguation.
125127
Naming/ClassAndModuleCamelCase:
126-
Exclude:
127-
- "**/*.rbi"
128+
Enabled: false
128129

129130
Naming/MethodParameterName:
130131
Enabled: false
@@ -202,6 +203,9 @@ Style/MethodCallWithArgsParentheses:
202203
Exclude:
203204
- "**/*.gemspec"
204205

206+
Style/MultilineBlockChain:
207+
Enabled: false
208+
205209
# Perfectly fine.
206210
Style/MultipleComparison:
207211
Enabled: false

.solargraph.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ include:
55
- 'Rakefile'
66
- 'examples/**/*.rb'
77
- 'lib/**/*.rb'
8+
- 'test/finch-api/resource_namespaces.rb'
89
- 'test/finch-api/test_helper.rb'
910
exclude:
1011
- 'rbi/**/*'

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-14d375aab89e6b212fe459805a42d6ea7d7da8eae2037ae710a187d06911be1d.yml
33
openapi_spec_hash: 08b86ecbec3323717d48e4aaee48ed54
4-
config_hash: 2bca9e6b32f742acb077cf8822ec9e23
4+
config_hash: ce10384813f68ba3fed61c7b601b396b

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changelog
22

3+
## 0.1.0-alpha.7 (2025-04-08)
4+
5+
Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
6+
7+
### Features
8+
9+
* allow all valid `JSON` types to be encoded ([#119](https://github.com/Finch-API/finch-api-ruby/issues/119)) ([a67519c](https://github.com/Finch-API/finch-api-ruby/commit/a67519c5f2039cccce94f069ad1eeb40252290c1))
10+
* support query, header, and body params that have identical names ([#118](https://github.com/Finch-API/finch-api-ruby/issues/118)) ([4fa584a](https://github.com/Finch-API/finch-api-ruby/commit/4fa584ab9a22689faa9b218f508a38188d5847d3))
11+
12+
13+
### Bug Fixes
14+
15+
* converter should transform stringio into string where applicable ([#121](https://github.com/Finch-API/finch-api-ruby/issues/121)) ([432e28e](https://github.com/Finch-API/finch-api-ruby/commit/432e28e92b9704f9692937315a5bb129fccb9ed5))
16+
17+
18+
### Chores
19+
20+
* always fold up method bodies in sorbet type definitions ([#125](https://github.com/Finch-API/finch-api-ruby/issues/125)) ([ff97af2](https://github.com/Finch-API/finch-api-ruby/commit/ff97af205ffe88a190d05f6ecaf63d73794b39c0))
21+
* document LSP support in read me ([#117](https://github.com/Finch-API/finch-api-ruby/issues/117)) ([469c82c](https://github.com/Finch-API/finch-api-ruby/commit/469c82c13e10eff05dc59148195e41a8060c660f))
22+
* **internal:** misc small improvements ([#122](https://github.com/Finch-API/finch-api-ruby/issues/122)) ([9817037](https://github.com/Finch-API/finch-api-ruby/commit/981703710cff8afcdedc0c133457f54480f0cd7e))
23+
* **internal:** more concise handling of parameter naming conflicts ([#127](https://github.com/Finch-API/finch-api-ruby/issues/127)) ([81414ea](https://github.com/Finch-API/finch-api-ruby/commit/81414ea8318e9f7fef2fece402c9e31088a62c99))
24+
* **internal:** rubocop rules ([#124](https://github.com/Finch-API/finch-api-ruby/issues/124)) ([7e59465](https://github.com/Finch-API/finch-api-ruby/commit/7e59465247659dac04e33e608c8308c56fea8d58))
25+
* **internal:** run rubocop linter in parallel ([#123](https://github.com/Finch-API/finch-api-ruby/issues/123)) ([53b1156](https://github.com/Finch-API/finch-api-ruby/commit/53b1156d97634b97ad54330a2860b9cdbe996947))
26+
* **internal:** version bump ([#113](https://github.com/Finch-API/finch-api-ruby/issues/113)) ([14b68c9](https://github.com/Finch-API/finch-api-ruby/commit/14b68c95d5b50abe3d46745a86054d81e80684c1))
27+
* misc sdk polish ([#116](https://github.com/Finch-API/finch-api-ruby/issues/116)) ([9af5943](https://github.com/Finch-API/finch-api-ruby/commit/9af5943664bddedd57feab75609521ccfbf3afbd))
28+
* rename confusing `Type::BooleanModel` to `Type::Boolean` ([#120](https://github.com/Finch-API/finch-api-ruby/issues/120)) ([4295175](https://github.com/Finch-API/finch-api-ruby/commit/429517572c98a1ccc9851a6cb16e875546b637ee))
29+
* simplify internal utils ([#114](https://github.com/Finch-API/finch-api-ruby/issues/114)) ([0745cc7](https://github.com/Finch-API/finch-api-ruby/commit/0745cc74ce9ef4c0fa2c391ac62b155188110990))
30+
* update yard comment formatting ([#126](https://github.com/Finch-API/finch-api-ruby/issues/126)) ([695363a](https://github.com/Finch-API/finch-api-ruby/commit/695363a4a80ebae5104a0a01c9427abfc277afb0))
31+
332
## 0.1.0-alpha.6 (2025-04-04)
433

534
Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
finch-api (0.1.0.pre.alpha.5)
14+
finch-api (0.1.0.pre.alpha.6)
1515
connection_pool
1616

1717
GEM

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
1717
<!-- x-release-please-start-version -->
1818

1919
```ruby
20-
gem "finch-api", "~> 0.1.0.pre.alpha.5"
20+
gem "finch-api", "~> 0.1.0.pre.alpha.6"
2121
```
2222

2323
<!-- x-release-please-end -->
@@ -126,9 +126,23 @@ finch.hris.directory.list(request_options: {timeout: 5})
126126

127127
## LSP Support
128128

129-
### Sorbet
129+
### Solargraph
130+
131+
This library includes [Solargraph](https://solargraph.org) support for both auto completion and go to definition.
132+
133+
```ruby
134+
gem "solargraph", group: :development
135+
```
136+
137+
After Solargraph is installed, **you must populate its index** either via the provided editor command, or by running the following in your terminal:
138+
139+
```sh
140+
bundle exec solargraph gems
141+
```
130142

131-
**This library emits an intentional warning under the [`tapioca` toolchain](https://github.com/Shopify/tapioca)**. This is normal, and does not impact functionality.
143+
Otherwise Solargraph will not be able to provide type information or auto-completion for any non-indexed libraries.
144+
145+
### Sorbet
132146

133147
This library is written with [Sorbet type definitions](https://sorbet.org/docs/rbi). However, there is no runtime dependency on the `sorbet-runtime`.
134148

@@ -139,11 +153,17 @@ Due to limitations with the Sorbet type system, where a method otherwise can tak
139153
Please follow Sorbet's [setup guides](https://sorbet.org/docs/adopting) for best experience.
140154

141155
```ruby
142-
model = FinchAPI::Models::HRIS::DirectoryListParams.new
156+
params = FinchAPI::Models::HRIS::DirectoryListParams.new
143157

144-
finch.hris.directory.list(**model)
158+
finch.hris.directory.list(**params)
145159
```
146160

161+
Note: **This library emits an intentional warning under the [`tapioca` toolchain](https://github.com/Shopify/tapioca)**. This is normal, and does not impact functionality.
162+
163+
### Ruby LSP
164+
165+
The Ruby LSP has [best effort support](https://shopify.github.io/ruby-lsp/#guessed-types) for inferring type information from Ruby code, and as such it may not always be able to provide accurate type information.
166+
147167
## Advanced
148168

149169
### Making custom/undocumented requests

Rakefile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ require "rubocop/rake_task"
99

1010
CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/])
1111

12-
xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --]
13-
1412
multitask(default: [:test])
1513

1614
multitask(:test) do
@@ -22,17 +20,17 @@ multitask(:test) do
2220
ruby(*%w[-w -e], rb, verbose: false) { fail unless _1 }
2321
end
2422

25-
RuboCop::RakeTask.new(:rubocop) do |t|
26-
t.options = %w[--fail-level E]
27-
if ENV.key?("CI")
28-
t.options += %w[--format github]
29-
end
23+
rubo_find = %w[find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0]
24+
xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --]
25+
26+
multitask(:rubocop) do
27+
lint = xargs + %w[rubocop --fail-level E] + (ENV.key?("CI") ? %w[--format github] : [])
28+
sh("#{rubo_find.shelljoin} | #{lint.shelljoin}")
3029
end
3130

3231
multitask(:ruboformat) do
33-
find = %w[find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0]
3432
fmt = xargs + %w[rubocop --fail-level F --autocorrect --format simple --]
35-
sh("#{find.shelljoin} | #{fmt.shelljoin}")
33+
sh("#{rubo_find.shelljoin} | #{fmt.shelljoin}")
3634
end
3735

3836
multitask(:syntax_tree) do

lib/finch_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
require_relative "finch_api/internal/util"
4040
require_relative "finch_api/internal/type/converter"
4141
require_relative "finch_api/internal/type/unknown"
42-
require_relative "finch_api/internal/type/boolean_model"
42+
require_relative "finch_api/internal/type/boolean"
4343
require_relative "finch_api/internal/type/enum"
4444
require_relative "finch_api/internal/type/union"
4545
require_relative "finch_api/internal/type/array_of"

lib/finch_api/internal/transport/base_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def initialize(
393393
end
394394

395395
# Execute the request specified by `req`. This is the method that all resource
396-
# methods call into.
396+
# methods call into.
397397
#
398398
# @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: FinchAPI::Internal::Type::Unknown, options: {})
399399
#

0 commit comments

Comments
 (0)