1
0
Fork 0

An Ode to Doxygen

This commit is contained in:
Lucas Dohmen 2013-08-27 14:16:54 +02:00
parent 8418235769
commit 142405c070
2 changed files with 104 additions and 1 deletions

View File

@ -112,18 +112,29 @@ Details on FoxxApplication{#UserManualFoxxDetailsApplication}
HTTP Methods
------------
### Get
@copydetails JSF_foxx_application_get
### Head
@copydetails JSF_foxx_application_head
### Post
@copydetails JSF_foxx_application_post
### Put
@copydetails JSF_foxx_application_put
### Patch
@copydetails JSF_foxx_application_patch
@copydetails JSF_foxx_application_delete
### Delete
@copydetails JSF_foxx_application_delete
Documenting and Constraining the Routes
---------------------------------------
@ -148,10 +159,16 @@ view of the route documentation. With the provided information, Foxx will
generate a nice documentation for you. Furthermore you can describe your
API by chaining the following methods onto your path definition:
### Path Param
@copydetails JSF_foxx_RequestContext_pathParam
### Query Param
@copydetails JSF_foxx_RequestContext_queryParam
### Error Response
@copydetails JSF_foxx_RequestContext_errorResponse
@ -163,8 +180,12 @@ after the normal routing process is happening. You could use that for logging
or to manipulate the request or response (translate it to a certain format for
example).
### Before
@copydetails JSF_foxx_application_before
### After
@copydetails JSF_foxx_application_after
@ -187,10 +208,16 @@ The Request Object
Every request object has the `path` method from the underlying Actions.
This is the complete path as supplied by the user as a String.
### Body
@copydetails JSF_foxx_BaseMiddleware_request_body
### Raw Body
@copydetails JSF_foxx_BaseMiddleware_request_rawBody
### Params
@copydetails JSF_foxx_BaseMiddleware_request_params
@ -202,10 +229,16 @@ to set the raw body by hand.
You provide your response body as a String here.
### Status
@copydetails JSF_foxx_BaseMiddleware_response_status
### Set
@copydetails JSF_foxx_BaseMiddleware_response_set
### JSON
@copydetails JSF_foxx_BaseMiddleware_response_json
@ -226,20 +259,36 @@ your model file, export the model as `model`.
A Foxx Model can be initialized with an object of attributes and their values.
### Extend
@copydetails JSF_foxx_model_extend
### Initialize
@copydetails JSF_foxx_model_initializer
### Get
@copydetails JSF_foxx_model_get
### Set
@copydetails JSF_foxx_model_set
### Has
@copydetails JSF_foxx_model_has
### Attributes
@copydetails JSF_foxx_model_attributes
### forDB
@copydetails JSF_foxx_model_forDB
### forClient
@copydetails JSF_foxx_model_forClient
@ -258,30 +307,56 @@ In your repository file, export the repository as `repository`.
exports.repository = TodosRepository;
### Initialize
@copydetails JSF_foxx_repository_initializer
### Collection
@copydetails JSF_foxx_repository_collection
### Prefix
@copydetails JSF_foxx_repository_prefix
### ModelPrototype
@copydetails JSF_foxx_repository_modelPrototype
### Remove
@copydetails JSF_foxx_repository_remove
### Replace
@copydetails JSF_foxx_repository_replace
### Update
@copydetails JSF_foxx_repository_update
### Remove By Example
@copydetails JSF_foxx_repository_removeByExample
### ReplaceByExample
@copydetails JSF_foxx_repository_replaceByExample
### UpdateByExample
@copydetails JSF_foxx_repository_updateByExample
### All
@copydetails JSF_foxx_repository_all
### ByExample
@copydetails JSF_foxx_repository_byExample
### FirstExample
@copydetails JSF_foxx_repository_firstExample
The Manifest File{#UserManualFoxxManifest}
@ -488,6 +563,10 @@ one choice now: `underscore`. Which would set the body of the response to
`contentType` to `text/plain` in this case. In addition to the attributes
you provided, you also have access to all your view helpers.
### Initialize
@copydetails JSF_foxx_TemplateMiddleware_initializer
### Render
@copydetails JSF_foxx_TemplateMiddleware_response_render

View File

@ -74,6 +74,8 @@ Repository = function (collection, opts) {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_collection
/// @brief The collection object.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
this.collection = collection;
@ -81,6 +83,8 @@ Repository = function (collection, opts) {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_modelPrototype
/// @brief The prototype of the according model.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
this.modelPrototype = options.model || require("org/arangodb/foxx/model").Model;
@ -88,6 +92,8 @@ Repository = function (collection, opts) {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_prefix
/// @brief The prefix of the application.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
this.prefix = options.prefix;
@ -97,6 +103,8 @@ _.extend(Repository.prototype, {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_remove
/// @brief See the documentation of collection.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
remove: function () {
'use strict';
@ -106,6 +114,8 @@ _.extend(Repository.prototype, {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_replace
/// @brief See the documentation of collection.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
replace: function () {
'use strict';
@ -115,6 +125,8 @@ _.extend(Repository.prototype, {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_update
/// @brief See the documentation of collection.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
update: function () {
'use strict';
@ -124,6 +136,8 @@ _.extend(Repository.prototype, {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_removeByExample
/// @brief See the documentation of collection.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
removeByExample: function () {
'use strict';
@ -133,6 +147,8 @@ _.extend(Repository.prototype, {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_replaceByExample
/// @brief See the documentation of collection.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
replaceByExample: function () {
'use strict';
@ -142,6 +158,8 @@ _.extend(Repository.prototype, {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_updateByExample
/// @brief See the documentation of collection.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
updateByExample: function () {
'use strict';
@ -151,6 +169,8 @@ _.extend(Repository.prototype, {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_all
/// @brief See the documentation of collection.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
all: function () {
'use strict';
@ -160,6 +180,8 @@ _.extend(Repository.prototype, {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_byExample
/// @brief See the documentation of collection.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
byExample: function () {
'use strict';
@ -169,6 +191,8 @@ _.extend(Repository.prototype, {
////////////////////////////////////////////////////////////////////////////////
/// @fn JSF_foxx_repository_firstExample
/// @brief See the documentation of collection.
///
/// See the documentation of collection.
////////////////////////////////////////////////////////////////////////////////
firstExample: function () {
'use strict';