Skip to content

Conversation

@erraggy
Copy link
Owner

@erraggy erraggy commented Jan 24, 2026

Summary

Comprehensive documentation refresh addressing issues identified across the entire docs surface area — whitepaper, godoc, example tests, CLI reference, published docs, and build pipeline.

New Feature

  • overlay apply --dry-run / -n CLI flag — Preview overlay changes without modifying files, calling existing overlay.DryRunWithOptions() library API

Documentation Fixes

  • Whitepaper (docs/whitepaper.md): Version bump to v1.46.2, fixed ParseResult struct documentation (methods not fields), added golang.org/x/text dependency, added OperationContext field to ValidationError, new sections for v1.46.x features (operation context, FixTypeStubMissingRefs, empty schema preservation)
  • walker/doc.go: Added Built-in Collectors section documenting SchemaCollector, OperationCollector, CollectSchemas(), CollectOperations() with correct field names (ByName, All, PathTemplate, Operation.OperationID)
  • httpvalidator/doc.go: Added Path Matching section with correct API signatures (NewPathMatcherSet([]string)(template, params, found)), Response Validation section
  • validator/doc.go: Enhanced Operation Context section with code example
  • README.md: Fixed overlay apply flag ordering (flags before positional arg), added --dry-run example

New Example Tests

  • converter/example_test.go: Example_convertParsed (pre-parsed workflow), Example_upgradeOAS3 (3.0→3.1)
  • generator/example_test.go: Example_withParsedDocument (completed placeholder with real parse→generate)
  • httpvalidator/example_test.go: ExampleParamDeserializer (matrix/pipe/header styles), ExampleValidator_ValidateRequest_strictMode

CLI & Published Docs

  • docs/cli-reference.md: Fixed overlay section — removed ghost --overlay flag, added -n short flag, updated usage/output format
  • overlay/deep_dive.md: Added CLI dry-run to best practices section

Build Pipeline

  • scripts/prepare-docs.sh: Added copy_if_exists() helper, guarded fix_example_links/fix_subdir_links with [ -f ] || return 0, added GitHub absolute link transforms for docs site
  • mkdocs.yml: Added edit_uri: "" to prevent broken "Edit this page" links

Bug Fixes

  • handleOverlayDryRun now respects --quiet flag (was unconditionally writing diagnostics)
  • Fixed overlay apply README example: flags must precede positional arg per Go's flag package behavior

Test plan

  • go test -run Example ./... — all example tests pass
  • go_diagnostics on all modified Go files — no diagnostics
  • make check — 7912 tests pass, 0 failures
  • ./scripts/prepare-docs.sh — builds without warnings
  • go run ./cmd/oastools/ overlay apply --dry-run -s testdata/overlay/fixtures/petstore-base.yaml testdata/overlay/fixtures/petstore-overlay.yaml — produces expected output
  • Verified --quiet suppresses dry-run output

🤖 Generated with Claude Code

- Implement --dry-run/-n flag for overlay apply CLI command, calling
  existing DryRunWithOptions() library API with formatted output
- Fix whitepaper accuracy: version bump to v1.46.2, ParseResult struct
  (methods not fields), add golang.org/x/text dependency, add
  OperationContext field to ValidationError, new v1.46.x feature sections
- Enhance walker/doc.go with Built-in Collectors section (CollectSchemas,
  CollectOperations)
- Enhance httpvalidator/doc.go with Path Matching and Response Validation
  sections
- Add converter example tests: Example_convertParsed, Example_upgradeOAS3
- Complete generator Example_withParsedDocument with real parse→generate
  workflow
- Add httpvalidator examples: ExampleParamDeserializer,
  ExampleValidator_ValidateRequest_strictMode
- Fix cli-reference.md overlay section: correct syntax (positional arg),
  add -n short flag, update output format to match implementation
- Add copy_if_exists guard to prepare-docs.sh, add GitHub link transforms
- Add edit_uri: "" to mkdocs.yml to disable broken edit links
- Add CLI dry-run note to overlay deep_dive best practices

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.91%. Comparing base (a19bda9) to head (bd42f04).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #274      +/-   ##
==========================================
+ Coverage   84.83%   84.91%   +0.07%     
==========================================
  Files         156      156              
  Lines       24574    24574              
==========================================
+ Hits        20848    20866      +18     
+ Misses       2524     2509      -15     
+ Partials     1202     1199       -3     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@erraggy erraggy merged commit 2e6d6af into main Jan 24, 2026
7 checks passed
@erraggy erraggy deleted the docs/documentation-refresh branch January 24, 2026 06:07
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