diff --git a/library/server/wsf/router/documentation/wsf_router_mapping_documentation.e b/library/server/wsf/router/documentation/wsf_router_mapping_documentation.e
new file mode 100644
index 00000000..ea334357
--- /dev/null
+++ b/library/server/wsf/router/documentation/wsf_router_mapping_documentation.e
@@ -0,0 +1,52 @@
+note
+ description: "Summary description for {WSF_ROUTER_MAPPING_DOCUMENTATION}."
+ date: "$Date$"
+ revision: "$Revision$"
+
+class
+ WSF_ROUTER_MAPPING_DOCUMENTATION
+
+create
+ make
+
+feature {NONE} -- Initialization
+
+ make (m: like mapping)
+ do
+ mapping := m
+ create {STRING_32} description.make_empty
+ end
+
+feature -- Status report
+
+ is_hidden: BOOLEAN
+ -- Hide this mapping from any self documentation?
+ -- Default=False
+
+ is_empty: BOOLEAN
+ -- Is Current empty?
+ -- i.e: does not carry any information.
+ do
+ Result := description.is_empty
+ end
+
+feature -- Access
+
+ mapping: WSF_ROUTER_MAPPING
+ -- Associated mapping
+
+ description: STRING_32
+
+feature -- Change
+
+ set_is_hidden (b: BOOLEAN)
+ do
+ is_hidden := b
+ end
+
+ add_description (d: READABLE_STRING_GENERAL)
+ do
+ description.append_string_general (d)
+ end
+
+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 cc2e5d7f..051446a9 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
@@ -21,6 +21,7 @@ feature {NONE} -- Initialization
make (req: WSF_REQUEST; a_router: WSF_ROUTER)
-- Make Current for request `req' and router `a_router'
do
+ status_code := {HTTP_STATUS_CODE}.ok
request := req
router := a_router
end
@@ -31,13 +32,21 @@ feature {NONE} -- Initialization
--| 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
+ if a_resource /= Void then
+ if attached a_router.base_url as l_base_url then
+ resource := l_base_url + a_resource
+ else
+ resource := a_resource
+ end
end
end
feature -- Access
+ status_code: INTEGER
+ -- Associated status code
+ -- Default is Ok
+
request: WSF_REQUEST
router: WSF_ROUTER
@@ -57,6 +66,13 @@ feature -- Properties
feature -- Change
+ set_status_code (c: like status_code)
+ require
+ c_positive_or_zero: c >= 0
+ do
+ status_code := c
+ end
+
set_header (v: like header)
do
header := v
@@ -97,8 +113,10 @@ feature {WSF_RESPONSE} -- Output
l_description.append ("[
]")
@@ -141,12 +159,12 @@ feature {WSF_RESPONSE} -- Output
l_description.append ("Index
")
end
if attached router.item_associated_with_resource (l_api_resource, Void) as l_api_item then
- l_description.append ("
" + l_api_resource + "