Commit e2780f95 authored by Siebers, Michael's avatar Siebers, Michael
Browse files

changed pldoc alias from '__API__' to '_API_'

parent 69ff6dd9
......@@ -3,24 +3,24 @@
The =web_api= module is the main module for the Reasoning WebAPI. It configures the web server, registers handlers for requests, and provides predicates to control the server.
The functionality is split between multiple files:
$ [web_api.pl](<pldoc/doc/__API__/web_api.pl?public_only=false>):
$ [web_api.pl](<pldoc/doc/_API_/web_api.pl?public_only=false>):
all handler registrations, initial handler predicates, and predicates controlling the server
$ web_api/ :
$ [api_response.pl](<pldoc/doc/__API__/web_api/api_response.pl?public_only=false>):
$ [api_response.pl](<pldoc/doc/_API_/web_api/api_response.pl?public_only=false>):
predicates for general responses
$ [background.pl](<pldoc/doc/__API__/web_api/background.pl?public_only=false>):
$ [background.pl](<pldoc/doc/_API_/web_api/background.pl?public_only=false>):
auxiliary predicates for background manipulation
$ [documentation.pl](<pldoc/doc/__API__/web_api/documentation.pl?public_only=false>):
$ [documentation.pl](<pldoc/doc/_API_/web_api/documentation.pl?public_only=false>):
predicates generating and formatting the documentation
$ [error_handling.pl](<pldoc/doc/__API__/web_api/error_handling.pl?public_only=false>):
$ [error_handling.pl](<pldoc/doc/_API_/web_api/error_handling.pl?public_only=false>):
exception rewriting, exception throwing, and exception message transformations
$ [helpers_basic.pl](<pldoc/doc/__API__/web_api/helpers_basic.pl?public_only=false>):
$ [helpers_basic.pl](<pldoc/doc/_API_/web_api/helpers_basic.pl?public_only=false>):
elementary helper predicates
$ [helpers_dcg.pl](<pldoc/doc/__API__/web_api/helpers_dcg.pl?public_only=false>):
$ [helpers_dcg.pl](<pldoc/doc/_API_/web_api/helpers_dcg.pl?public_only=false>):
elementary dcg rules generating lists of strings
$ [irrelevance.pl](<pldoc/doc/__API__/web_api/irrelevance.pl?public_only=false>):
$ [irrelevance.pl](<pldoc/doc/_API_/web_api/irrelevance.pl?public_only=false>):
auxiliary predicates for querying and explaining the irrelevance of files
$ [requests.pl](<pldoc/doc/__API__/web_api/requests.pl?public_only=false>):
$ [requests.pl](<pldoc/doc/_API_/web_api/requests.pl?public_only=false>):
auxiliary predicates parsing request bodies
The following sections describe basic techniques and predicates used while implementing the server architecture. Additionally, each section presents the predicates we defined to realize the described functionality.
......@@ -134,7 +134,7 @@ The following predicates form the interface between the API endpoints (`/irrelev
The Reasoning WebAPI serves its own documentation. This facility is partially provided by the [PLDoc](<pldoc/doc/_SWI_/library/pldoc.pl>) library, foundation of the SWI-Prolog source-code documentation infrastructure. This library collects structured source code comments and generates predicate descriptions, directory overviews, and module documentation on demand. The handlers registered by the pldoc library serves the documentation below `/doc/pldoc`. More information on PLDoc can be found in its [package documentation](<pldoc/doc_for?object=section('packages/pldoc.html')>).
* Reference manual: [/doc/pldoc/refman/](</doc/pldoc/refman/>)
* Packages: [/doc/pldoc/package/](</doc/pldoc/package>)
* WebAPI source directory: [/doc/pldoc/doc/__API__/](</doc/pldoc/doc/__API__/>)
* WebAPI source directory: [/doc/pldoc/doc/_API_/](</doc/pldoc/doc/_API_/>)
### File Search Paths and URL Aliases
......@@ -147,7 +147,7 @@ user:file_search_path(css, web_api_docs(css)).
The first alias defines `web_api_docs` to be the base `/doc` directory. This alias is only used by our own code (when delivering markup files). The second alias defines `web_api_docs(css)` to be an alternative for `css`. This is used within a PLDoc handler: Requests below `css` (=http:location=, aliased to `/doc/css` see above), are served from files in `css` (=file_search_path=).
Additionally, we defined `__API__` as alias for PLDoc for the directory the =web_api= library resides in (using doc_util:path_alias/2). Thus, [/doc/pldoc/doc/__API__/index.html](</doc/pldoc/doc/__API__/index.html>) renders an overview over the main files for the Reasoning WebAPI.
Additionally, we defined `_API_` as alias for PLDoc for the directory the =web_api= library resides in (using doc_util:path_alias/2). Thus, [/doc/pldoc/doc/_API_/index.html](</doc/pldoc/doc/_API_/index.html>) renders an overview over the main files for the Reasoning WebAPI.
### Turning Documentation On and Off
......
......@@ -75,6 +75,6 @@ The Dare2Del Demonstrator WebAPI component serves its own documentation. Unless
1. An [User Guide](http://localhost:4444/doc/user_guide.html)[^local]
1. A [detailed description of the API endpoints](http://localhost:4444/doc/api_endpoints.html)[^local]
1. An [Admin Guide](http://localhost:4444/doc/admin_guide.html)[^local]
1. A [file-by-file documentation of Prolog predicates](http://localhost:4444/doc/pldoc/doc/__API__/index.html)[^local]
1. A [file-by-file documentation of Prolog predicates](http://localhost:4444/doc/pldoc/doc/_API_/index.html)[^local]
---
......@@ -9,7 +9,7 @@
:- use_module(pldoc(doc_util)).
:- multifile doc_util:path_alias/2.
doc_util:path_alias('/__API__/', SourceDir) :-
doc_util:path_alias('/_API_/', SourceDir) :-
module_property(web_api, file(SourceFile)),
file_directory_name(SourceFile, SourceDir0),
pldoc_http:ensure_slash_end(SourceDir0, SourceDir).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment