diff --git a/notice/api/3.0.md b/notice/api/3.0.md index 0200952..143a313 100644 --- a/notice/api/3.0.md +++ b/notice/api/3.0.md @@ -257,7 +257,7 @@ The *is_optional* field must be a **boolean** set to `true` if the parameter can #### parameter.rename -The *rename* field must be a **string** corresponding to the *variable name* given to the implementation. It is useful for **GET parameters** because they need to be called `URL#`, where `#` is the position in the URI. +The *rename* field must be a **string** corresponding to the *variable name* given to the implementation. It is useful for **GET parameters** because they need to be called `URL#`, where `#` is the position in the URI. (cf. [paramter.name](#parametername))) If ommited, by default, `parameter.name` will be used. #### parameter.default_value @@ -312,6 +312,8 @@ Also the **namespace** must match, it corresponds to the path (starting at `/api For instance if you have in your configuration a path called `/uri1/uri2/uri3`, you will create the file `/build/api/module/uri1/uri2/uri3.php`. +*Specific*: For the root (`/`) path, it will trigger the class `\api\module\root`, so you have to create the file `/build/api/module/root.php`. (cf. [configuration format](#1---configuration-format)) + ### methods @@ -322,9 +324,9 @@ Each method is represented as a class' method with the same name as the associat Arguments are passed to the method as a single argument which an associative array according to the configuration. _Notes_: -* Optional parameters if not given are set to the `default` value given in the configuration (`null` if) -* parameters of type `FILE` are given by reference but the use is the same as normal parameters -* URI parameters are called `URL0`, `URL1` and so on according to their order if no `rename` set in the configuration. +* Optional parameters if not given are set to their default value (cf. [parameter.optional](#parameterisoptional), [parameter.default_value](#parameterdefault_value)) +* parameters of type `FILE` are given by reference but the use is the same as normal parameters (cf. [complex types](#2---complex-types)) +* URI parameters are called `URL0`, `URL1` and so on according to their order if no `rename` set in the configuration. (cf: [parameter.name](#parametername), [parameter.rename](#parameterrename)) ### return statement @@ -404,6 +406,7 @@ To add a new type, just open the file `/build/api/Checker.php` and add an entry |Type|Sub-Type|Description| |---|---|---| |`array`|`a`|Array containing only entries matching the type `a`| +|`FILE`|_a raw file send in `multipart/form-data`|A raw file sent by `multipart/form-data`| > **Note:** It is possible to chain `array` type as many as needed.