From eca868f10f18cc66c7f5befcb43c70c50f08e54e Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Fri, 22 Mar 2013 15:10:26 +0100 Subject: [PATCH] Fixed self documentation when querying documentation related to a specific resource (uri, uri-template, ..) Before it was showing only the first found so if we had "/foo" GET -> FOO_GET_HANDLER "/foo" POST -> FOO_POST_HANDLER It was showing only the first, now this is working as expected. --- .../wsf_router_self_documentation_message.e | 26 ++++++++++++--- .../wsf_self_documented_handler.e | 11 ++++++- library/server/wsf/router/wsf_router.e | 33 ++++++++++++++++++- 3 files changed, 64 insertions(+), 6 deletions(-) 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 1b1bd834..6aea58be 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 @@ -158,10 +158,18 @@ feature {WSF_RESPONSE} -- Output if doc_url_supported then l_description.append ("Index
") end - if attached router.item_associated_with_resource (l_api_resource, Void) as l_api_item then - l_description.append ("

Information related to " + l_api_resource + "

") + if + attached router.items_associated_with_resource (l_api_resource, Void) as l_api_items and then + not l_api_items.is_empty + then + l_description.append ("

Information related to " + l_api_resource + "

") + across + l_api_items as c + loop + l_description.append ("") + end end else l_description.append ("

Router