web_api_base 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/readme.md +22 -1
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -495,7 +495,28 @@ We can create a API playground(host/playground) using the Aplication.CreateDocum
|
|
|
495
495
|
}
|
|
496
496
|
```
|
|
497
497
|
|
|
498
|
-
|
|
498
|
+
# Documentation decorators
|
|
499
|
+
We have some decorators to add a more information to our auto-generated documentation
|
|
500
|
+
|
|
501
|
+
### @ControllerHeader(header : string)
|
|
502
|
+
Add a header field to a controller. All requests will have this header on it
|
|
503
|
+
|
|
504
|
+
### @ActionHeader(header : string)
|
|
505
|
+
Add a header field to a controller´s action
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
### @Description(description : string)
|
|
509
|
+
Add a description text on a action
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
### @RequestJson(json : string)
|
|
513
|
+
Add a json template as a placeholder of body field. We can use if we want manually define the json, because, the framework can create the json template base on the argument type of action method
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
### @ProducesResponse(response : { Status : number, Description? : string, JSON? : string })
|
|
517
|
+
Explain all the possibles rsponses of a controller´s action. We can use this decorator many times we need to explain all possible resposes
|
|
518
|
+
|
|
519
|
+
### To use the default theme, run the API with **--debug** argument only
|
|
499
520
|
|
|
500
521
|
[](https://raw.githubusercontent.com/adrianomarino1992/web_api_base/master/light.png)
|
|
501
522
|
|