Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API spec doc to reflect the new fields introduced from TEP75&76 #5511

Merged
merged 1 commit into from
Sep 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/api-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ List responses have the following fields (based on [`meta.v1/ListMeta`](https://
|---------------|------------|-------------|
| `name` | string | REQUIRED |
| `description` | string | REQUIRED |
| `type` | Enum: <br>- `"string"` (default) <br>- `"array"` | REQUIRED |
| `type` | Enum:<br>- `"string"` (default)<br>- `"array"` <br>- `"object"` | REQUIRED (The values `string` and `array` for this field are REQUIRED, and the value `object` is RECOMMENDED.) |
| `properties` | map<string,PropertySpec> |RECOMMENDED <br><br>note: `PropertySpec` is a type that defines the spec of an individual key. See how to define the `properties` section in the [example](../examples/v1beta1/taskruns/alpha/object-param-result.yaml).|
| `default` | `ParamValue` | REQUIRED |

### `Step`
Expand Down Expand Up @@ -279,13 +280,16 @@ List responses have the following fields (based on [`meta.v1/ListMeta`](https://
|--------------|------------|-------------|
| `name` | string | REQUIRED |
| `description` | string | REQUIRED |
| `type` | Enum:<br>- `"string"` (default)<br>- `"array"` <br>- `"object"` | RECOMMENDED (Each of the values is RECOMMENDED.)|
| `properties` | map<string,PropertySpec> | RECOMMENDED <br><br>note: `PropertySpec` is a type that defines the spec of an individual key. See how to define the `properties` section in the [example](../examples/v1beta1/taskruns/alpha/object-param-result.yaml).|

### `TaskRunResult`

| Field Name | Field Type | Requirement |
|------------|------------|-------------|
| `name` | string | REQUIRED |
| `value` | string | REQUIRED |
| `type` | Enum:<br>- `"string"` (default)<br>- `"array"` <br>- `"object"` | RECOMMENDED (Each of the values is RECOMMENDED.) |
| `value` | `ParamValue` | REQUIRED |
Copy link
Member

Choose a reason for hiding this comment

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

it's a bit unfortunate that we're changing the type of a required field but since we only have one primary implementation of tekton currently it's probably OK?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess so because it's a backward compatible change. String type result is still supported as the way it was supported before.

Copy link
Member

Choose a reason for hiding this comment

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

Just to clarify, if there were other implementations of the Tekton API, this would be a problem. The reason is that they might support the field "value" as a string, but with this change they are "required" to support value as a "ParamValue". This would mean an implementation that was previously conformant would not be conformant after this change. But since we have one main implementation, it doesn't matter too much.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the clarification!


### `TaskSpec`

Expand Down