Skip to content

bugfix: Fix #156.#163

Merged
cwacek merged 1 commit intomasterfrom
feature/fix-156
Jun 6, 2019
Merged

bugfix: Fix #156.#163
cwacek merged 1 commit intomasterfrom
feature/fix-156

Conversation

@cwacek
Copy link
Copy Markdown
Owner

@cwacek cwacek commented Jun 6, 2019

This was a silly bug. Didn't explicitly call validate when resolving types in new.

Fixes #156

Comment thread test/test_regression_156.py Outdated
# round-trip serialize-deserialize into class defined with `oneOf`
er2 = classes.Multipleobjects.from_json(er.serialize())
import pdb; pdb.set_trace()
vgr2 = classes.Multipleobjects.from_json(vgr.serialize()) No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line at end of file
local variable 'vgr2' is assigned to but never used

Comment thread test/test_regression_156.py Outdated

# round-trip serialize-deserialize into class defined with `oneOf`
er2 = classes.Multipleobjects.from_json(er.serialize())
import pdb; pdb.set_trace()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple statements on one line (semicolon)

Comment thread test/test_regression_156.py Outdated
vgr2 = classes.VersionGetResponse.from_json(vgr.serialize())

# round-trip serialize-deserialize into class defined with `oneOf`
er2 = classes.Multipleobjects.from_json(er.serialize())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local variable 'er2' is assigned to but never used

Comment thread test/test_regression_156.py Outdated
@@ -0,0 +1,19 @@
import pytest
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'pytest' imported but unused

Comment thread test/test_regression_156.py Outdated

# round-trip serialize-deserialize into class defined with `oneOf`
classes.Multipleobjects.from_json(er.serialize())
classes.Multipleobjects.from_json(vgr.serialize()) No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line at end of file

This was a silly bug. Didn't explicitly call validate when resolving types in __new__
@cwacek cwacek force-pushed the feature/fix-156 branch from 54b86e0 to b2d7b7d Compare June 6, 2019 01:45
@cwacek cwacek merged commit 8b7a5dc into master Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oneOf example in README does not deserialize

2 participants