Skip to content

Commit f20deb2

Browse files
authored
fix(openapi): add missing fields to the Actor definition schema (#3115)
The build stores the whole `actor.json` as `actorDefinition`, and `GET /actor-builds/{buildId}` returns it in full, but the schema only described part of it. This adds the missing fields: `title`, `description`, `meta`, `output`, `storages.datasets`, `storages.keyValueStore`, `webServerSchema`, and `webServerMcpPath`. `meta` lives in its own `ActorDefinitionMeta` schema so generated clients get a named model for it. The Python client needs `webServerSchema` to read a Server Actor's OpenAPI spec (apify/apify-client-python#1153). I checked the generated Python models against this spec, and the client's type check and unit tests pass. *✍️ Drafted by Claude Code*
1 parent 2f6b059 commit f20deb2

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

‎apify-api/openapi/components/schemas/actors/ActorDefinition.yaml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@ properties:
99
name:
1010
type: string
1111
description: The name of the Actor.
12+
title:
13+
type: string
14+
description: The human-readable display title of the Actor, shown in Apify Console and Apify Store.
15+
description:
16+
type: string
17+
description: The description of the Actor.
1218
version:
1319
type: string
1420
pattern: ^[0-9]+(\.[0-9]+)+$
1521
description: The version of the Actor, typically a dot-separated sequence of numbers (e.g., `0.1`, `1.0`, or `0.0.1`).
1622
buildTag:
1723
type: string
1824
description: The tag name to be applied to a successful build of the Actor. Defaults to 'latest' if not specified.
25+
meta:
26+
$ref: ./ActorDefinitionMeta.yaml
1927
environmentVariables:
2028
type: object
2129
additionalProperties:
@@ -33,6 +41,9 @@ properties:
3341
input:
3442
type: [object, "null"]
3543
description: The input schema object, the full specification can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/input-schema)
44+
output:
45+
type: [object, "null"]
46+
description: The output schema object, the full specification can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/output-schema)
3647
changelog:
3748
type: [string, "null"]
3849
description: The path to the CHANGELOG file displayed in the Actor's information tab.
@@ -42,6 +53,14 @@ properties:
4253
dataset:
4354
type: object
4455
description: Defines the schema of items in your dataset, the full specification can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema)
56+
datasets:
57+
type: object
58+
additionalProperties:
59+
type: object
60+
description: Maps dataset aliases to the schemas of the Actor's datasets, the full specification can be found in [Apify docs](https://docs.apify.com/platform/storage/dataset-schema/multiple-datasets)
61+
keyValueStore:
62+
type: object
63+
description: Defines the schema of the Actor's default key-value store, the full specification can be found in [Apify docs](https://docs.apify.com/platform/storage/key-value-store-schema)
4564
defaultMemoryMbytes:
4665
oneOf:
4766
- type: string
@@ -60,3 +79,9 @@ properties:
6079
usesStandbyMode:
6180
type: boolean
6281
description: Specifies whether Standby mode is enabled for the Actor.
82+
webServerSchema:
83+
type: object
84+
description: The OpenAPI v3 specification of the web server running in the Actor, the full specification can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/web-server-schema)
85+
webServerMcpPath:
86+
type: string
87+
description: The HTTP path where the Actor's web server exposes its MCP (Model Context Protocol) server, for example `/mcp`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
title: ActorDefinitionMeta
2+
description: Additional information about the Actor.
3+
type: object
4+
properties:
5+
templateId:
6+
type: string
7+
description: The ID of the template from which the Actor was created.
8+
generatedBy:
9+
type: string
10+
description: The tool or model that generated the Actor.

0 commit comments

Comments
 (0)