From 02daeaf2652383985bc4d31170d8180f58ce1b18 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 18 Sep 2019 23:37:17 -0700 Subject: python codegen with new openapi-generator tool --- .../fatcat_openapi_client/models/entity_edit.py | 45 +++++++++++----------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'python_openapi_client/fatcat_openapi_client/models/entity_edit.py') diff --git a/python_openapi_client/fatcat_openapi_client/models/entity_edit.py b/python_openapi_client/fatcat_openapi_client/models/entity_edit.py index 7b28ae70..be35815f 100644 --- a/python_openapi_client/fatcat_openapi_client/models/entity_edit.py +++ b/python_openapi_client/fatcat_openapi_client/models/entity_edit.py @@ -5,9 +5,9 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - OpenAPI spec version: 0.3.1 + The version of the OpenAPI document: 0.3.1 Contact: webservices@archive.org - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,26 +18,27 @@ import six class EntityEdit(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'edit_id': 'str', 'ident': 'str', 'revision': 'str', 'prev_revision': 'str', 'redirect_ident': 'str', 'editgroup_id': 'str', - 'extra': 'object' + 'extra': 'dict(str, object)' } attribute_map = { @@ -51,7 +52,7 @@ class EntityEdit(object): } def __init__(self, edit_id=None, ident=None, revision=None, prev_revision=None, redirect_ident=None, editgroup_id=None, extra=None): # noqa: E501 - """EntityEdit - a model defined in Swagger""" # noqa: E501 + """EntityEdit - a model defined in OpenAPI""" # noqa: E501 self._edit_id = None self._ident = None @@ -100,8 +101,8 @@ class EntityEdit(object): raise ValueError("Invalid value for `edit_id`, length must be less than or equal to `36`") # noqa: E501 if edit_id is not None and len(edit_id) < 36: raise ValueError("Invalid value for `edit_id`, length must be greater than or equal to `36`") # noqa: E501 - if edit_id is not None and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', edit_id): # noqa: E501 - raise ValueError("Invalid value for `edit_id`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 + if edit_id is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', edit_id): # noqa: E501 + raise ValueError(r"Invalid value for `edit_id`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 self._edit_id = edit_id @@ -131,8 +132,8 @@ class EntityEdit(object): raise ValueError("Invalid value for `ident`, length must be less than or equal to `26`") # noqa: E501 if ident is not None and len(ident) < 26: raise ValueError("Invalid value for `ident`, length must be greater than or equal to `26`") # noqa: E501 - if ident is not None and not re.search('[a-zA-Z2-7]{26}', ident): # noqa: E501 - raise ValueError("Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 + if ident is not None and not re.search(r'[a-zA-Z2-7]{26}', ident): # noqa: E501 + raise ValueError(r"Invalid value for `ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 self._ident = ident @@ -160,8 +161,8 @@ class EntityEdit(object): raise ValueError("Invalid value for `revision`, length must be less than or equal to `36`") # noqa: E501 if revision is not None and len(revision) < 36: raise ValueError("Invalid value for `revision`, length must be greater than or equal to `36`") # noqa: E501 - if revision is not None and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 - raise ValueError("Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 + if revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', revision): # noqa: E501 + raise ValueError(r"Invalid value for `revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 self._revision = revision @@ -189,8 +190,8 @@ class EntityEdit(object): raise ValueError("Invalid value for `prev_revision`, length must be less than or equal to `36`") # noqa: E501 if prev_revision is not None and len(prev_revision) < 36: raise ValueError("Invalid value for `prev_revision`, length must be greater than or equal to `36`") # noqa: E501 - if prev_revision is not None and not re.search('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', prev_revision): # noqa: E501 - raise ValueError("Invalid value for `prev_revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 + if prev_revision is not None and not re.search(r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', prev_revision): # noqa: E501 + raise ValueError(r"Invalid value for `prev_revision`, must be a follow pattern or equal to `/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/`") # noqa: E501 self._prev_revision = prev_revision @@ -218,8 +219,8 @@ class EntityEdit(object): raise ValueError("Invalid value for `redirect_ident`, length must be less than or equal to `26`") # noqa: E501 if redirect_ident is not None and len(redirect_ident) < 26: raise ValueError("Invalid value for `redirect_ident`, length must be greater than or equal to `26`") # noqa: E501 - if redirect_ident is not None and not re.search('[a-zA-Z2-7]{26}', redirect_ident): # noqa: E501 - raise ValueError("Invalid value for `redirect_ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 + if redirect_ident is not None and not re.search(r'[a-zA-Z2-7]{26}', redirect_ident): # noqa: E501 + raise ValueError(r"Invalid value for `redirect_ident`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 self._redirect_ident = redirect_ident @@ -249,8 +250,8 @@ class EntityEdit(object): raise ValueError("Invalid value for `editgroup_id`, length must be less than or equal to `26`") # noqa: E501 if editgroup_id is not None and len(editgroup_id) < 26: raise ValueError("Invalid value for `editgroup_id`, length must be greater than or equal to `26`") # noqa: E501 - if editgroup_id is not None and not re.search('[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501 - raise ValueError("Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 + if editgroup_id is not None and not re.search(r'[a-zA-Z2-7]{26}', editgroup_id): # noqa: E501 + raise ValueError(r"Invalid value for `editgroup_id`, must be a follow pattern or equal to `/[a-zA-Z2-7]{26}/`") # noqa: E501 self._editgroup_id = editgroup_id @@ -260,7 +261,7 @@ class EntityEdit(object): :return: The extra of this EntityEdit. # noqa: E501 - :rtype: object + :rtype: dict(str, object) """ return self._extra @@ -270,7 +271,7 @@ class EntityEdit(object): :param extra: The extra of this EntityEdit. # noqa: E501 - :type: object + :type: dict(str, object) """ self._extra = extra @@ -279,7 +280,7 @@ class EntityEdit(object): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( -- cgit v1.2.3