swaggest / openapi-go

OpenAPI structures for Go
https://pkg.go.dev/github.com/swaggest/openapi-go/openapi3
MIT License
223 stars 18 forks source link

Fix reference schema to enable mutual exclusiveness #83

Closed vearutop closed 9 months ago

vearutop commented 9 months ago

Related to https://github.com/swaggest/openapi-go/discussions/82.

github-actions[bot] commented 9 months ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go (gen) 2 14244 (+37) 9794 (+24) 1212 (+3) 3238 (+10) 2034 (+6) 315K (+577B)
Go (test) 19 (+1) 5507 (+17) 4106 (+13) 660 741 (+4) 55 144.3K (+351B)
JSON 16 5556 (+1) 5556 (+1) 0 0 0 133.7K (+28B)
YAML 6 (+1) 438 (+76) 373 (+76) 29 36 0 13.3K (+1.6K)
github-actions[bot] commented 9 months ago

Go API Changes

# github.com/swaggest/openapi-go/openapi31
## incompatible changes
Reference.Ref: changed from *string to string
## compatible changes
(*Reference).UnmarshalJSON: added

# summary
Inferred base version: v0.2.39
Suggested version: v0.3.0
github-actions[bot] commented 9 months ago

Unit Test Coverage

total: (statements) 43.1% changed lines: (statements) 62.5%, coverage is less than 90.0%, consider testing the changes more thoroughly

Coverage of changed lines | File | Function | Coverage | |----------------------------|---------------|----------| | Total | | 62.5% | | openapi31/entities.go | | 62.5% | | openapi31/entities.go:1161 | UnmarshalJSON | 84.6% | | openapi31/entities.go:1137 | WithRef | 0.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |-------------------|------------------|---------------|------------------| | Total | | 39.7% | 43.1% (+3.4%) | | openapi31/yaml.go | UnmarshalYAML | 0.0% | 77.8% (+77.8%) | | openapi31/yaml.go | convertMapI2MapS | 0.0% | 75.0% (+75.0%) |
codecov[bot] commented 9 months ago

Codecov Report

Merging #83 (4e88c0f) into master (4643e77) will increase coverage by 2.32%. The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master      #83      +/-   ##
==========================================
+ Coverage   35.60%   37.92%   +2.32%     
==========================================
  Files          14       14              
  Lines        6542     6555      +13     
==========================================
+ Hits         2329     2486     +157     
+ Misses       3828     3637     -191     
- Partials      385      432      +47     
Flag Coverage Δ
unittests 37.92% <50.00%> (+2.32%) :arrow_up:

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

Files Coverage Δ
openapi31/entities.go 13.50% <50.00%> (+7.22%) :arrow_up:

... and 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more