bullet_train-api 1.4.6 → 1.4.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 418462d2aa9af4a84533d5c3fea8bbbdf5e4a09fb12c934cf1eebf81f64b6ef8
|
4
|
+
data.tar.gz: f56ce158eb38fefc80f131b9ea64e58e67589d0af2e788be07709d0289d8ce19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23b5fe1738277b443419a63cf33294263391fd4e5d73bbe8f63810d8d60574587a53527a6d0c5fca8a751638c3367c6ab4279a0d0e3e4e38ecf59b1faaae4dc2
|
7
|
+
data.tar.gz: 39ddcc4efca744f41360f290cd7e9f5b4ee5b20789007741f5eabdd83a2e93458f23a2c2ad15c6aeb560078e9b755c3ee3fb24094e7afb01fcf0fb233cf1e563
|
@@ -8,7 +8,7 @@ class Api::OpenApiController < ApplicationController
|
|
8
8
|
before_action :set_default_response_format
|
9
9
|
|
10
10
|
def index
|
11
|
-
@version = params[:version]
|
11
|
+
@version = params[:version].match?(/v\d+/) ? params[:version] : raise("Unknown version error")
|
12
12
|
render "api/#{@version}/open_api/index", layout: nil, format: :text
|
13
13
|
end
|
14
14
|
end
|
@@ -44,7 +44,8 @@ module Api
|
|
44
44
|
|
45
45
|
def automatic_components_for(model, locals: {})
|
46
46
|
path = "app/views/api/#{@version}"
|
47
|
-
paths =
|
47
|
+
paths = [path, "app/views"] + gem_paths.product(%W[/#{path} /app/views]).map(&:join)
|
48
|
+
|
48
49
|
jbuilder = Jbuilder::Schema.renderer(paths, locals: {
|
49
50
|
# If we ever get to the point where we need a real model here, we should implement an example team in seeds that we can source it from.
|
50
51
|
model.name.underscore.split("/").last.to_sym => model.new,
|
@@ -62,7 +63,7 @@ module Api
|
|
62
63
|
example || model.new,
|
63
64
|
title: I18n.t("#{model.name.underscore.pluralize}.label"),
|
64
65
|
# TODO Improve this. We don't have a generic description for models we can use here.
|
65
|
-
description: I18n.t("#{model.name.underscore.pluralize}.label")
|
66
|
+
description: I18n.t("#{model.name.underscore.pluralize}.label")
|
66
67
|
)
|
67
68
|
|
68
69
|
attributes_output = JSON.parse(schema_json)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 2.
|
103
|
+
version: 2.3.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 2.
|
110
|
+
version: 2.3.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: factory_bot
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|