diff --git a/python-flask-server/swagger_server/controllers/default_controller.py b/python-flask-server/swagger_server/controllers/default_controller.py index 9939484a1eaa03789927daecc440ce7276428b1e..974f2c980847d1cb63ce99d4e32b88084a65fb35 100644 --- a/python-flask-server/swagger_server/controllers/default_controller.py +++ b/python-flask-server/swagger_server/controllers/default_controller.py @@ -13,7 +13,10 @@ def phenotypes_get(): :rtype: List[Phenotype] """ - return 'do some magic!' + phenotypes = [] + phenotypes.append(Phenotype(id="z_GIANT_BMI", cohort="GIANT", phenotype="BMI", ref="10.1038/ng.686")) + phenotypes.append(Phenotype(id="z_GIANT_HEIGHT", cohort="GIANT", phenotype="BMI", ref="10.1038/ng.3097")) + return phenotypes def projects_get(): diff --git a/python-flask-server/swagger_server/models/phenotype.py b/python-flask-server/swagger_server/models/phenotype.py index ab8b18118d8f755e8c9cdc8180ebe8331b250050..c059bc4310d79cfd3f64bdbcb9a0341152f42174 100644 --- a/python-flask-server/swagger_server/models/phenotype.py +++ b/python-flask-server/swagger_server/models/phenotype.py @@ -12,27 +12,37 @@ class Phenotype(Model): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, id: str=None, label: str=None): + def __init__(self, id: str=None, cohort: str=None, phenotype: str=None, ref: str=None): """ Phenotype - a model defined in Swagger - :param id: The id of this Phenotype. + :param id: dataset ID. :type id: str - :param label: The label of this Phenotype. - :type label: str + :param cohort: dataset cohort. + :type cohort: str + :param phenotype: dataset phenotype + :type phenotype: str + :param ref: dataset bibliographic reference + :type ref: str """ self.swagger_types = { 'id': str, - 'label': str + 'cohort': str, + 'phenotype': str, + 'ref': str } self.attribute_map = { 'id': 'id', - 'label': 'label' + 'cohort': 'cohort', + 'phenotype': 'phenotype', + 'ref': 'ref' } self._id = id - self._label = label + self._cohort = cohort + self._phenotype = phenotype + self._ref = ref @classmethod def from_dict(cls, dikt) -> 'Phenotype': @@ -68,23 +78,64 @@ class Phenotype(Model): self._id = id @property - def label(self) -> str: + def cohort(self) -> str: + """ + Gets the cohort of this Phenotype dataset. + + :return: The cohort of this Phenotype dataset. + :rtype: str + """ + return self._cohort + + @cohort.setter + def cohort(self, cohort: str): + """ + Sets the cohort of this Phenotype dataset. + + :param cohort: The cohort of this Phenotype dataset. + :type cohort: str + """ + + self._cohort = cohort + + @property + def phenotype(self) -> str: """ - Gets the label of this Phenotype. + Gets the phenotype of this Phenotype dataset. - :return: The label of this Phenotype. + :return: The phenotype of this Phenotype dataset. :rtype: str """ - return self._label + return self._phenotype + + @phenotype.setter + def phenotype(self, phenotype: str): + """ + Sets the phenotype of this Phenotype dataset. - @label.setter - def label(self, label: str): + :param phenotype: The phenotype of this Phenotype dataset. + :type phenotype: str """ - Sets the label of this Phenotype. - :param label: The label of this Phenotype. - :type label: str + self._phenotype = phenotype + + @property + def ref(self) -> str: """ + Gets the bibliographic reference for this Phenotype dataset. - self._label = label + :return: The bibliographic reference of this Phenotype dataset. + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref: str): + """ + Sets the bibliographic reference of this Phenotype dataset. + + :param ref: The bibliographic reference of this Phenotype dataset. + :type ref: str + """ + self._ref = ref diff --git a/python-flask-server/swagger_server/swagger/swagger.yaml b/python-flask-server/swagger_server/swagger/swagger.yaml index 91eb9a0411aa67eb76d267a5d84b3662fcaec032..abcc213b957dea48b52f366662bb9172a5488166 100644 --- a/python-flask-server/swagger_server/swagger/swagger.yaml +++ b/python-flask-server/swagger_server/swagger/swagger.yaml @@ -134,5 +134,9 @@ definitions: properties: id: type: "string" - label: + cohort: + type: "string" + phenotype: + type: "string" + ref: type: "string"