Add DELETE /v2.2/files/{id} to OpenAPI v2.2 - #46
Merged
Merged
Conversation
Aligns OpenAPI v2.2 with jackfruit PR #1556 by documenting hard deletion of a processing result and associated trace, with 204/401 responses and no modeled 401 body for this route. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Aug 30, 2026
rferreira
added a commit
to scanii/scanii-php
that referenced
this pull request
Aug 31, 2026
….0) (#142) * feat: add delete and deleteTrace for split result/trace deletion (6.4.0) Propagates the openapi v2.2 delete endpoints (scanii/openapi#46, #48) to scanii-php, following the naming locked by scanii-java and the translation pattern already shipped in dotnet 7.3.x, go 2.3.0, node 1.5.0 and rust 1.4.0. - Add ScaniiClient::delete(string $id): void — DELETE /v2.2/files/{id}; removes the processing result only, leaving the trace readable - Add ScaniiClient::deleteTrace(string $id): void — DELETE /v2.2/files/{id}/trace; removes the trace only, leaving the result readable - Both throw ScaniiException on 404 (also returned by a repeated delete of the same id) and ScaniiAuthException on 401/403, via the existing throwForStatus - void return matches the existing deleteAuthToken precedent in this SDK rather than Java's boolean, which encodes nothing a thrown error does not already - README: API table rows grouped with the other /files methods, plus a note that the two deletes are independent - ScaniiClient::VERSION -> 6.4.0; no composer.json version field — Packagist reads from git tags Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * refactor: return bool from delete and deleteTrace to match Java Mirrors scanii-java's `boolean delete(String)` / `boolean deleteTrace(String)` rather than following this SDK's local `deleteAuthToken(): void` precedent. The Java reference wins per CLAUDE.md §6 — return types do not diverge from it. As in Java, the value is always true; any non-204 throws before the return. Both integration tests now assert it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
rferreira
added a commit
to scanii/scanii-python
that referenced
this pull request
Aug 31, 2026
* feat: add delete and delete_trace for split result/trace deletion (1.1.0) Propagates the openapi v2.2 delete endpoints (scanii/openapi#46, superseded by #48) to scanii-python, following the naming locked by scanii-java and the translation pattern shipped in dotnet 7.3.x, go 2.3.0, node 1.5.0, rust 1.4.0 and php 6.4.0. - ScaniiClient.delete(id) -> bool — DELETE /v2.2/files/{id}; removes the processing result only, leaving the trace readable - ScaniiClient.delete_trace(id) -> bool — DELETE /v2.2/files/{id}/trace; removes the trace only, leaving the result readable - bool return mirrors scanii-java and this SDK's existing delete_auth_token - Both raise ScaniiError on 404 (also returned by a repeated delete of the same id) and ScaniiAuthError on 401/403, via the existing _raise_for_status - Version 1.0.1 -> 1.1.0 in pyproject.toml and src/scanii/_version.py (kept in sync per CLAUDE.md §6) Tests: 6 integration tests hard-asserting the split semantics against scanii-cli, plus 9 unit tests covering verb, path, id url-encoding, and the 403/404 error mapping. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: drop the "v2.2 preview" designation from retrieve_trace and process_from_url The v2.2 spec only ever marked GET /files/{id}/trace as preview — the `location` parameter behind process_from_url was listed as a plain 2.2 feature, so labelling it preview was drift introduced during the v2.2 propagation. The trace endpoint's preview marking is being dropped from the contract as well (openapi v22.yaml), so neither method carries it now. Docs only — no behavior, signature or return-type change. - Removed the preview paragraph from retrieve_trace() and process_from_url() docstrings and from the ScaniiTraceResult model docstring - Folded the README's "v2.2 preview methods" section into the file-scanning table; both methods are now ordinary rows - Historical CHANGELOG entries left as-is; 1.1.0 records the change Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
rferreira
added a commit
to scanii/scanii-ruby
that referenced
this pull request
Aug 31, 2026
* feat: add delete and delete_trace; drop preview language (1.4.0) Final leg of the delete fan-out. Propagates the openapi v2.2 delete endpoints (scanii/openapi#46, superseded by #48), following the naming locked by scanii-java and the pattern shipped in dotnet, go, node, rust, php and python. - Scanii::Client#delete(id) — DELETE /v2.2/files/{id}; removes the processing result only, leaving the trace readable - Scanii::Client#delete_trace(id) — DELETE /v2.2/files/{id}/trace; removes the trace only, leaving the result readable - Both return true on 204, matching #delete_auth_token and Java's boolean, and raise Scanii::Error on 404 / Scanii::AuthError on 401,403 via raise_for_status Also drops the "v2.2 preview" designation from retrieve_trace and process_from_url (README, RDoc, TraceResult, test section comments). The spec only ever marked the trace GET as preview, and that marking has now been removed from the contract itself (scanii/openapi#49). Docs only — no behavior change. Historical CHANGELOG entries left intact. VERSION 1.3.1 -> 1.4.0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix: encode path segments with encode_uri_component, not the form encoder Not part of the delete work — separated so it can be dropped independently. url_encode fed every id-taking method through URI.encode_www_form_component, which renders a space as "+". That is correct for a form body and wrong in a path, where "+" is a literal plus: delete("a b") requested /files/a+b, so the server would look up the id "a+b". URI.encode_uri_component gives %20. Surfaced by a url-encoding assertion added for #delete. Affects retrieve, retrieve_trace, delete, delete_trace, retrieve_auth_token and delete_auth_token equally. Not reachable with server-generated ids, which are hex. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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
DELETE /v2.2/files/{id}withoperationId: deleteFile204 No Contentand401 Bad credentialsValidation
vacuum lint -d --no-style src/v22.yamlnpx --yes @openapitools/openapi-generator-cli validate --recommend -i src/v22.yaml