Repository navigation
Conversation
Contributor
|
✅ Preview for this PR (commit |
Contributor
|
API behavior and specification alignment:
Reviewed commit: 05c6185 |
Error: Response OpenAPI validation error {"url":"/v2/users/{id}","method":"GET","statusCode":429,"errors":[{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/error/data"}]}
Files: apify-api/openapi/components/schemas/common/ErrorDetail.yaml:9
Root cause: The API error handler responds with { error: { type, message, data } }, where data carries the public details of the error. The rate-limit error sets rateLimitType (ENDPOINT or USER) there, so 429 responses contain error.data, which ErrorDetail did not describe. Other error types leave data undefined, so the key is not serialized.
Reference: https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/api/src/middleware/error_handler.ts#L39, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/packages/errors/src/errors/api.ts#L68
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pijukatel
force-pushed
the
claude/laughing-brown-ttkhp9
branch
from
October 27, 2026 12:39
05c6185 to
7e24fe8
Compare
Error: Response OpenAPI validation error {"url":"/v2/request-queues/{id}/requests/{requestId}","method":"GET","statusCode":200,"errors":[{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/lockByClient"}]}
Files: apify-api/openapi/components/schemas/request-queues/RequestResource.yaml:10
Root cause: Get request returns the stored request item as it is. lockByClient is an optional string attribute of the stored request that holds the key of the client that last locked it. Locking sets it and only an explicit unlock or an update of the request removes it, so it is also returned after the lock has expired.
Reference: https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/api/src/routes/request_queues/request.ts#L79, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/api/src/lib/request_queues/request_queue.ts#L1372, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/api/src/lib/request_queues/request_queue.ts#L1324, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/packages/schemas/src/request_queues.ts#L89
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Error: Response OpenAPI validation error {"url":"/v2/users/{id}","method":"GET","statusCode":200,"errors":[{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/id"},{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/email"},{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/proxy"},{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/plan"},{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/effectivePlatformFeatures"},{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/createdAt"},{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/isPaying"},{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/organizationOwnerUserId"}]}
Files: apify-api/openapi/paths/users/users@{userId}.yaml:11, apify-api/openapi/paths/users/users@{userId}.yaml:31
Root cause: When the request is authenticated with a token of the requested user, or with a token impersonating that user, the route attaches the private user info to the public profile, which is the same shape as Get private user data. Scoped tokens never get it. The spec described only the public shape, so a lookup of the caller's own id failed validation.
Reference: https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/api/src/routes/users/user.ts#L77, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/api/src/lib/users.ts#L124
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pijukatel
force-pushed
the
claude/laughing-brown-ttkhp9
branch
from
October 27, 2026 12:40
7e24fe8 to
abec71a
Compare
Contributor
|
API behavior and specification alignment:
Reviewed commit: 7e24fe8 |
Contributor
|
API behavior and specification alignment: Aligned. Reviewed commit: c44dd02 |
Pijukatel
marked this pull request as ready for review
October 27, 2026 12:43
Pijukatel
requested review from
fnesveda,
janbuchar and
szaganek
as code owners
October 27, 2026 12:43
Error: Response OpenAPI validation error {"errors":[{"errorCode":"type.openapi.validation","message":"must be object","path":"/response/data/standby"}],"method":"POST","msg":"Response OpenAPI validation error","statusCode":200,"url":"/v2/actor-runs/{id}/abort"}
Files: apify-api/openapi/components/schemas/actor-runs/Run.yaml:92, apify-api/openapi/components/schemas/actor-runs/RunListItem.yaml:61
Root cause: The run document stores standby from resolveRunStandbyOptions, which returns undefined for every run that is not an Actor Standby run, and the API serializes that as null. The spec declared standby as a RunStandby object only, so every non-Standby run failed with "must be object".
Reference: https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/packages/actor-server/src/actor_jobs/actor_jobs.server.ts#L765, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/packages/actor-server/src/actor_jobs/actor_jobs.server.ts#L1835, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/packages/types/src/actor.ts#L602
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ser plans
Error: Response OpenAPI validation error {"errors":[{"errorCode":"type.openapi.validation","message":"must be string","path":"/response/data/plan/personalizedSupport"}],"method":"GET","msg":"Response OpenAPI validation error","statusCode":200,"url":"/v2/users/me"}
Files: apify-api/openapi/components/schemas/users/UserPlan.yaml:120, apify-api/openapi/components/schemas/users/UserPlan.yaml:123
Root cause: Both fields are optional strings in the user plan schema. The admin custom plan form edits them as text inputs and its form cleaning turns an empty input into null, which the schema accepts for optional keys, so stored plans carry null and the API returns it. The spec allowed only a string. The other optional plan fields are not edited by any form and have no code path that sets null, so they stay as they are.
Reference: https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/packages/schemas/src/user_plans.ts#L338, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/packages/schemas/src/user_plans.ts#L351, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/console/frontend/src/ui/admin/admin_user_settings/custom_plan_view.jsx#L438, https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/console/frontend/src/ui/components/fast_form/form_hooks.js#L46
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Autogenerated OpenAPI fixes suggestions based on validation errors generated from running API integration tests with OpenAPI validator turned on.
Error log: https://apify-pr-test-env-logs.s3.us-east-1.amazonaws.com/apify/apify-core/31898/api-333ad8a2a79accc8205a1f95a46afdd6efc8b675.html
apify-core version: https://github.com/apify/apify-core/commit/d4cb827d3d91729543185135b83797891a55f8c3 (the log was produced by apify/apify-core#31898, which adds
unevaluatedProperties: falseto the response validator on top of this commit)Stop reason: No new fixes possible. The log contains 56 distinct undocumented-field errors. 42 of them are already fixed by #3118, so this PR covers only the remainder: 5 fixes.
Detailed changes description
Error fixes
error.dataon error responsesapify-api/openapi/components/schemas/common/ErrorDetail.yaml:9Response OpenAPI validation error {"url":"/v2/users/{id}","method":"GET","statusCode":429,"errors":[{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/error/data"}]}(1,334 occurrences on 162 endpoints, all HTTP statuses){ error: { type, message, data } }, wheredatacarries the public details of the error. The rate-limit error setsrateLimitType(ENDPOINTorUSER) there, so 429 responses containerror.data, whichErrorDetaildid not describe.lockByClienton request queue requestsapify-api/openapi/components/schemas/request-queues/RequestResource.yaml:10Response OpenAPI validation error {"url":"/v2/request-queues/{id}/requests/{requestId}","method":"GET","statusCode":200,"errors":[{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/lockByClient"}]}(305 occurrences)lockByClientis an optional string attribute of the stored request that holds the key of the client that locked it, and it is returned while the lock is held. Its siblinglockExpiresAtis added by fix(openapi): document missing response fields, endpoints and query params #3118.Private user data returned by Get public user data
apify-api/openapi/paths/users/users@{userId}.yaml:11,apify-api/openapi/paths/users/users@{userId}.yaml:31Response OpenAPI validation error {"url":"/v2/users/{id}","method":"GET","statusCode":200,"errors":[{"message":"must NOT have unevaluated properties","errorCode":"unevaluatedProperties.openapi.validation","path":"/response/data/id"},{...,"path":"/response/data/email"},{...,"path":"/response/data/proxy"},{...,"path":"/response/data/plan"},{...,"path":"/response/data/effectivePlatformFeatures"},{...,"path":"/response/data/createdAt"},{...,"path":"/response/data/isPaying"},{...,"path":"/response/data/organizationOwnerUserId"}]}anyOfthe public and the private response, with the condition described on the endpoint.standbyisnullon runs that are not Actor Standby runsapify-api/openapi/components/schemas/actor-runs/Run.yaml:92,apify-api/openapi/components/schemas/actor-runs/RunListItem.yaml:61Response OpenAPI validation error {"errors":[{"errorCode":"type.openapi.validation","message":"must be object","path":"/response/data/standby"}],"method":"POST","msg":"Response OpenAPI validation error","statusCode":200,"url":"/v2/actor-runs/{id}/abort"}(also onPOST /v2/actor-runs/{id}/reboot)standbyfromresolveRunStandbyOptions, which returnsundefinedfor every run that is not an Actor Standby run, and the API serializes that asnull. The spec declaredstandbyas aRunStandbyobject only, so every non-Standby run failed with "must be object". The field is nowanyOfRunStandbyandnull.plan.personalizedSupportandplan.monitoringLevelarenullon some user plansapify-api/openapi/components/schemas/users/UserPlan.yaml:120,apify-api/openapi/components/schemas/users/UserPlan.yaml:123Response OpenAPI validation error {"errors":[{"errorCode":"type.openapi.validation","message":"must be string","path":"/response/data/plan/personalizedSupport"}],"method":"GET","msg":"Response OpenAPI validation error","statusCode":200,"url":"/v2/users/me"}null, which the schema accepts for optional keys, so stored plans carrynulland the API returns it. The spec allowed only a string. The other optional plan fields (planVersion,legacyPlanId,planTags,overageThresholdUsd) are not edited by any form and have no code path that setsnull, so they stay as they are.https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/console/frontend/src/ui/admin/admin_user_settings/custom_plan_view.jsx#L438,https://github.com/apify/apify-core/tree/d4cb827d3d91729543185135b83797891a55f8c3/src/console/frontend/src/ui/components/fast_form/form_hooks.js#L46Refactoring
None.
Fields already covered by #3118
The remaining 42 distinct errors in the log are fixed by #3118 and are not repeated here: run
options.isMaxTotalChargeUsdSetByUser,standby,accountedChargedEventCounts,eventUsage,externalChargedTotalUsd,createdByOrganizationMemberUserId,metamorphs[].buildTags,PROXY_UNBLOCKER_UNITSinusageandusageUsd; buildexitCode,changelog; storagetitle;RequestResource.lockExpiresAt;actorStandby.tenancy;envVars[].valueHash;isPPEPlatformUsagePaidByUser; tasknameLowerCase,stats.lastRunStartedAt; scheduleuiState; webhookisEnabled,actionType, dispatchwebhook._id; userorganizationOwnerUserId,proxy.groups[].id,effectivePlatformFeatures.PROXY_UNBLOCKER, theplan.*fields and the unblocker-units limits.Issues
Partially implements: #2286