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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b495dbdfe6e95a0c77d87aaec6435a994e4634b7cd3ec69b64e5dce6087522b
4
- data.tar.gz: b3e43422585c8b5c64728a878de8ef76c99d4ca00d4a95b73a759a0023b96539
3
+ metadata.gz: 020a2d2aa4b424cdb5b55613739715c86cae1ba5221ab415479939b1aae18299
4
+ data.tar.gz: b0d313dec5e9cf2b1337e642fe6330dee1f5bcfdc24d4ddde327fd7db5bd1cf7
5
5
  SHA512:
6
- metadata.gz: fa4d241b604e619bc815ce779fa46f8e8e76d24e8fc98c35744d1a3f38f945bc703a4fe1934752d6d660dc2f89576cc356f3315eefc586dd2833647f72f12432
7
- data.tar.gz: fff2da0a664b8db13b3929161d9bd47aa252e67b40975558e34b91966630adb85f3ddb4e2ad9629d4e6ee4a969c0250756f7a5b492f5dc36be817f788d1a7ee6
6
+ metadata.gz: c6b36d3bb45048672cbaa47fa72490ff4b523952f670e5c5732739dae81cbbe96eb76283aaaf9cc7117ed002e917b18456b447c1424a4a00ee47ed48cb2b5904
7
+ data.tar.gz: ee854d520847ce9ddbdb8666dc9b9a01356941e42d4e12101040b48e11087ee354e160a20ce10122ee33343533c84e97b3c5266db2837f0b696de83169b70ca3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- krakend-openapi-importer (1.1.1)
4
+ krakend-openapi-importer (1.2.0)
5
5
  thor (~> 1.2)
6
6
 
7
7
  GEM
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KrakendOpenAPI
4
- VERSION = '1.1.1'
4
+ VERSION = '1.2.0'
5
5
  end
@@ -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: path,
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: path,
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.1.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-07-09 00:00:00.000000000 Z
11
+ date: 2025-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor