fix(openapi): Fix OpenAPI specification errors in /v2/acts#2288
Draft
fix(openapi): Fix OpenAPI specification errors in /v2/acts#2288
/v2/acts#2288Conversation
|
Preview for this PR was built for commit |
Add missing response codes and fix schema issues for /v2/acts endpoints based on method-specific validation errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Preview for this PR was built for commit |
/v2/acts
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
Fixes OpenAPI specification validation errors detected at runtime for the
/v2/actsendpoints.Validation errors being fixed
These are lines from the error log generated by the unmerged validator running on integration tests https://github.com/apify/apify-core/pull/26052:
Changes
New files:
components/responses/Forbidden.yaml,PaymentRequired.yaml,UnsupportedMediaType.yamlAdded three new shared response components following the pattern of existing
Unauthorized.yamlandNotFound.yaml:Forbidden.yaml- 403, for permission-denied responsesPaymentRequired.yaml- 402, returned when the Actor requires a paid plan or the user has exceeded their limitsUnsupportedMediaType.yaml- 415, returned when an unsupportedContent-Typeis sentcomponents/schemas/actors/TaggedBuildInfo.yamlChanged
finishedAtfromtype: [string, "null"]toanyOf: [{type: string, format: date-time}, {type: "null"}]. The array-type notation combined withformat: date-timecaused the validator to apply the date-time format check against null values, triggering cascadingtaggedBuildsanyOf failures.components/schemas/actors/EnvVar.yamlvaluefrom therequiredarray - secret env vars do not return their value in API responses.valuetype fromstringto[string, "null"].components/schemas/actors/SourceCodeFile.yamlRemoved
formatfrom therequiredarray - not all source files include a format field.components/schemas/actors/SourceCodeFolder.yamlRemoved
folderfrom therequiredarray - theanyOfunion withSourceCodeFilewas failing because each branch expected properties only present in the other.components/schemas/actor-pricing-info/FlatPricePerMonthActorPricingInfo.yamlRemoved
pricePerUnitUsdandtrialMinutesfrom therequiredarray - these fields are not always returned by the API for this pricing model.components/schemas/actor-pricing-info/PayPerEventActorPricingInfo.yamlRemoved
pricingPerEventfrom therequiredarray - not always returned by the API.components/schemas/actor-pricing-info/PricePerDatasetItemActorPricingInfo.yamlRemoved
pricePerUnitUsdandunitNamefrom therequiredarray - not always returned by the API.components/schemas/actor-runs/Run.yamlChanged
buildNumberfromtype: stringtotype: [string, "null"]- runs that have not yet started building do not have a build number.components/schemas/actor-runs/RunStats.yamlChanged
inputBodyLenfromtype: integertotype: [integer, "null"]- runs in progress may not have this stat populated yet.paths/actors/acts.yaml-GETandPOST /v2/actsAdded
401and403responses to both operations.paths/actors/acts@{actorId}.yaml-GET,PUT,DELETE /v2/acts/{actorId}Added
401,403, and404responses to all three operations.paths/actors/acts@{actorId}@runs.yaml-GETandPOST /v2/acts/{actorId}/runs401,403,404responses.401,402,403,404responses. The402covers the case where the Actor requires a paid plan or the user has exceeded their subscription limits.paths/actors/acts@{actorId}@runs@last.yaml-GET /v2/acts/{actorId}/runs/lastAdded missing
waitForFinishquery parameter. The spec did not define it, causing request validation errors when clients passed it.paths/actors/acts@{actorId}@run-sync.yaml-POST /v2/acts/{actorId}/run-syncAdded
415response - returned when the request body uses an unsupportedContent-Type.paths/actors/acts@{actorId}@webhooks.yaml-GET /v2/acts/{actorId}/webhooksAdded
401,403,404responses.paths/actors/acts@{actorId}@builds.yaml-GETandPOST /v2/acts/{actorId}/buildsAdded
401,403,404responses to both operations.paths/actors/acts@{actorId}@builds@default.yaml-GET /v2/acts/{actorId}/builds/defaultAdded
401,403,404responses.paths/actors/acts@{actorId}@builds@{buildId}.yaml-GET /v2/acts/{actorId}/builds/{buildId}Added
401,403,404responses.paths/actors/acts@{actorId}@builds@{buildId}@openapi.json.yaml-GET /v2/acts/{actorId}/builds/{buildId}/openapi.jsonAdded
401,403,404responses.paths/actors/acts@{actorId}@versions.yaml-GETandPOST /v2/acts/{actorId}/versionsAdded
401,403,404responses to both operations.paths/actors/acts@{actorId}@versions@{versionNumber}.yaml-GET,PUT,DELETE /v2/acts/{actorId}/versions/{versionNumber}Added
401,403,404responses to all three operations.Issues
Partially implements: #2286
🤖 Generated with Claude Code