fix(openapi): relax required fields on actor pricing info schemas#2584
Closed
vdusek wants to merge 1 commit into
Closed
fix(openapi): relax required fields on actor pricing info schemas#2584vdusek wants to merge 1 commit into
vdusek wants to merge 1 commit into
Conversation
Drop `apifyMarginPercentage`, `createdAt`, `startedAt` from `CommonActorPricingInfo` and `eventDescription` from `ActorChargeEvent`. The platform-set `APIFY_ACTOR_PRICING_INFO` env var omits these fields, so consumers deserializing it via the generated pydantic models hit avoidable validation errors and resort to injecting placeholder defaults. Marking them optional matches reality and is consistent with the sibling `CurrentPricingInfo` schema, which already has these fields optional.
Contributor
|
🗑️ Preview for this PR was deleted. |
Contributor
|
Important Action required — @vdusek please coordinate this docs PR with the Python API client PR linked below. Because this PR modifies the OpenAPI specification, the generated models in A companion PR has been opened in
|
Contributor
Author
|
Closing - these fields are written into Actor env vars by the worker, which strips them before serializing. The API itself always returns them, so the schema should stay as-is (and we should create custom models in the SDK instead). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The platform-set
APIFY_ACTOR_PRICING_INFOenv var omitsapifyMarginPercentage,createdAt,startedAtandeventDescription, so consumers deserializing it via the generated pydantic models hit validation errors and resort to injecting placeholder defaults. Marking these optional matches reality and is consistent with the siblingCurrentPricingInfoschema, which already has these fields optional.Triggers a pydantic model regeneration in
apify-client-python; once merged, the SDK can drop the placeholder-injection workaround in_normalize_actor_pricing_info.