open_api_import 0.8.5 → 0.8.6
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 +5 -5
- 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: 9831061a87bf45ef15ba6d5f11ba63dd2b3cc15676b02d2d743f9ffba18bc0f0
|
4
|
+
data.tar.gz: 960ef6cb112bba14cdf0137d06bbe3065063860fbd15031e3f017a8c310eeb83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3802042bacd6cc83f34767378bb34fa21c1283499d81acbae4ed5bf0eba79f18a4145c2c9e970aa58e72903ffcaff0ce5aaf296308f0d7b0b161132d55fdd4b
|
7
|
+
data.tar.gz: 97d322690e9e0653ac96d112a99f16288bead5b20a6947f249bc031a942022d8fc12a6a56f1d4b1cf95925d9dd79f4eaaf6f44d82c72b043b92cdfda2c1b9142
|
data/lib/open_api_import.rb
CHANGED
@@ -751,7 +751,7 @@ class OpenApiImport
|
|
751
751
|
response_example.each do |rs|
|
752
752
|
#(@type Google) for the case in example the key is something like: @type:
|
753
753
|
if rs.match?(/^\s*@\w+:/)
|
754
|
-
rs.gsub!(/@(\w+):/,
|
754
|
+
rs.gsub!(/@(\w+):/,'\'@\1\':')
|
755
755
|
end
|
756
756
|
end
|
757
757
|
return response_example
|
@@ -813,13 +813,13 @@ class OpenApiImport
|
|
813
813
|
data_pattern << "#{dpk}: /#{dpv[:pattern].to_s}/"
|
814
814
|
end
|
815
815
|
elsif dpv.key?(:minLength) and dpv.key?(:maxLength)
|
816
|
-
data_pattern << "#{dpk}: :'#{dpv[:minLength]}-#{dpv[:maxLength]}:
|
816
|
+
data_pattern << "#{dpk}: :'#{dpv[:minLength]}-#{dpv[:maxLength]}:LN$'"
|
817
817
|
elsif dpv.key?(:minLength) and !dpv.key?(:maxLength)
|
818
|
-
data_pattern << "#{dpk}: :'#{dpv[:minLength]}:
|
818
|
+
data_pattern << "#{dpk}: :'#{dpv[:minLength]}:LN$'"
|
819
819
|
elsif !dpv.key?(:minLength) and dpv.key?(:maxLength)
|
820
|
-
data_pattern << "#{dpk}: :'0-#{dpv[:maxLength]}:
|
820
|
+
data_pattern << "#{dpk}: :'0-#{dpv[:maxLength]}:LN$'"
|
821
821
|
elsif dpv.key?(:minimum) and dpv.key?(:maximum) and dpv[:type]=='string'
|
822
|
-
data_pattern << "#{dpk}: :'#{dpv[:minimum]}-#{dpv[:maximum]}:
|
822
|
+
data_pattern << "#{dpk}: :'#{dpv[:minimum]}-#{dpv[:maximum]}:LN$'"
|
823
823
|
elsif dpv.key?(:minimum) and dpv.key?(:maximum)
|
824
824
|
data_pattern << "#{dpk}: #{dpv[:minimum]}..#{dpv[:maximum]}"
|
825
825
|
elsif dpv.key?(:minimum) and !dpv.key?(:maximum)
|