From 814dd4d2c20e7df678da30d2a079be9d96a3a5c9 Mon Sep 17 00:00:00 2001 From: justinbaer Date: Wed, 16 Apr 2025 08:53:28 +0200 Subject: [PATCH] version field added to yaml, requirements.txt updated, patchnotes_controller.py changed accordingly --- announcement_service_spec.yaml | 5 ++++ gen/.openapi-generator-ignore | 3 +- .../controllers/patchnotes_controller.py | 2 ++ gen/openapi_server/models/patch_notes.py | 30 ++++++++++++++++++- gen/openapi_server/openapi/openapi.yaml | 5 ++++ gen/requirements.txt | 23 +++++++------- 6 files changed, 54 insertions(+), 14 deletions(-) diff --git a/announcement_service_spec.yaml b/announcement_service_spec.yaml index 926cf52..b3e0525 100644 --- a/announcement_service_spec.yaml +++ b/announcement_service_spec.yaml @@ -96,6 +96,7 @@ components: patchID: 29e80bcc-5981-4a52-99e1-373442dea9b9 title: Patch note 1 changes: changes + version: 1.0.0 date: 2025-01-02 properties: patchID: @@ -108,6 +109,9 @@ components: changes: type: string title: changes + version: + type: string + title: version patch_date: title: patch_date type: string @@ -115,6 +119,7 @@ components: - "title" - "changes" - "patch_date" + - "version" user: example: lastSeenDate: 2025-01-02 diff --git a/gen/.openapi-generator-ignore b/gen/.openapi-generator-ignore index f6bf3f9..dbe31c3 100644 --- a/gen/.openapi-generator-ignore +++ b/gen/.openapi-generator-ignore @@ -24,4 +24,5 @@ # openapi_server/controllers/patchnotes_controller.py openapi_server/__main__.py openapi_server/encoder.py -openapi_server/models/base_model.py \ No newline at end of file +openapi_server/models/base_model.py +openapi_server/controllers/patchnotes_controller.py \ No newline at end of file diff --git a/gen/openapi_server/controllers/patchnotes_controller.py b/gen/openapi_server/controllers/patchnotes_controller.py index 7639e06..4426e48 100644 --- a/gen/openapi_server/controllers/patchnotes_controller.py +++ b/gen/openapi_server/controllers/patchnotes_controller.py @@ -97,6 +97,7 @@ def patchnotes_patch_idput(patch_id, body): # noqa: E501 { 'title': pn.title, 'changes': pn.changes, + 'version': pn.version, 'date': date_str } } @@ -142,6 +143,7 @@ def patchnotes_post(body): 'patchID': str(uuid.uuid4()), 'title': pn.title, 'changes': pn.changes, + 'version': pn.version, 'patch_date': date_str } diff --git a/gen/openapi_server/models/patch_notes.py b/gen/openapi_server/models/patch_notes.py index 27c0b90..58aeaab 100644 --- a/gen/openapi_server/models/patch_notes.py +++ b/gen/openapi_server/models/patch_notes.py @@ -12,7 +12,7 @@ class PatchNotes(Model): Do not edit the class manually. """ - def __init__(self, patch_id=None, title=None, changes=None, patch_date=None): # noqa: E501 + def __init__(self, patch_id=None, title=None, changes=None, version=None, patch_date=None): # noqa: E501 """PatchNotes - a model defined in OpenAPI :param patch_id: The patch_id of this PatchNotes. # noqa: E501 @@ -21,6 +21,8 @@ class PatchNotes(Model): :type title: str :param changes: The changes of this PatchNotes. # noqa: E501 :type changes: str + :param version: The version of this PatchNotes. # noqa: E501 + :type version: str :param patch_date: The patch_date of this PatchNotes. # noqa: E501 :type patch_date: str """ @@ -28,6 +30,7 @@ class PatchNotes(Model): 'patch_id': str, 'title': str, 'changes': str, + 'version': str, 'patch_date': str } @@ -35,12 +38,14 @@ class PatchNotes(Model): 'patch_id': 'patchID', 'title': 'title', 'changes': 'changes', + 'version': 'version', 'patch_date': 'patch_date' } self._patch_id = patch_id self._title = title self._changes = changes + self._version = version self._patch_date = patch_date @classmethod @@ -121,6 +126,29 @@ class PatchNotes(Model): self._changes = changes + @property + def version(self) -> str: + """Gets the version of this PatchNotes. + + + :return: The version of this PatchNotes. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version: str): + """Sets the version of this PatchNotes. + + + :param version: The version of this PatchNotes. + :type version: str + """ + if version is None: + raise ValueError("Invalid value for `version`, must not be `None`") # noqa: E501 + + self._version = version + @property def patch_date(self) -> str: """Gets the patch_date of this PatchNotes. diff --git a/gen/openapi_server/openapi/openapi.yaml b/gen/openapi_server/openapi/openapi.yaml index 603c092..1b58eaa 100644 --- a/gen/openapi_server/openapi/openapi.yaml +++ b/gen/openapi_server/openapi/openapi.yaml @@ -108,6 +108,7 @@ components: patchID: 29e80bcc-5981-4a52-99e1-373442dea9b9 title: Patch note 1 changes: changes + version: 1.0.0 date: 2025-01-02 properties: patchID: @@ -120,6 +121,9 @@ components: changes: title: changes type: string + version: + title: version + type: string patch_date: title: patch_date type: string @@ -127,6 +131,7 @@ components: - changes - patch_date - title + - version title: patch_notes user: example: diff --git a/gen/requirements.txt b/gen/requirements.txt index 2cb0689..964203c 100644 --- a/gen/requirements.txt +++ b/gen/requirements.txt @@ -1,13 +1,12 @@ -connexion[swagger-ui] >= 2.6.0; python_version>="3.6" -# 2.3 is the last version that supports python 3.4-3.5 -connexion[swagger-ui] <= 2.3.0; python_version=="3.5" or python_version=="3.4" -# prevent breaking dependencies from advent of connexion>=3.0 -connexion[swagger-ui] <= 2.14.2; python_version>"3.4" -# connexion requires werkzeug but connexion < 2.4.0 does not install werkzeug -# we must peg werkzeug versions below to fix connexion -# https://github.com/zalando/connexion/pull/1044 -werkzeug == 0.16.1; python_version=="3.5" or python_version=="3.4" -swagger-ui-bundle >= 0.0.2 -python_dateutil >= 2.6.0 +python_dateutil >= 2.5.3 setuptools >= 21.0.0 -Flask == 2.1.1 +urllib3 >= 2.2.2, < 2.3.0 +pydantic >= 2 +typing-extensions >= 4.7.1 +Flask >= 3.1.0 +Flask-PyMongo >= 3.0.1 +pymongo >= 4.11.3 +connexion[swagger-ui, flask] >= 3.2.0 +werkzeug == 3.1.3 +swagger-ui-bundle >= 0.0.2 +uvicorn >= 0.21.1 \ No newline at end of file