Skip to content

Commit

Permalink
provide empty _TYPES because snappi deserializer expects it in some c…
Browse files Browse the repository at this point in the history
…ases
  • Loading branch information
ashutshkumr committed Feb 3, 2021
1 parent ef757c5 commit 54048b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion snappi/snappigenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@ def _write_snappi_object(self, ref, choice_method_name=None):
self._write(2, "'%s': '%s'," % (name, value))
self._write(1, '}')
self._write()
else:
# TODO: provide empty types as workaround because deserializer
# in snappicommon.py currently expects it
self._write(1, '_TYPES = {}')
self._write()

# write constants
# search for all simple properties with enum or
Expand Down Expand Up @@ -1087,6 +1092,6 @@ def _get_inline_ref(self, base_dir, filename, inline_key):


if __name__ == '__main__':
openapi_filename = None
openapi_filename = 'openapi.yaml'
# openapi_filename = os.path.normpath('../../models/openapi.yaml')
SnappiGenerator(dependencies=False, openapi_filename=openapi_filename)

0 comments on commit 54048b1

Please sign in to comment.