mirror of
https://github.com/correl/openapi-core.git
synced 2024-12-28 19:19:23 +00:00
Merge pull request #13 from pbasista/bugfix/default-values
Use appropriate default values for OpenAPI object fields
This commit is contained in:
commit
3cc1101288
2 changed files with 7 additions and 7 deletions
|
@ -24,10 +24,10 @@ class ComponentsFactory(object):
|
|||
def create(self, components_spec):
|
||||
components_deref = self.dereferencer.dereference(components_spec)
|
||||
|
||||
schemas_spec = components_deref.get('schemas', [])
|
||||
responses_spec = components_deref.get('responses', [])
|
||||
parameters_spec = components_deref.get('parameters', [])
|
||||
request_bodies_spec = components_deref.get('request_bodies', [])
|
||||
schemas_spec = components_deref.get('schemas', {})
|
||||
responses_spec = components_deref.get('responses', {})
|
||||
parameters_spec = components_deref.get('parameters', {})
|
||||
request_bodies_spec = components_deref.get('request_bodies', {})
|
||||
|
||||
schemas = self.schemas_generator.generate(schemas_spec)
|
||||
responses = self._generate_response(responses_spec)
|
||||
|
|
|
@ -77,10 +77,10 @@ class SpecFactory(object):
|
|||
|
||||
spec_dict_deref = self.dereferencer.dereference(spec_dict)
|
||||
|
||||
info_spec = spec_dict_deref.get('info', [])
|
||||
info_spec = spec_dict_deref.get('info', {})
|
||||
servers_spec = spec_dict_deref.get('servers', [])
|
||||
paths = spec_dict_deref.get('paths', [])
|
||||
components_spec = spec_dict_deref.get('components', [])
|
||||
paths = spec_dict_deref.get('paths', {})
|
||||
components_spec = spec_dict_deref.get('components', {})
|
||||
|
||||
info = self.info_factory.create(info_spec)
|
||||
servers = self.servers_generator.generate(servers_spec)
|
||||
|
|
Loading…
Reference in a new issue