model_driven_api 3.6.2 → 3.6.3
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 +4 -4
- data/app/controllers/api/v2/info_controller.rb +6 -1
- data/lib/model_driven_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18a706d49e3ccea7baed117aa8e3f7912c9a1480882e924a3675dc7b7133c459
|
|
4
|
+
data.tar.gz: 66ce008c9ca7f0f240da9c424336fd46fb151e9a8076db5f76b322bb79348583
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 965dfd5cf0fb7075b6cb6c3b21dc1ccbccf9b86e46f31c317fcf5248462eed6954e807dff3b9732a9b95e7ffcc1449fc892e7bfc21b7cba960c556f08a698d23
|
|
7
|
+
data.tar.gz: a1c2735b2a86a31b1918eb1f7366415a594dbc0f4b2ea6474f240f3534f274371f00692c173d9cbe73a0ab2f191321ed739e4edc73a2512fa1745fb7cab3adcf
|
|
@@ -597,7 +597,12 @@ class Api::V2::InfoController < Api::V2::ApplicationController
|
|
|
597
597
|
v[:tags] = [d.model_name.name]
|
|
598
598
|
end
|
|
599
599
|
|
|
600
|
-
|
|
600
|
+
# Check if any HTTP method has path parameters with 'in: path', and if so, add {id} to the path
|
|
601
|
+
path = "/#{model}/custom_action/#{action}"
|
|
602
|
+
has_path_params = openapi_definition.any? { |_k, v| v.is_a?(Hash) && v[:parameters]&.any? { |p| p[:in] == 'path' } }
|
|
603
|
+
path += "/{id}" if has_path_params
|
|
604
|
+
|
|
605
|
+
pivot[path] = openapi_definition if openapi_definition
|
|
601
606
|
end
|
|
602
607
|
pivot["/#{model}/search"] = {
|
|
603
608
|
# Complex queries are made using ranskac search via a post endpoint
|