Skip to content

Add typed error details schema and deprecated-command error warnings#314

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
feat/typed-error-details
Jun 30, 2026
Merged

Add typed error details schema and deprecated-command error warnings#314
AndreyVMarkelov merged 1 commit into
masterfrom
feat/typed-error-details

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Close error.schema.json details with additionalProperties: false and add typed properties for all known detail keys (argument, arguments, flag, flags, value, path, token_type, login_command, env_var, api_summary, api_endpoint, bytes_written)
  • Emit deprecated_command warning in JSON error responses for deprecated commands (consistent with success responses)
  • Add live integration tests that run real command functions with mocked backends and validate output against the public schemas
  • Add negative tests confirming the closed error schema rejects unknown keys and invalid types

Test plan

  • go test ./... passes
  • golangci-lint run clean
  • Existing TestDeprecatedShareListLinkJSON* tests pass with updated command setup
  • New TestLiveJSONSuccessOutputsValidateAgainstPublicCommandSuccessSchema validates version, ls, put, share-link list
  • New TestLiveJSONErrorOutputsValidateAgainstPublicErrorSchema validates invalid args and deprecated command errors
  • New TestJSONErrorSchemaRejectsUnknownDetailsKey and TestJSONErrorSchemaRejectsInvalidDetailsType confirm closed schema

Close error.schema.json details with additionalProperties: false and add
typed properties for all known detail keys including bytes_written.
Emit deprecated_command warning in JSON error responses for deprecated
commands. Add live integration tests validating real command output
against the public schemas.
@AndreyVMarkelov AndreyVMarkelov merged commit 2239d9d into master Jun 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant