open_api_import 0.5.2 → 0.5.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/lib/open_api_import.rb +16 -0
- 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: d5373bd60189cd24d98a4a6678c10e620c82329032b4d3fdf94612eb8fe9a2de
|
|
4
|
+
data.tar.gz: d632911fcb02ac638d49ec8437d3187516595c1d5c20eee25a69cb7d09a5941a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a1985fc74521df9ba93984c50c29be5bbc9455f06065f8ce37a88d3c35227ab0decd43a498a8942493b6f5c31ee907b80960044e082db4edc86bb87535f1909
|
|
7
|
+
data.tar.gz: edec1ec5196a831695e253625bee877072ba31aaa892d8489006bb7f739b515651fe9677d2dcac033bcf996f1a2a3ffd90b9df6dc99125d48e76772fd9d95b82
|
data/lib/open_api_import.rb
CHANGED
|
@@ -418,6 +418,22 @@ class OpenApiImport
|
|
|
418
418
|
end
|
|
419
419
|
|
|
420
420
|
unless data_examples.empty?
|
|
421
|
+
unless data_required.empty?
|
|
422
|
+
reqdata = []
|
|
423
|
+
data_examples[0].each do |edata|
|
|
424
|
+
data_required.each do |rdata|
|
|
425
|
+
if edata.scan(/^#{rdata}:/).size>0 or edata.scan(/:/).size==0
|
|
426
|
+
reqdata << edata
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
unless reqdata.empty?
|
|
431
|
+
output << "data: {"
|
|
432
|
+
output << reqdata.join(", \n")
|
|
433
|
+
output << "},"
|
|
434
|
+
end
|
|
435
|
+
end
|
|
436
|
+
|
|
421
437
|
output << "data_examples: ["
|
|
422
438
|
data_examples.each do |data|
|
|
423
439
|
output << "{"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: open_api_import
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mario Ruiz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-02-
|
|
11
|
+
date: 2019-02-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: oas_parser
|