web_api_base 6.0.0 → 6.0.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +23 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web_api_base",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "web api base",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -495,12 +495,33 @@ We can create a API playground(host/playground) using the Aplication.CreateDocum
495
495
  }
496
496
  ```
497
497
 
498
- ### To use the default theme, run the API with **--debug** argument
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
  [![Alt text](https://raw.githubusercontent.com/adrianomarino1992/web_api_base/master/light.png)](https://raw.githubusercontent.com/adrianomarino1992/web_api_base/master/light.png)
501
522
 
502
523
  ### To use the dark theme, run the API with **--debug --dark** arguments
503
- [![Alt text](https://raw.githubusercontent.com/adrianomarino1992/web_api_base/5057c23221750ea4315142e88c7af80c2370682c/dark.png)](https://raw.githubusercontent.com/adrianomarino1992/web_api_base/5057c23221750ea4315142e88c7af80c2370682c/dark.png)
524
+ [![Alt text](https://raw.githubusercontent.com/adrianomarino1992/web_api_base/master/dark.png)](https://raw.githubusercontent.com/adrianomarino1992/web_api_base/master/dark.png)
504
525
 
505
526
 
506
527
  ## Contributing