From 66ac29b3fc5cfdae85cd92b46fadde820cdd8148 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Fri, 23 Nov 2012 15:59:56 +0100 Subject: [PATCH] Updated signatures for the self documentated message --- .../wsf_router_self_documentation_handler.e | 4 ++-- .../wsf_router_self_documentation_message.e | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/library/server/wsf/router/documentation/wsf_router_self_documentation_handler.e b/library/server/wsf/router/documentation/wsf_router_self_documentation_handler.e index 3d9c844f..427037f0 100644 --- a/library/server/wsf/router/documentation/wsf_router_self_documentation_handler.e +++ b/library/server/wsf/router/documentation/wsf_router_self_documentation_handler.e @@ -48,9 +48,9 @@ feature -- Execution m: WSF_ROUTER_SELF_DOCUMENTATION_MESSAGE do if attached resource as l_resource then - create m.make (req, router, l_resource) + create m.make_with_resource (req, router, l_resource) else - create m.make (req, router, Void) + create m.make (req, router) end res.send (m) end diff --git a/library/server/wsf/router/documentation/wsf_router_self_documentation_message.e b/library/server/wsf/router/documentation/wsf_router_self_documentation_message.e index 61eadc26..d179fd78 100644 --- a/library/server/wsf/router/documentation/wsf_router_self_documentation_message.e +++ b/library/server/wsf/router/documentation/wsf_router_self_documentation_message.e @@ -13,14 +13,24 @@ inherit WSF_RESPONSE_MESSAGE create - make + make, + make_with_resource feature {NONE} -- Initialization - make (req: WSF_REQUEST; a_router: WSF_ROUTER; a_resource: detachable STRING) + make (req: WSF_REQUEST; a_router: WSF_ROUTER) + -- Make Current for request `req' and router `a_router' do request := req router := a_router + end + + make_with_resource (req: WSF_REQUEST; a_router: WSF_ROUTER; a_resource: STRING) + -- Make Current for request `req' and router `a_router' + -- and use `a_resource' to also generate links to this documentation via `a_resource' + --| note: it could be "/doc" or "/api/doc" or ... + do + make (req, a_router) if a_resource /= Void and then attached a_router.base_url as l_base_url then resource := l_base_url + a_resource end