Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
Describe requester passing reserved parameter value (#1168)
Browse files Browse the repository at this point in the history
* Improve default vs. fixed language

Co-authored-by: Emanuel Tesař <[email protected]>
  • Loading branch information
dcroote and Siegrift authored Jan 22, 2023
1 parent bcde1c7 commit 5dfe3bd
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ specify a large number of endpoint parameters at no additional gas cost.
Note that there are some cases where you may not want to map endpoints to API
operations one-to-one. For example, an API operation can have a `header`
parameter, `Accept`, that can take the values `application/json` or
`applicatino/xml` to determine how to format the data that the API will respond
`application/xml` to determine how to format the data that the API will respond
to the call. Airnode expects responses to be in JSON format, and thus
hard-coding this parameter as `JSON` would be more suitable than letting the
requester decide, as there is only one valid choice. Again, the integrator's job
Expand Down
5 changes: 2 additions & 3 deletions docs/ois/v1.0/ois.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,12 @@ Allowed values: `_type`, `_path` or `_times`
#### 5.4.2. `fixed`

(Optional) The fixed (i.e., non-overridable) value for the reserved parameter.
If `fixed` is used, `default` has no effect and should not be used.
Cannot be used together with `default`.

#### 5.4.3. `default`

(Optional) The default value for the reserved parameter. Used when no value is
provided. If `default` is used, `fixed` must not be used because it would
override the default value.
provided. Cannot be used together with `fixed`.

### 5.5. `parameters`

Expand Down
5 changes: 2 additions & 3 deletions docs/ois/v1.1/ois.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,12 @@ Allowed values: `_type`, `_path` or `_times`
#### 5.4.2. `fixed`

(Optional) The fixed (i.e., non-overridable) value for the reserved parameter.
If `fixed` is used, `default` has no effect and should not be used.
Cannot be used together with `default`.

#### 5.4.3. `default`

(Optional) The default value for the reserved parameter. Used when no value is
provided. If `default` is used, `fixed` must not be used because it would
override the default value.
provided. Cannot be used together with `fixed`.

### 5.5. `parameters`

Expand Down
5 changes: 2 additions & 3 deletions docs/ois/v1.2/ois.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,12 @@ Allowed values: `_type`, `_path` or `_times`
#### 5.4.2. `fixed`

(Optional) The fixed (i.e., non-overridable) value for the reserved parameter.
If `fixed` is used, `default` has no effect and should not be used.
Cannot be used together with `default`.

#### 5.4.3. `default`

(Optional) The default value for the reserved parameter. Used when no value is
provided. If `default` is used, `fixed` must not be used because it would
override the default value.
provided. Cannot be used together with `fixed`.

### 5.5. `parameters`

Expand Down
5 changes: 2 additions & 3 deletions docs/ois/v1.3/ois.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,12 @@ Allowed values: `_type`, `_path` or `_times`
#### 5.4.2. `fixed`

(Optional) The fixed (i.e., non-overridable) value for the reserved parameter.
If `fixed` is used, `default` has no effect and should not be used.
Cannot be used together with `default`.

#### 5.4.3. `default`

(Optional) The default value for the reserved parameter. Used when no value is
provided. If `default` is used, `fixed` must not be used because it would
override the default value.
provided. Cannot be used together with `fixed`.

### 5.5. `parameters`

Expand Down
11 changes: 8 additions & 3 deletions docs/ois/v1.4/ois.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,12 @@ Each object has the following elements:
- `fixed`
- `default`

Note that if a reserved parameter object does not include a `fixed` value, a
requester can, or may be expected to, supply this value as a parameter. A value
supplied by a requester overrides a `default`. See the
[\_gasPrice reserved parameter description](./reserved-parameters.md#gasprice)
for an example.

#### 5.4.1. `name`

(Required) The name of the reserved parameter. Always starts with `_`.
Expand All @@ -468,13 +474,12 @@ Allowed values: `_type`, `_path`, `_times`, and `_gasPrice`.
#### 5.4.2. `fixed`

(Optional) The fixed (i.e., non-overridable) value for the reserved parameter.
If `fixed` is used, `default` has no effect and should not be used.
Cannot be used together with `default`.

#### 5.4.3. `default`

(Optional) The default value for the reserved parameter. Used when no value is
provided. If `default` is used, `fixed` must not be used because it would
override the default value.
provided by a requester. Cannot be used together with `fixed`.

### 5.5. `parameters`

Expand Down
6 changes: 4 additions & 2 deletions docs/ois/v1.4/reserved-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ There are two types of parameters which are part of the OIS object:
1. [Endpoint parameters](./ois.md#_5-5-parameters) - Airnode endpoint parameters
are mapped to API operation parameters.
2. [Reserved parameters](./ois.md#_5-4-reservedparameters) - Reserved parameters
perform a specific operation on the response before fulfilling the request.
Reserved parameter names start with `_`.
perform a specific operation related to the request or on the response before
fulfilling the request. Reserved parameter names start with `_`. Depending on
the configuration, they may be overridden by a parameter supplied by a
requester.

## `_type`

Expand Down

1 comment on commit 5dfe3bd

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.