Skip to content

Commit 77d162a

Browse files
release: 0.1.0-alpha.26 (#157)
* chore: update @stainless-api/prism-cli to v5.15.0 * chore(internal): update comment in script * chore: collect metadata from type DSL * feat(api): api update * feat(api): api update * fix(client): prioritise bearer auth * release: 0.1.0-alpha.26 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Robert Craigie <robert@craigie.dev>
1 parent 6092716 commit 77d162a

Some content is hidden

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

46 files changed

+428
-95
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.25"
2+
".": "0.1.0-alpha.26"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-73c284d36c1ed2d9963fc733e421005fad76e559de8efe9baa6511a43dd72668.yml
3-
openapi_spec_hash: 1e58c4445919b71c77e5c7f16bd6fa7d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e8b684dbd61d1724b5e516a573a952bb6906d63840e27ebda7731a2f71061aff.yml
3+
openapi_spec_hash: 8baff9577d4e721d0494ff315da267ca
44
config_hash: 5146b12344dae76238940989dac1e8a0

CHANGELOG.md

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

3+
## 0.1.0-alpha.26 (2025-08-14)
4+
5+
Full Changelog: [v0.1.0-alpha.25...v0.1.0-alpha.26](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.25...v0.1.0-alpha.26)
6+
7+
### Features
8+
9+
* **api:** api update ([80b711b](https://github.com/Finch-API/finch-api-ruby/commit/80b711bc0c917ce1f1f4daaac3301b5c8e5bd1e7))
10+
* **api:** api update ([5b2d8f2](https://github.com/Finch-API/finch-api-ruby/commit/5b2d8f2d1c30039ca4d4c5acfa055b5c60acefb9))
11+
12+
13+
### Bug Fixes
14+
15+
* **client:** prioritise bearer auth ([d8817a5](https://github.com/Finch-API/finch-api-ruby/commit/d8817a5e6c6f289dc1dd1a5a5ad35c43049d1f0e))
16+
17+
18+
### Chores
19+
20+
* collect metadata from type DSL ([e919ec0](https://github.com/Finch-API/finch-api-ruby/commit/e919ec0b110aa3a5ba703bf9dd317b2ea4091a28))
21+
* **internal:** update comment in script ([5969020](https://github.com/Finch-API/finch-api-ruby/commit/59690202144cf2295b6edc7542f10cd6932b0da2))
22+
* update @stainless-api/prism-cli to v5.15.0 ([2953337](https://github.com/Finch-API/finch-api-ruby/commit/29533376815ef4be96be5fde8de45fcf3f48a232))
23+
324
## 0.1.0-alpha.25 (2025-07-31)
425

526
Full Changelog: [v0.1.0-alpha.24...v0.1.0-alpha.25](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.24...v0.1.0-alpha.25)

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.23)
14+
finch-api (0.1.0.pre.alpha.26)
1515
connection_pool
1616

1717
GEM

README.md

Lines changed: 1 addition & 1 deletion
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.25"
20+
gem "finch-api", "~> 0.1.0.pre.alpha.26"
2121
```
2222

2323
<!-- x-release-please-end -->

lib/finch_api/client.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ class Client < FinchAPI::Internal::Transport::BaseClient
5858
#
5959
# @return [Hash{String=>String}]
6060
private def auth_headers
61-
{**bearer_auth, **basic_auth}
61+
return bearer_auth unless bearer_auth.empty?
62+
return basic_auth unless basic_auth.empty?
63+
{}
6264
end
6365

6466
# @api private

lib/finch_api/internal/type/array_of.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def to_sorbet_type
148148
# @option spec [Boolean] :"nil?"
149149
def initialize(type_info, spec = {})
150150
@item_type_fn = FinchAPI::Internal::Type::Converter.type_info(type_info || spec)
151+
@meta = FinchAPI::Internal::Type::Converter.meta_info(type_info, spec)
151152
@nilable = spec.fetch(:nil?, false)
152153
end
153154

lib/finch_api/internal/type/base_model.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def fields
5252
#
5353
# @option spec [Boolean] :"nil?"
5454
private def add_field(name_sym, required:, type_info:, spec:)
55+
meta = FinchAPI::Internal::Type::Converter.meta_info(type_info, spec)
5556
type_fn, info =
5657
case type_info
5758
in Proc | FinchAPI::Internal::Type::Converter | Class
@@ -81,7 +82,8 @@ def fields
8182
required: required,
8283
nilable: nilable,
8384
const: const,
84-
type_fn: type_fn
85+
type_fn: type_fn,
86+
meta: meta
8587
}
8688

8789
define_method(setter) do |value|

lib/finch_api/internal/type/converter.rb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,33 @@ def type_info(spec)
9898
end
9999
end
100100

101+
# @api private
102+
#
103+
# @param type_info [Hash{Symbol=>Object}, Proc, FinchAPI::Internal::Type::Converter, Class] .
104+
#
105+
# @option type_info [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
106+
#
107+
# @option type_info [Proc] :enum
108+
#
109+
# @option type_info [Proc] :union
110+
#
111+
# @option type_info [Boolean] :"nil?"
112+
#
113+
# @param spec [Hash{Symbol=>Object}, Proc, FinchAPI::Internal::Type::Converter, Class] .
114+
#
115+
# @option spec [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
116+
#
117+
# @option spec [Proc] :enum
118+
#
119+
# @option spec [Proc] :union
120+
#
121+
# @option spec [Boolean] :"nil?"
122+
#
123+
# @return [Hash{Symbol=>Object}]
124+
def meta_info(type_info, spec)
125+
[spec, type_info].grep(Hash).first.to_h.except(:const, :enum, :union, :nil?)
126+
end
127+
101128
# @api private
102129
#
103130
# @param translate_names [Boolean]

lib/finch_api/internal/type/hash_of.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ def to_sorbet_type
168168
# @option spec [Boolean] :"nil?"
169169
def initialize(type_info, spec = {})
170170
@item_type_fn = FinchAPI::Internal::Type::Converter.type_info(type_info || spec)
171+
@meta = FinchAPI::Internal::Type::Converter.meta_info(type_info, spec)
171172
@nilable = spec.fetch(:nil?, false)
172173
end
173174

0 commit comments

Comments
 (0)