Updated signatures for the self documentated message
This commit is contained in:
@@ -48,9 +48,9 @@ feature -- Execution
|
|||||||
m: WSF_ROUTER_SELF_DOCUMENTATION_MESSAGE
|
m: WSF_ROUTER_SELF_DOCUMENTATION_MESSAGE
|
||||||
do
|
do
|
||||||
if attached resource as l_resource then
|
if attached resource as l_resource then
|
||||||
create m.make (req, router, l_resource)
|
create m.make_with_resource (req, router, l_resource)
|
||||||
else
|
else
|
||||||
create m.make (req, router, Void)
|
create m.make (req, router)
|
||||||
end
|
end
|
||||||
res.send (m)
|
res.send (m)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,14 +13,24 @@ inherit
|
|||||||
WSF_RESPONSE_MESSAGE
|
WSF_RESPONSE_MESSAGE
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make,
|
||||||
|
make_with_resource
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
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
|
do
|
||||||
request := req
|
request := req
|
||||||
router := a_router
|
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
|
if a_resource /= Void and then attached a_router.base_url as l_base_url then
|
||||||
resource := l_base_url + a_resource
|
resource := l_base_url + a_resource
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user