Skip to content

Commit 1c04a2a

Browse files
authored
Fixed a typo in the provider docs (#227)
* Fixed a typo in the provider docs - The example had endpoint rather than response - Added some additional examples * Fixed npm install to be npm ci
1 parent 236ff43 commit 1c04a2a

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

guide/build-guide.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ wasm-pack build --release -t bundler -d $WASM_OUTPUT_REACT_DIR --scope fs
3333

3434
# build the results viewer (which includes putting the output into the book's src)
3535
cd $RESULTS_VIEWER_REACT_DIR
36-
npm install
36+
npm ci
3737
npm run build
3838

3939
# build the book

guide/serve-guide.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ wasm-pack build --release -t bundler -d $WASM_OUTPUT_REACT_DIR --scope fs
3333

3434
# build the results viewer (which includes putting the output into the book's src)
3535
cd $RESULTS_VIEWER_REACT_DIR
36-
npm install
36+
npm ci
3737
npm run build
3838

3939
# build the book

guide/src/config/providers-section.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Example:
1515
```yaml
1616
providers:
1717
- session:
18-
- endpoint:
18+
- response:
1919
auto_return: force
2020
- username:
2121
- file:
@@ -166,13 +166,32 @@ The `file` *provider_type* reads data from a file. Every line in the file is rea
166166

167167
When enabled there is no sense of "fairness" in the randomization. Any record in the file could be used more than once before other records are used.
168168

169+
**Example**, the following:
170+
```yaml
171+
providers:
172+
- username:
173+
- file:
174+
path: "usernames.csv"
175+
repeat: true
176+
random: true
177+
```
178+
169179
## response
170180
Unlike other *provider_type*s `response` does not automatically receive data from a source. Instead a `response` provider is available to be a "sink" for data originating from an HTTP response. The `response` provider has the following parameters.
171181

172182
- **`auto_return`** <sub><sup>*Optional*</sup></sub> - This parameter specifies that when this provider is used and an individual endpoint call concludes, the value it got from this provider should be sent back to the provider. Valid options for this parameter are `block`, `force`, and `if_not_full`. See the `send` parameter under the [endpoints.provides subsection](./endpoints-section.md#provides-subsection) for details on the effect of these options.
173183
- **`buffer`** <sub><sup>*Optional*</sup></sub> - Specifies the soft limit for a provider's buffer. This can be indicated with an integer greater than zero or the value `auto`. The value `auto` indicates that if the provider's buffer becomes empty it will automatically increase the buffer size to help prevent the provider from becoming empty again in the future. Defaults to `auto`.
174184
- **`unique`** - <sub><sup>*Optional*</sup></sub> A boolean value which when `true` makes the provider a "unique" provider--meaning each item within the provider will be a unique JSON value without duplicates. Defaults to `false`.
175185

186+
**Example**, the following:
187+
```yaml
188+
providers:
189+
- session:
190+
- response:
191+
buffer: 1000
192+
auto_return: if_not_full
193+
```
194+
176195
## list
177196
The `list` *provider_type* creates a means of specifying an array of static values to be used as a provider.
178197
A `list` provider can be specified in two forms, either implicitly or explicitly. The explicit form has the following parameters:

0 commit comments

Comments
 (0)