swaggest / openapi-go

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

Add more controls to ContentUnit #75

Closed vearutop closed 1 year ago

github-actions[bot] commented 1 year ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 14 2183 (+59) 1595 (+41) 139 (+5) 449 (+13) 433 (+21) 51.3K (+1.5K)
Go (test) 11 (+1) 3409 (+57) 2642 (+47) 333 434 (+10) 32 89.1K (+1.2K)
JSON 7 2230 2230 0 0 0 51K (+44B)
github-actions[bot] commented 1 year ago

Unit Test Coverage

total: (statements) 51.1% changed lines: (statements) 92.0%

Coverage of changed lines | File | Function | Coverage | |-------------------------|-----------------|----------| | Total | | 92.0% | | openapi3/helper.go | | 100.0% | | openapi3/helper.go:100 | AddOperation | 100.0% | | openapi3/reflect.go | | 89.5% | | openapi3/reflect.go:242 | setupRequest | 100.0% | | openapi3/reflect.go:695 | setupResponse | 80.6% | | operation.go | | 100.0% | | operation.go:50 | WithContentType | 100.0% | | operation.go:57 | WithHTTPStatus | 100.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |----------------------------------------------------|-----------------|---------------|------------------| | Total | | 50.9% | 51.1% (+0.2%) | | github.com/swaggest/openapi-go/openapi3/reflect.go | setupRequest | 50.0% | 58.3% (+8.3%) | | github.com/swaggest/openapi-go/openapi3/reflect.go | setupResponse | 84.2% | 83.3% (-0.9%) | | github.com/swaggest/openapi-go/operation.go | WithContentType | no function | 100.0% | | github.com/swaggest/openapi-go/operation.go | WithHTTPStatus | no function | 100.0% |
github-actions[bot] commented 1 year ago

Go API Changes

# github.com/swaggest/openapi-go
## compatible changes
ContentUnit.IsDefault: added
ContentUnitPreparer: added
WithContentType: added
WithHTTPStatus: added

# summary
Inferred base version: v0.2.36
Suggested version: v0.3.0
codecov[bot] commented 1 year ago

Codecov Report

Merging #75 (b6fef4e) into master (56b9d50) will decrease coverage by 0.19%. The diff coverage is 21.05%.

:exclamation: Current head b6fef4e differs from pull request most recent head dfca1eb. Consider uploading reports for the commit dfca1eb to get more accurate results

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
- Coverage   43.23%   43.04%   -0.19%     
==========================================
  Files           8        8              
  Lines        3819     3833      +14     
==========================================
- Hits         1651     1650       -1     
- Misses       1859     1872      +13     
- Partials      309      311       +2     
Flag Coverage Δ
unittests 43.04% <21.05%> (-0.19%) :arrow_down:

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

Files Changed Coverage Δ
operation.go 0.00% <0.00%> (ø)
openapi3/reflect.go 78.92% <26.66%> (-2.24%) :arrow_down:

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