From af50eeb83a79412e7e3ef79667f72ce5a6b0dd6c Mon Sep 17 00:00:00 2001 From: rohitsakala Date: Tue, 3 Jan 2017 22:38:38 +0530 Subject: Update nicknames in swagger spec Swagger codegen uses nicknames for defining titles in the api documentation. Link - https://github.com/OAI/OpenAPI-Specification/blob/master/versions/1.2.md Change-Id: Ia35718b77dfcac53317384c4445225f28e505919 Signed-off-by: rohitsakala --- testapi/opnfv_testapi/resources/handlers.py | 2 +- testapi/opnfv_testapi/resources/pod_handlers.py | 6 +++--- testapi/opnfv_testapi/resources/project_handlers.py | 10 +++++----- testapi/opnfv_testapi/resources/result_handlers.py | 8 ++++---- testapi/opnfv_testapi/resources/testcase_handlers.py | 10 +++++----- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/testapi/opnfv_testapi/resources/handlers.py b/testapi/opnfv_testapi/resources/handlers.py index 5059f5d..f1ad15e 100644 --- a/testapi/opnfv_testapi/resources/handlers.py +++ b/testapi/opnfv_testapi/resources/handlers.py @@ -227,7 +227,7 @@ class GenericApiHandler(RequestHandler): class VersionHandler(GenericApiHandler): - @swagger.operation(nickname='list') + @swagger.operation(nickname='List all versions') def get(self): """ @description: list all supported versions diff --git a/testapi/opnfv_testapi/resources/pod_handlers.py b/testapi/opnfv_testapi/resources/pod_handlers.py index 8f44439..631d4a9 100644 --- a/testapi/opnfv_testapi/resources/pod_handlers.py +++ b/testapi/opnfv_testapi/resources/pod_handlers.py @@ -20,7 +20,7 @@ class GenericPodHandler(GenericApiHandler): class PodCLHandler(GenericPodHandler): - @swagger.operation(nickname='list-all') + @swagger.operation(nickname='List all Pods') def get(self): """ @description: list all pods @@ -29,7 +29,7 @@ class PodCLHandler(GenericPodHandler): """ self._list() - @swagger.operation(nickname='create') + @swagger.operation(nickname='Create a Pod') def post(self): """ @description: create a pod @@ -54,7 +54,7 @@ class PodCLHandler(GenericPodHandler): class PodGURHandler(GenericPodHandler): - @swagger.operation(nickname='get-one') + @swagger.operation(nickname='Get a Pod by pod_name') def get(self, pod_name): """ @description: get a single pod by pod_name diff --git a/testapi/opnfv_testapi/resources/project_handlers.py b/testapi/opnfv_testapi/resources/project_handlers.py index 1e9a972..9cf6986 100644 --- a/testapi/opnfv_testapi/resources/project_handlers.py +++ b/testapi/opnfv_testapi/resources/project_handlers.py @@ -22,7 +22,7 @@ class GenericProjectHandler(GenericApiHandler): class ProjectCLHandler(GenericProjectHandler): - @swagger.operation(nickname="list-all") + @swagger.operation(nickname="List all Projects") def get(self): """ @description: list all projects @@ -31,7 +31,7 @@ class ProjectCLHandler(GenericProjectHandler): """ self._list() - @swagger.operation(nickname="create") + @swagger.operation(nickname="Create a Project") def post(self): """ @description: create a project @@ -56,7 +56,7 @@ class ProjectCLHandler(GenericProjectHandler): class ProjectGURHandler(GenericProjectHandler): - @swagger.operation(nickname='get-one') + @swagger.operation(nickname='Get a Project by project_name') def get(self, project_name): """ @description: get a single project by project_name @@ -66,7 +66,7 @@ class ProjectGURHandler(GenericProjectHandler): """ self._get_one({'name': project_name}) - @swagger.operation(nickname="update") + @swagger.operation(nickname="Update a Project by project_name") def put(self, project_name): """ @description: update a single project by project_name @@ -82,7 +82,7 @@ class ProjectGURHandler(GenericProjectHandler): db_keys = ['name'] self._update(query, db_keys) - @swagger.operation(nickname='delete') + @swagger.operation(nickname='Delete a Project by project_name') def delete(self, project_name): """ @description: delete a project by project_name diff --git a/testapi/opnfv_testapi/resources/result_handlers.py b/testapi/opnfv_testapi/resources/result_handlers.py index 400b84a..fe13c09 100644 --- a/testapi/opnfv_testapi/resources/result_handlers.py +++ b/testapi/opnfv_testapi/resources/result_handlers.py @@ -52,7 +52,7 @@ class GenericResultHandler(GenericApiHandler): class ResultsCLHandler(GenericResultHandler): - @swagger.operation(nickname="list-all") + @swagger.operation(nickname="List all Test Results") def get(self): """ @description: Retrieve result(s) for a test project @@ -127,7 +127,7 @@ class ResultsCLHandler(GenericResultHandler): self._list(self.set_query(), sort=[('start_date', -1)], last=last) - @swagger.operation(nickname="create") + @swagger.operation(nickname="Create a Test Result") def post(self): """ @description: create a test result @@ -169,7 +169,7 @@ class ResultsCLHandler(GenericResultHandler): class ResultsGURHandler(GenericResultHandler): - @swagger.operation(nickname='get-one') + @swagger.operation(nickname='Get a Test Result by result_id') def get(self, result_id): """ @description: get a single result by result_id @@ -181,7 +181,7 @@ class ResultsGURHandler(GenericResultHandler): query["_id"] = ObjectId(result_id) self._get_one(query) - @swagger.operation(nickname="update") + @swagger.operation(nickname="Update a Test Result by result_id") def put(self, result_id): """ @description: update a single result by _id diff --git a/testapi/opnfv_testapi/resources/testcase_handlers.py b/testapi/opnfv_testapi/resources/testcase_handlers.py index 253aa66..3692b16 100644 --- a/testapi/opnfv_testapi/resources/testcase_handlers.py +++ b/testapi/opnfv_testapi/resources/testcase_handlers.py @@ -22,7 +22,7 @@ class GenericTestcaseHandler(GenericApiHandler): class TestcaseCLHandler(GenericTestcaseHandler): - @swagger.operation(nickname="list-all") + @swagger.operation(nickname="List all TestCases by project_name") def get(self, project_name): """ @description: list all testcases of a project by project_name @@ -34,7 +34,7 @@ class TestcaseCLHandler(GenericTestcaseHandler): query['project_name'] = project_name self._list(query) - @swagger.operation(nickname="create") + @swagger.operation(nickname="Create a TestCase by project_name") def post(self, project_name): """ @description: create a testcase of a project by project_name @@ -72,7 +72,7 @@ class TestcaseCLHandler(GenericTestcaseHandler): class TestcaseGURHandler(GenericTestcaseHandler): - @swagger.operation(nickname='get-one') + @swagger.operation(nickname='Get a TestCase by project and case name') def get(self, project_name, case_name): """ @description: get a single testcase @@ -86,7 +86,7 @@ class TestcaseGURHandler(GenericTestcaseHandler): query["name"] = case_name self._get_one(query) - @swagger.operation(nickname="update") + @swagger.operation(nickname="Update a TestCase by project and case name") def put(self, project_name, case_name): """ @description: update a single testcase @@ -104,7 +104,7 @@ class TestcaseGURHandler(GenericTestcaseHandler): db_keys = ['name', 'project_name'] self._update(query, db_keys) - @swagger.operation(nickname='delete') + @swagger.operation(nickname='Delete a TestCase by project and case name') def delete(self, project_name, case_name): """ @description: delete a testcase by project_name and case_name -- cgit 1.2.3-korg