Skip to content

fix(openapiv3): tag YAML example scalars - #245

Merged
SebastienMelki merged 1 commit into
mainfrom
fix/openapiv3-example-yaml-tags
Aug 6, 2026
Merged

fix(openapiv3): tag YAML example scalars#245
SebastienMelki merged 1 commit into
mainfrom
fix/openapiv3-example-yaml-tags

Conversation

@SebastienMelki

Copy link
Copy Markdown
Owner

Summary

  • Tag OpenAPI YAML example scalar nodes according to schema type
  • Preserve string examples that look like numbers or timestamps as YAML strings
  • Apply the helper to scalar field examples, wrapper field examples, and header examples
  • Add regression coverage/goldens for direct scalar and wrapper string examples
  • Include minimal lint-only cleanups needed for make lint to pass

Fixes #244

Verification

  • make lint
  • go test -count=1 ./internal/openapiv3 ./internal/tsservergen ./internal/tsclientgen
  • go test -count=1 ./internal/openapiv3

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

🔍 CI Pipeline Status

Lint: success
Test: success
Coverage: success
Build: success
Integration: success


📊 Coverage Report: Available in checks above
🔗 Artifacts: Test results and coverage reports uploaded

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.58824% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.88%. Comparing base (fa45cf4) to head (bfa4e2a).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/openapiv3/types.go 69.23% 7 Missing and 1 partial ⚠️
internal/tsservergen/generator.go 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
+ Coverage   28.76%   28.88%   +0.12%     
==========================================
  Files          75       75              
  Lines       13146    13157      +11     
==========================================
+ Hits         3781     3800      +19     
+ Misses       9166     9160       -6     
+ Partials      199      197       -2     
Flag Coverage Δ
unittests 28.88% <70.58%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@SebastienMelki

Copy link
Copy Markdown
Owner Author

APPROVED

@SebastienMelki
SebastienMelki merged commit 9e14c24 into main Aug 6, 2026
10 checks passed
@SebastienMelki
SebastienMelki deleted the fix/openapiv3-example-yaml-tags branch August 6, 2026 12:43
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.

openapiv3: field_examples on string fields emit untagged YAML scalars, changing their type

1 participant