Skip to content

Commit 0a68334

Browse files
authored
docs(openapi): Update descriptions for the Validate Actor input endpoint (#2851)
- Adds info on builds without an input schema. - Adds info on omitting fields with defaults. - Updates the 200 response description. Part of #2684.
1 parent 0a90cec commit 0a68334

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

‎apify-api/openapi/paths/actors/acts@{actorId}@validate-input.yaml‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,31 @@ post:
33
- Actors
44
summary: Validate Actor input
55
description: |
6-
Validates the provided input against the Actor's input schema for the specified build.
6+
Validates the JSON payload against the Actor's
7+
[input schema](https://docs.apify.com/actors/development/actor-definition/input-schema)
8+
defined in the specified build.
79
8-
The endpoint checks whether the JSON payload conforms to the input schema
9-
defined in the Actor's build. If no `build` query parameter is provided,
10-
the `latest` build tag is used by default.
10+
If the specified build has no input schema, any input is considered valid.
1111
operationId: actor_validateInput_post
1212
parameters:
1313
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/actorId"
1414
- name: build
1515
in: query
1616
description: |
17-
Optional tag or number of the Actor build to use for input schema validation.
18-
By default, the `latest` build tag is used.
17+
Actor build whose input schema is used for validation. Can be a build tag or build number.
18+
Defaults to the `latest` build tag.
1919
required: false
2020
style: form
2121
explode: true
2222
schema:
2323
type: string
24-
example: latest
24+
example: 0.1.234
2525
requestBody:
26-
description: JSON input to validate against the Actor's input schema.
26+
description: |
27+
The Actor input as a JSON object.
28+
29+
You can omit fields that have a `default` in the input schema. They're
30+
filled in before validation.
2731
content:
2832
application/json:
2933
schema:
@@ -42,7 +46,9 @@ post:
4246
properties:
4347
valid:
4448
type: boolean
45-
description: Whether the input is valid according to the Actor's input schema.
49+
description: |
50+
Always `true`. The endpoint responds with `200` only when the input
51+
passes validation. Invalid input returns a `400` error.
4652
"400":
4753
$ref: ../../components/responses/BadRequest.yaml
4854
"401":

0 commit comments

Comments
 (0)