Repository navigation
Fix contradictory UploadFilePartInstruction schema - #42
Open
ActiveInAI wants to merge 1 commit into
Open
ActiveInAI wants to merge 1 commit into
ActiveInAI wants to merge 1 commit into
Conversation
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.
UploadFilePartInstructioncurrently rejects every valid upload instruction under strict schema validation. ItsallOfreferencesLinkData, which allows onlyurland setsadditionalProperties: false. The other branch requireshttp_method,content_range_start, andcontent_range_end; these required fields are therefore simultaneously forbidden by the first branch.For example, the current schema rejects:
{ "url": "https://cde.example.test/upload/part/1", "http_method": "PUT", "content_range_start": 0, "content_range_end": 1023 }This change defines
UploadFilePartInstructionas a single closed object containing all its existing fields. It preserves every property constraint, required field, description, reference, and default, and keepsLinkDataunchanged and closed. No endpoint, payload field name, or API version changes. Flattening the model can affect inheritance in generated client types, although the intended JSON payload is unchanged.The regression tests cover POST and PUT, optional properties, the enclosing
DocumentsToUploadresponse, missing required fields, invalid values, unknown fields, and unchangedLinkDatavalidation. They use the Draft 4-compatible JSON Schema subset of these OpenAPI 3.0 models; this is not a claim of complete OpenAPI validation.Validation with Python 3.14.4, jsonschema 4.26.0, and PyYAML 6.0.3:
Only
swagger.yamland the focused regression test are changed. No dependency manifest or workflow changes are included.