-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(yaml): V2D-1504 Failure in Deserializing Successful Response When Creating SeldonDeployment with SDK #65
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
diff --git a/python/docs/IntOrString.md b/python/docs/IntOrString.md | ||
index ef3be07..e4c51e9 100644 | ||
--- a/python/docs/IntOrString.md | ||
+++ b/python/docs/IntOrString.md | ||
@@ -3,9 +3,6 @@ | ||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
-**int_val** | **int** | | [optional] | ||
-**str_val** | **str** | | [optional] | ||
-**type** | [**Type**](Type.md) | | [optional] | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
||
diff --git a/python/seldon_deploy_sdk/models/int_or_string.py b/python/seldon_deploy_sdk/models/int_or_string.py | ||
index e9c49bc..182fadf 100644 | ||
--- a/python/seldon_deploy_sdk/models/int_or_string.py | ||
+++ b/python/seldon_deploy_sdk/models/int_or_string.py | ||
@@ -31,95 +31,15 @@ class IntOrString(object): | ||
and the value is json key in definition. | ||
""" | ||
swagger_types = { | ||
- 'int_val': 'int', | ||
- 'str_val': 'str', | ||
- 'type': 'Type' | ||
} | ||
|
||
attribute_map = { | ||
- 'int_val': 'IntVal', | ||
- 'str_val': 'StrVal', | ||
- 'type': 'Type' | ||
} | ||
|
||
- def __init__(self, int_val=None, str_val=None, type=None): # noqa: E501 | ||
+ def __init__(self): # noqa: E501 | ||
"""IntOrString - a model defined in Swagger""" # noqa: E501 | ||
- | ||
- self._int_val = None | ||
- self._str_val = None | ||
- self._type = None | ||
self.discriminator = None | ||
|
||
- if int_val is not None: | ||
- self.int_val = int_val | ||
- if str_val is not None: | ||
- self.str_val = str_val | ||
- if type is not None: | ||
- self.type = type | ||
- | ||
- @property | ||
- def int_val(self): | ||
- """Gets the int_val of this IntOrString. # noqa: E501 | ||
- | ||
- | ||
- :return: The int_val of this IntOrString. # noqa: E501 | ||
- :rtype: int | ||
- """ | ||
- return self._int_val | ||
- | ||
- @int_val.setter | ||
- def int_val(self, int_val): | ||
- """Sets the int_val of this IntOrString. | ||
- | ||
- | ||
- :param int_val: The int_val of this IntOrString. # noqa: E501 | ||
- :type: int | ||
- """ | ||
- | ||
- self._int_val = int_val | ||
- | ||
- @property | ||
- def str_val(self): | ||
- """Gets the str_val of this IntOrString. # noqa: E501 | ||
- | ||
- | ||
- :return: The str_val of this IntOrString. # noqa: E501 | ||
- :rtype: str | ||
- """ | ||
- return self._str_val | ||
- | ||
- @str_val.setter | ||
- def str_val(self, str_val): | ||
- """Sets the str_val of this IntOrString. | ||
- | ||
- | ||
- :param str_val: The str_val of this IntOrString. # noqa: E501 | ||
- :type: str | ||
- """ | ||
- | ||
- self._str_val = str_val | ||
- | ||
- @property | ||
- def type(self): | ||
- """Gets the type of this IntOrString. # noqa: E501 | ||
- | ||
- | ||
- :return: The type of this IntOrString. # noqa: E501 | ||
- :rtype: Type | ||
- """ | ||
- return self._type | ||
- | ||
- @type.setter | ||
- def type(self, type): | ||
- """Sets the type of this IntOrString. | ||
- | ||
- | ||
- :param type: The type of this IntOrString. # noqa: E501 | ||
- :type: Type | ||
- """ | ||
- | ||
- self._type = type | ||
- | ||
def to_dict(self): | ||
"""Returns the model properties as a dict""" | ||
result = {} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: I don't think this should be deleted, since elsewhere we still use the
IntOrString
type? [1][1]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a note for why this works:
in
__deserialize_model
(api_client.py
) there is this:which is now true (no
swagger_type
no more), so wereturn data
and thereby supply the intended base type (i.e. the int or string - which K8s expects).Tested with int and string examples.