version field added to yaml, requirements.txt updated, patchnotes_controller.py changed accordingly

This commit is contained in:
2025-04-16 08:53:28 +02:00
parent 33a2e33671
commit 814dd4d2c2
6 changed files with 54 additions and 14 deletions
@@ -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
}
+29 -1
View File
@@ -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.
+5
View File
@@ -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: