forked from loafle/openapi-generator-original
This commit is contained in:
parent
589e5c6312
commit
1a6d3671d9
@ -246,14 +246,14 @@
|
||||
{{#anyOf}}
|
||||
{{#-first}}
|
||||
_any_of_found = false
|
||||
openapi_any_of.each do |_class|
|
||||
self.class.openapi_any_of.each do |_class|
|
||||
_any_of = {{moduleName}}.const_get(_class).build_from_hash(self.to_hash)
|
||||
if _any_of.valid?
|
||||
_any_of_found = true
|
||||
end
|
||||
end
|
||||
|
||||
if !_any_of_found?
|
||||
if !_any_of_found
|
||||
return false
|
||||
end
|
||||
|
||||
@ -262,10 +262,10 @@
|
||||
{{#oneOf}}
|
||||
{{#-first}}
|
||||
_one_of_found = false
|
||||
openapi_one_of.each do |_class|
|
||||
self.class.openapi_one_of.each do |_class|
|
||||
_one_of = {{moduleName}}.const_get(_class).build_from_hash(self.to_hash)
|
||||
if _one_of.valid?
|
||||
if _one_of_found?
|
||||
if _one_of_found
|
||||
return false
|
||||
else
|
||||
_one_of_found = true
|
||||
@ -273,7 +273,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
if !_one_of_found?
|
||||
if !_one_of_found
|
||||
return false
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user