Skip to content

feat: report OpenAPI x-cli extension effects#348

Merged
danielgtaylor merged 2 commits into
mainfrom
feat/openapi-extension-warnings
May 28, 2026
Merged

feat: report OpenAPI x-cli extension effects#348
danielgtaylor merged 2 commits into
mainfrom
feat/openapi-extension-warnings

Conversation

@danielgtaylor
Copy link
Copy Markdown
Collaborator

@danielgtaylor danielgtaylor commented May 28, 2026

Summary

  • add an informational x-cli extension report for behavior-changing OpenAPI extensions
  • show compact summaries during api connect/api sync and detailed entries in doctor api JSON/text output
  • document the visibility behavior and trust-boundary decision

Supersedes and credits the original draft direction in #317.

Tests

  • env GOCACHE=/tmp/restish-gocache go test ./internal/spec ./internal/cli -run 'TestXCLIExtensionReportFindsBehaviorChangingExtensions|TestXCLIExtensionReportStopsAtIgnoredPath|TestAPIConnectPrintsXCLIExtensionSummary|TestAPISyncPrintsXCLIExtensionSummary|TestDoctorAPIReportsXCLIExtensionDetails'
  • env GOCACHE=/tmp/restish-gocache go test ./internal/spec ./internal/cli
  • env GOCACHE=/tmp/restish-gocache go test ./...
  • env GOCACHE=/tmp/restish-gocache go test -tags=integration ./...
  • env GOCACHE=/tmp/restish-gocache go run ./cmd/restish-docgen --check
  • hugo --source site --quiet --gc --minify --cacheDir /tmp/restish-hugo-cache

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds visibility into behavior-changing OpenAPI x-cli-* extensions so users can see how remote specs affect generated Restish commands.

Changes:

  • Adds XCLIExtensionReport generation, summary formatting, caching, and doctor API output.
  • Prints compact extension summaries during api connect and api sync.
  • Documents the reporting behavior and trust-boundary decision.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/spec/xcli_extensions.go Adds extension report extraction and summary generation.
internal/spec/xcli_extensions_test.go Adds unit tests for report extraction and ignored path behavior.
internal/spec/operation.go Adds extension report data to OperationSet.
internal/spec/cache.go Persists extension report data in operation cache.
internal/cli/xcli_extensions.go Adds CLI summary and doctor detail rendering helpers.
internal/cli/doctor.go Includes extension details in doctor API text and JSON reports.
internal/cli/api.go Prints extension summaries during connect and sync.
internal/cli/extensions_test.go Tests doctor API extension reporting.
internal/cli/api_manage_test.go Tests connect/sync summary output.
site/content/en/docs/reference/openapi-cli-integration.md Documents extension effect inspection.
site/content/en/docs/guides/api-setup-and-discovery.md Documents connect/sync summary visibility.
docs/design/030-security-model-and-trust-boundaries.md Documents trust-boundary treatment for x-cli-* metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/spec/xcli_extensions.go
Comment thread internal/spec/xcli_extensions.go
@danielgtaylor danielgtaylor merged commit b457573 into main May 28, 2026
7 checks passed
@danielgtaylor danielgtaylor deleted the feat/openapi-extension-warnings branch May 28, 2026 14:45
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.

2 participants