瀏覽代碼

Add `No-example` to documentation

Marnu Lombard 5 年之前
父節點
當前提交
88652a3561
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      docs/documenting.md

+ 13 - 0
docs/documenting.md

@@ -97,6 +97,19 @@ Note: a random value will be used as the value of each parameter in the example
      */
 ```
 
+Note: To exclude a particular parameter from the generated examples (for all languages), you can annotate it with `No-example`. For instance:
+```php
+       /**
+        * @queryParam location_id required The id of the location. Example: 1
+        * @queryParam user_id required The id of the user. No-example
+        * @queryParam page required The page number. Example: 4
+        */
+```
+Outputs: 
+```bash
+curl -X GET -G "https://example.com/api?location_id=1&page=4"
+```
+
 Note: You can also add the `@queryParam` and `@bodyParam` annotations to a `\Illuminate\Foundation\Http\FormRequest` subclass instead, if you are using one in your controller method
 
 ```php