bullet_train-api 1.19.1 → 1.20.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc66b067c4a42bb18de69fa0d3cdbeaf9036c4765ebfa0a7d7cf62fa1eeca392
4
- data.tar.gz: 4982060860a9682f021b3cf4f59d7806969022e07b2b39cb76b73d2a30ddd927
3
+ metadata.gz: 045b35412a6e2ecd0fdb20fc7ff6ffa45698f91c07d876d8d1450d979462b3b3
4
+ data.tar.gz: e466b377e4f2e4a53f80a34a955ee1e5a4d1c2d06712a0d64ee127127938cabd
5
5
  SHA512:
6
- metadata.gz: c33b81f11a999174c494f0a57f0b984921d2f28fbc097cb9d0c91436704cdcb997e9966f8d82544db62057d1d8a905d9414881782c2185a8d75b99881c3ad019
7
- data.tar.gz: 0c81d60d8bde05e0bd283561ae5233d003465bdad65622011204a9d86b7134fe8561ffd3f7a0ab3fd975d1020b1fba1e93638de850afa77c750325deee182f11
6
+ metadata.gz: d97babc363062439c745dbffaf1b2c5bd73bb3b703dfb1ad4a65a0f7a4322a2a6f047ac34d0e3682a243a7094a37572bb4bfd866ce2c9eb7f65f3a5c2779a76d
7
+ data.tar.gz: 900c3d0b8d998477197c2756a0bace9addd836335e5d37397438615c86e418479bdec7199833ebdaf61ffdabdd54ed8b7df3c92d324ef1810cc6799197321cb6
@@ -50,8 +50,10 @@ module Api
50
50
  def automatic_components_for(model, **options)
51
51
  locals = options.delete(:locals) || {}
52
52
 
53
- path = "app/views/api/#{@version}"
54
- paths = [path, "app/views"] + gem_paths.product(%W[/#{path} /app/views]).map(&:join)
53
+ view_path = "app/views"
54
+ api_path = "#{view_path}/api/#{@version || "v1"}"
55
+ paths = [Rails.root.join(api_path).to_s, Rails.root.join(view_path).to_s]
56
+ paths += gem_paths.product(%W[/#{api_path} /#{view_path}]).map(&:join)
55
57
 
56
58
  # Transform values the same way we do for Jbuilder templates
57
59
  Jbuilder::Schema::Template.prepend ValuesTransformer
@@ -248,8 +250,12 @@ module Api
248
250
  custom["add"].each do |property, details|
249
251
  if details["required"]
250
252
  original["required"] << property
251
- details.delete("required")
253
+ else
254
+ original["required"].delete(property)
252
255
  end
256
+ # Always delete required because this attribute should only go
257
+ # into the required array according to OpenAPI 3.1.
258
+ details.delete("required")
253
259
  original["properties"][property] = details
254
260
  if details["example"]
255
261
  original["example"][property] = details["example"]
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module Api
3
- VERSION = "1.19.1"
3
+ VERSION = "1.20.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.1
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-19 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: standard
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  - !ruby/object:Gem::Version
249
249
  version: '0'
250
250
  requirements: []
251
- rubygems_version: 3.6.2
251
+ rubygems_version: 3.6.7
252
252
  specification_version: 4
253
253
  summary: Bullet Train API
254
254
  test_files: []