From 78237e9fb65bb4ef6e328397efd9baa4d2284d8d Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 20 Jan 2015 15:31:27 +0100 Subject: [PATCH] Bold parameter in documentation in order to improve readability --- docs/api/examples/post_project.txt | 8 ++++---- docs/api/vpcsuuidportsportidnio.rst | 8 ++++---- docs/api/vpcsuuidstart.rst | 2 +- docs/api/vpcsuuidstop.rst | 2 +- gns3server/web/documentation.py | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/api/examples/post_project.txt b/docs/api/examples/post_project.txt index 8054c97f..0f030d15 100644 --- a/docs/api/examples/post_project.txt +++ b/docs/api/examples/post_project.txt @@ -1,8 +1,8 @@ -curl -i -X POST 'http://localhost:8000/project' -d '{"location": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-328/test_create_project_with_dir0"}' +curl -i -X POST 'http://localhost:8000/project' -d '{"location": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-330/test_create_project_with_dir0"}' POST /project HTTP/1.1 { - "location": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-328/test_create_project_with_dir0" + "location": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-330/test_create_project_with_dir0" } @@ -15,6 +15,6 @@ SERVER: Python/3.4 aiohttp/0.13.1 X-ROUTE: /project { - "location": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-328/test_create_project_with_dir0", - "uuid": "b4432fe3-6743-4ce7-ab05-1f5637d04cd6" + "location": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-330/test_create_project_with_dir0", + "uuid": "e7d2911f-e367-46d9-b426-25663d0bb601" } diff --git a/docs/api/vpcsuuidportsportidnio.rst b/docs/api/vpcsuuidportsportidnio.rst index 03f2deaf..ef1c7278 100644 --- a/docs/api/vpcsuuidportsportidnio.rst +++ b/docs/api/vpcsuuidportsportidnio.rst @@ -3,14 +3,14 @@ .. contents:: -POST /vpcs/{uuid}/ports/{port_id}/nio +POST /vpcs/**{uuid}**/ports/**{port_id}**/nio ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a NIO to a VPCS Parameters ********** -- **port_id**: Id of the port where the nio should be add - **uuid**: VPCS instance UUID +- **port_id**: Id of the port where the nio should be add Response status codes ********************** @@ -25,14 +25,14 @@ Sample session .. literalinclude:: examples/post_vpcsuuidportsportidnio.txt -DELETE /vpcs/{uuid}/ports/{port_id}/nio +DELETE /vpcs/**{uuid}**/ports/**{port_id}**/nio ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove a NIO from a VPCS Parameters ********** -- **port_id**: ID of the port where the nio should be removed - **uuid**: VPCS instance UUID +- **port_id**: ID of the port where the nio should be removed Response status codes ********************** diff --git a/docs/api/vpcsuuidstart.rst b/docs/api/vpcsuuidstart.rst index a55d296b..bcf1f8ea 100644 --- a/docs/api/vpcsuuidstart.rst +++ b/docs/api/vpcsuuidstart.rst @@ -3,7 +3,7 @@ .. contents:: -POST /vpcs/{uuid}/start +POST /vpcs/**{uuid}**/start ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a VPCS instance diff --git a/docs/api/vpcsuuidstop.rst b/docs/api/vpcsuuidstop.rst index ceff8f62..16702e07 100644 --- a/docs/api/vpcsuuidstop.rst +++ b/docs/api/vpcsuuidstop.rst @@ -3,7 +3,7 @@ .. contents:: -POST /vpcs/{uuid}/stop +POST /vpcs/**{uuid}**/stop ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a VPCS instance diff --git a/gns3server/web/documentation.py b/gns3server/web/documentation.py index 2c165f8b..35aee835 100644 --- a/gns3server/web/documentation.py +++ b/gns3server/web/documentation.py @@ -37,7 +37,7 @@ class Documentation(object): f.write('{}\n---------------------------------------------\n\n'.format(path)) f.write('.. contents::\n') for method in handler_doc["methods"]: - f.write('\n{} {}\n'.format(method["method"], path)) + f.write('\n{} {}\n'.format(method["method"], path.replace("{", '**{').replace("}", "}**"))) f.write('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n') f.write('{}\n\n'.format(method["description"]))