Repository navigation
Conversation
…oint
Error: Request OpenAPI validation error GET /v2/actor-builds/{buildId}/log?raw=false: Unknown query parameter 'raw'
Files: apify-api/openapi/components/objects/logs/log.yaml:86
Root cause: The build log operation referenced only the stream and download parameters, while the run log and the generic log operations also reference raw. The API handles the build log by rewriting the request to /v2/logs/{buildId} with the original query string, so raw is accepted there, and both the JavaScript and the Python API clients send it.
Reference: https://github.com/apify/apify-core/tree/8440e7910c359526f013ea7b42394e386ecccc95/src/api/src/routes/actor_builds/build_log.ts#L23
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Error: Request OpenAPI validation error PUT /v2/key-value-stores/{storeId}/records/{recordKey}: /body: must be object
Files: apify-api/openapi/components/schemas/key-value-stores/PutRecordRequest.yaml:5
Root cause: PutRecordRequest restricted the application/json body to an object, but the API stores whatever body arrives under the given content type, so a JSON array, string, or number is a valid record. The API clients send such values as JSON. The schema now accepts any JSON value, as the */* media type already does.
Reference: https://github.com/apify/apify-core/tree/8440e7910c359526f013ea7b42394e386ecccc95/src/api/src/routes/key_value_stores/record.ts#L99
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…le user ID
Error: Request OpenAPI validation error GET /v2/users/{userId}/limits: not found
Error: Request OpenAPI validation error GET /v2/users/{userId}/usage/monthly: not found
Files: apify-api/openapi/openapi.yaml:778, apify-api/openapi/paths/users/users@{userId}@limits.yaml:11, apify-api/openapi/paths/users/users@{userId}@Usage@monthly.yaml:15, apify-api/openapi/components/parameters/userParameters.yaml:1
Root cause: The specification defined these operations only under the literal path segment me. The API routes are /users/:username/limits and /users/:username/usage/monthly, and the handlers accept me, the token's own user ID or username, or an organization the token's user is a member of. The API clients build the URL from any ID. The paths are now templated with a shared userId parameter whose description explains the me alias and the access rule. The operation IDs are unchanged, so the documentation URLs stay the same.
Reference: https://github.com/apify/apify-core/tree/8440e7910c359526f013ea7b42394e386ecccc95/src/packages/consts/src/api_server_routes.ts#L9
Reference: https://github.com/apify/apify-core/tree/8440e7910c359526f013ea7b42394e386ecccc95/src/api/src/lib/users.ts#L99
Reference: https://github.com/apify/apify-core/tree/8440e7910c359526f013ea7b42394e386ecccc95/src/api/src/routes/users/limits.ts#L49
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…accessible user ID" This reverts commit 789370a.
Contributor
|
✅ Preview for this PR (commit |
Contributor
|
API behavior and specification alignment: Aligned. Reviewed commit: f4aaade |
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.
This round used the API clients as the request generator: the JavaScript client's unit and integration tests ran through a request-only OpenAPI validator (apify/apify-client-js#1175), and the Python client was driven through the same validator locally. Only requests were validated.
Error log: https://github.com/apify/apify-client-js/actions/runs/40522703825 (warning annotations of the
Unit testsandIntegration testsjobs)apify-core version: https://github.com/apify/apify-core/tree/8440e7910c359526f013ea7b42394e386ecccc95
Stop reason: No new fixes possible. Every request-side error the clients produced is either fixed here, already fixed on
masterby #3118 (the/v2/users/{userId}/limitsand/v2/users/{userId}/usage/monthlypaths), a known validator false positive, or out of scope (see below).Detailed changes description
Error fixes
Actor build log:
rawquery parameter missingapify-api/openapi/components/objects/logs/log.yaml:86Request OpenAPI validation error GET /v2/actor-builds/{buildId}/log?raw=false: Unknown query parameter 'raw'streamanddownloadparameters, while the run log and the generic log operations also referenceraw. The API handles the build log by rewriting the request to/v2/logs/{buildId}with the original query string, sorawis accepted there, and both the JavaScript and the Python API clients send it. Verified against the live API:rawanddownloadhave the same effect on/v2/actor-builds/{buildId}/logas on/v2/logs/{buildId}.Key-value store record: body restricted to a JSON object
apify-api/openapi/components/schemas/key-value-stores/PutRecordRequest.yaml:5Request OpenAPI validation error PUT /v2/key-value-stores/{storeId}/records/{recordKey}: /body: must be objectPutRecordRequestrestricted theapplication/jsonbody to an object, but the API streams whatever body arrives into the record under the given content type, so a JSON array, string, or number is a valid record. The API clients send such values as JSON, and the API's own integration test stores a plain string. The schema now accepts any JSON value, as the*/*media type already does.Refactoring
None.
Unfixed errors
False positives
Space encoded as
+in a query valueRequest OpenAPI validation error GET /v2/store?search=web+scraper: Parameter 'search' must be url encoded. Its value may not contain reserved characters.express-openapi-validatortreats+as a reserved character, but+for a space is the standard form encoding of a query string and the API decodes it into the plainsearchstring it validates. Nothing to change in the specification.Upper-case
Content-EncodingvalueRequest OpenAPI validation error PUT /v2/key-value-stores/{storeId}/records/{recordKey}: /headers/content-encoding: must be equal to one of the allowed values: br, gzip, deflate, identityContent-Encoding: IDENTITY. Content codings are case-insensitive per RFC 9110, and the validator compares the enum case-sensitively. The specification lists the canonical lower-case values and stays as it is.Potential API bugs
HTML record encoding check is case-sensitive
Request OpenAPI validation error PUT /v2/key-value-stores/{storeId}/records/{recordKey}: /headers/content-encoding: must be equal to one of the allowed values: br, gzip, deflate, identityContent-Encodingnot in its supported list, comparing the header value case-sensitively, soIDENTITYon an HTML record is refused although content codings are case-insensitive per RFC 9110. Not a specification problem.Out of scope errors
Store
pricingModelvalueFLAT_PRICE_PER_MONTHRequest OpenAPI validation error GET /v2/store?limit=10&pricingModel=FLAT_PRICE_PER_MONTH: must be equal to one of the allowed values: FREE, PRICE_PER_DATASET_ITEM, PAY_PER_EVENTWebhook created without its required fields
Request OpenAPI validation error POST /v2/webhooks: /body/eventTypes: must have required property 'eventTypes'(alsoconditionandrequestUrl)Issues
Partially implements: #2286
🤖 Generated with Claude Code