diff options
author | fengyuanxing <feng.yuanxing@zte.com.cn> | 2018-01-25 13:10:53 +0800 |
---|---|---|
committer | fengyuanxing <feng.yuanxing@zte.com.cn> | 2018-01-25 13:14:19 +0800 |
commit | de19b9a3a77d77249b3a43b221a02d8f278a1119 (patch) | |
tree | 83161594bbe23bc3d59d07b38d52da12034f7fab | |
parent | aedda94ebf9c4b3d048be997c42dea943f2428d3 (diff) |
Modify the help text of swagger
Change-Id: I9bb7697b704efdf1e4f209a9d0295947d3d912c0
Issue-ID: VFC-677
Signed-off-by: fengyuanxing <feng.yuanxing@zte.com.cn>
-rw-r--r-- | catalog/serializers.py | 77 |
1 files changed, 44 insertions, 33 deletions
diff --git a/catalog/serializers.py b/catalog/serializers.py index 25cf7986..d7673e60 100644 --- a/catalog/serializers.py +++ b/catalog/serializers.py @@ -62,19 +62,22 @@ class NsPackageDistributeRequestSerializer(serializers.Serializer): class NsPackageInfoSerializer(serializers.Serializer): - nsdId = serializers.CharField(help_text="csarId", required=True) - nsPackageId = serializers.CharField(help_text="csarId", required=True) - nsdProvider = serializers.CharField(help_text="csarId", required=True) - nsdVersion = serializers.CharField(help_text="csarId", required=True) - csarName = serializers.CharField(help_text="csarId", required=True) - nsdModel = serializers.CharField(help_text="csarId", required=True) - downloadUrl = serializers.CharField(help_text="csarId", required=True) + nsdId = serializers.CharField(help_text="NSD ID", required=True) + nsPackageId = serializers.CharField( + help_text="NS Package ID", required=True) + nsdProvider = serializers.CharField( + help_text="NSD Provider", required=True) + nsdVersion = serializers.CharField(help_text="NSD Version", required=True) + csarName = serializers.CharField(help_text="CSAR name", required=True) + nsdModel = serializers.CharField(help_text="NSD Model", required=True) + downloadUrl = serializers.CharField( + help_text="URL to download NSD Model", required=True) class NsPackageSerializer(serializers.Serializer): - csarId = serializers.CharField(help_text="csarId", required=True) + csarId = serializers.CharField(help_text="CSAR ID", required=True) package_info = NsPackageInfoSerializer( - help_text="package_info", required=True) + help_text="NS Package Info", required=True) class NsPackagesSerializer(serializers.ListSerializer): @@ -82,40 +85,48 @@ class NsPackagesSerializer(serializers.ListSerializer): class NfPackageDistributeRequestSerializer(serializers.Serializer): - csar_id = serializers.CharField(help_text="csarId", required=True) + csar_id = serializers.CharField(help_text="CSAR ID", required=True) vim_ids = serializers.ListField( help_text="vim_ids", child=serializers.CharField(), required=False) - lab_vim_id = serializers.CharField(help_text="lab_vim_id", required=False) + lab_vim_id = serializers.CharField( + help_text="A list of VIM IDs.", required=False) class NfPackageInfoSerializer(serializers.Serializer): - vnfdId = serializers.CharField(required=True) - vnfPackageId = serializers.CharField(required=True) - vnfdProvider = serializers.CharField(required=True) - vnfdVersion = serializers.CharField(required=True) - vnfVersion = serializers.CharField(required=True) - csarName = serializers.CharField(required=True) - vnfdModel = serializers.CharField(required=True) - downloadUrl = serializers.CharField(required=True) + vnfdId = serializers.CharField(help_text="VNFD ID", required=True) + vnfPackageId = serializers.CharField( + help_text="VNF Package ID", required=True) + vnfdProvider = serializers.CharField( + help_text="VNFD Provider", required=True) + vnfdVersion = serializers.CharField( + help_text="VNFD Version", required=True) + vnfVersion = serializers.CharField(help_text="VNF Version", required=True) + csarName = serializers.CharField(help_text="CSAR Name", required=True) + vnfdModel = serializers.CharField(help_text="VNFD Model", required=True) + downloadUrl = serializers.CharField( + help_text="URL to download VNFD Model", required=True) class NfImageInfoSerializer(serializers.Serializer): - index = serializers.CharField(required=True) - fileName = serializers.CharField(required=True) - imageId = serializers.CharField(required=True) - vimId = serializers.CharField(required=True) - vimUser = serializers.CharField(required=True) - tenant = serializers.CharField(required=True) - status = serializers.CharField(required=True) + index = serializers.CharField( + help_text="Index of VNF Image", + required=True) + fileName = serializers.CharField( + help_text="Image file name", required=True) + imageId = serializers.CharField(help_text="Image ID", required=True) + vimId = serializers.CharField(help_text="VIM ID", required=True) + vimUser = serializers.CharField(help_text="User of VIM", required=True) + tenant = serializers.CharField(help_text="Tenant", required=True) + status = serializers.CharField(help_text="Status", required=True) class NfPackageSerializer(serializers.Serializer): - csarId = serializers.CharField(help_text="csarId", required=True) + csarId = serializers.CharField(help_text="CSAR ID", required=True) packageInfo = NfPackageInfoSerializer( - help_text="packageInfo", required=True) - imageInfo = NfImageInfoSerializer(help_text="imageInfo", required=False) + help_text="VNF Package Info", required=True) + imageInfo = NfImageInfoSerializer(help_text="Image Info", required=False) class NfPackagesSerializer(serializers.ListSerializer): @@ -127,8 +138,8 @@ class PostJobResponseSerializer(serializers.Serializer): class ParseModelRequestSerializer(serializers.Serializer): - csarId = serializers.CharField(help_text="csarId", required=True) - inputs = serializers.JSONField(help_text="inputs", required=False) + csarId = serializers.CharField(help_text="CSAR ID", required=True) + inputs = serializers.JSONField(help_text="Inputs", required=False) class EtsiNsdInfoModelSerializer(serializers.ModelSerializer): @@ -144,8 +155,8 @@ class EtsiVnfdInfoModelSerializer(serializers.ModelSerializer): class ParseNSPackageResponseSerializer(serializers.Serializer): - model = EtsiNsdInfoModelSerializer(help_text="model", required=True) + model = EtsiNsdInfoModelSerializer(help_text="NSD Model", required=True) class ParseNfPackageResponseSerializer(serializers.Serializer): - model = EtsiVnfdInfoModelSerializer(help_text="model", required=True) + model = EtsiVnfdInfoModelSerializer(help_text="VNFD Model", required=True) |