krakend-openapi-importer 1.1.1 → 1.2.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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/lib/importer/version.rb +1 -1
- data/lib/transformers/oa3_transformer.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 020a2d2aa4b424cdb5b55613739715c86cae1ba5221ab415479939b1aae18299
|
|
4
|
+
data.tar.gz: b0d313dec5e9cf2b1337e642fe6330dee1f5bcfdc24d4ddde327fd7db5bd1cf7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6b36d3bb45048672cbaa47fa72490ff4b523952f670e5c5732739dae81cbbe96eb76283aaaf9cc7117ed002e917b18456b447c1424a4a00ee47ed48cb2b5904
|
|
7
|
+
data.tar.gz: ee854d520847ce9ddbdb8666dc9b9a01356941e42d4e12101040b48e11087ee354e160a20ce10122ee33343533c84e97b3c5266db2837f0b696de83169b70ca3
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -36,6 +36,7 @@ format: "json" # can be 'json' or 'yaml', optional, defaults to 'json'
|
|
|
36
36
|
pretty: false # make JSON pretty, optional, defaults to false
|
|
37
37
|
output: "output.json" # output file name, optional, defaults to 'output.json'
|
|
38
38
|
default_roles: ["guest"] # fall back roles for auth validator plugin when operation 'x-jwt-roles` are not specified, optional
|
|
39
|
+
base_path: '/api/v1' # optional, defaults to ''
|
|
39
40
|
defaults:
|
|
40
41
|
base:
|
|
41
42
|
name: Example application
|
data/lib/importer/version.rb
CHANGED
|
@@ -61,14 +61,17 @@ module KrakendOpenAPI
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def krakend_endpoint(path, method)
|
|
64
|
+
base_path = @importer_config['base_path'] || ''
|
|
65
|
+
endpoint_path = "#{base_path}#{path}"
|
|
66
|
+
|
|
64
67
|
{
|
|
65
|
-
endpoint:
|
|
68
|
+
endpoint: endpoint_path,
|
|
66
69
|
method: method.upcase,
|
|
67
70
|
output_encoding: @importer_config['defaults']&.dig('endpoint', 'output_encoding'),
|
|
68
71
|
input_headers: @importer_config['defaults']&.dig('endpoint', 'input_headers'),
|
|
69
72
|
input_query_strings: @importer_config['defaults']&.dig('endpoint', 'input_query_strings'),
|
|
70
73
|
backend: [{
|
|
71
|
-
url_pattern:
|
|
74
|
+
url_pattern: endpoint_path,
|
|
72
75
|
encoding: @importer_config['defaults']&.dig('backend', 0, 'encoding'),
|
|
73
76
|
host: @importer_config['defaults']&.dig('backend', 0, 'host')
|
|
74
77
|
}.compact]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: krakend-openapi-importer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Semenenko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|