diff --git a/draft/library/server/request/rest/src/contrib/doc/rest_api_documentation.e b/draft/library/server/request/rest/src/contrib/doc/rest_api_documentation.e deleted file mode 100644 index 285683f9..00000000 --- a/draft/library/server/request/rest/src/contrib/doc/rest_api_documentation.e +++ /dev/null @@ -1,327 +0,0 @@ -note - description: "Summary description for {REST_API_DOCUMENTATION}." - author: "" - date: "$Date$" - revision: "$Revision$" - -class - REST_API_DOCUMENTATION [C -> REST_REQUEST_HANDLER_CONTEXT] - -inherit - REST_REQUEST_HANDLER [C] - -create - make - -feature {NONE} -- Initialization - - make (a_router: like router; a_base_doc_url: like base_doc_url) - do - router := a_router - base_doc_url := a_base_doc_url - description := "Technical documention for the API" - end - -feature {NONE} -- Access: Implementation - - router: REST_REQUEST_ROUTER [REST_REQUEST_HANDLER [C], C] - - base_doc_url: READABLE_STRING_8 - -feature -- Access - - authentication_required (req: WSF_REQUEST): BOOLEAN - do - end - - resource_value (ctx: C): detachable READABLE_STRING_32 - do - if attached {WSF_STRING} ctx.item ("resource") as s then - Result := s.value - end - end - -feature -- Execution - - execute_application (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE) - local - rep: like new_html_page - s: STRING - rq: detachable REST_REQUEST_HANDLER [C] - rq_resource: detachable READABLE_STRING_GENERAL --- l_dft_format_name: detachable STRING - hdl_cursor: like router.new_cursor - do - rep := new_html_page - rep.headers.put_content_type_text_html - create s.make_empty - - if - attached resource_value (ctx) as l_resource - then - from - hdl_cursor := router.new_cursor - until - hdl_cursor.after or rq /= Void - loop - if hdl_cursor.item.resource.same_string_general (l_resource) then - rq := hdl_cursor.item.handler - rq_resource := l_resource - end - hdl_cursor.forth - end - end --- if a_args /= Void and then not a_args.is_empty then --- rq := router.handler_by_path (a_args) --- if rq = Void then --- rq := handler_manager.smart_handler_by_path (a_args) ----- if attached {REST_REQUEST_GROUP_HANDLER} rq as grp then ----- rq := grp.handlers.handler_by_path (a_args) ----- end --- end --- if --- rq /= Void and then --- attached rq.path_information (a_args) as l_info --- then --- l_dft_format_name := l_info.format --- end --- end - - - if rq /= Void and then rq_resource /= Void then - rep.set_big_title ("API: Technical documentation for ["+ rq_resource.as_string_8 +"]") - - s.append_string ("