swaggest / jsonschema-go

JSON Schema mapping for Go
https://pkg.go.dev/github.com/swaggest/jsonschema-go
MIT License
102 stars 13 forks source link

Check for properties in deeply embedded pointer types #89

Closed vearutop closed 11 months ago

github-actions[bot] commented 11 months ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 6 2103 (+3) 1419 (+2) 254 430 (+1) 549 (+1) 51.3K (+95B)
Go (test) 12 2849 (+31) 2066 (+24) 289 494 (+7) 48 72.2K (+575B)
github-actions[bot] commented 11 months ago

Go API Changes

# summary
Inferred base version: v0.3.53
Suggested version: v0.3.54
github-actions[bot] commented 11 months ago

Unit Test Coverage

total: (statements) 78.4% changed lines: (statements) 100.0%

Coverage of changed lines | File | Function | Coverage | |----------------|----------------|----------| | Total | | 100.0% | | reflect.go | | 100.0% | | reflect.go:811 | walkProperties | 100.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |----------------------------------------------|----------------|---------------|------------------| | Total | | 78.3% | 78.4% (+0.1%) | | github.com/swaggest/jsonschema-go/reflect.go | walkProperties | 85.2% | 86.6% (+1.4%) |
codecov[bot] commented 11 months ago

Codecov Report

Merging #89 (d7c543b) into master (70f5984) will increase coverage by 0.31%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage   73.22%   73.53%   +0.31%     
==========================================
  Files           6        6              
  Lines        1124     1126       +2     
==========================================
+ Hits          823      828       +5     
+ Misses        233      232       -1     
+ Partials       68       66       -2     
Flag Coverage Δ
unittests 73.53% <100.00%> (+0.31%) :arrow_up:

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

Files Changed Coverage Δ
reflect.go 83.61% <100.00%> (+0.56%) :arrow_up:

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

github-actions[bot] commented 11 months ago

Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta Schema_UnmarshalJSON_raw-2 99.4µs ± 3% 99.1µs ± 4% ~ (p=0.937 n=6+6) Schema_UnmarshalJSON-2 740µs ± 2% 745µs ± 4% ~ (p=1.000 n=6+6) Schema_MarshalJSON_raw-2 91.0µs ± 3% 91.4µs ± 2% ~ (p=0.818 n=6+6) Schema_MarshalJSON-2 289µs ± 1% 292µs ± 2% ~ (p=0.240 n=6+6) name old alloc/op new alloc/op delta Schema_UnmarshalJSON_raw-2 31.7kB ± 0% 31.7kB ± 0% ~ (p=0.496 n=6+6) Schema_UnmarshalJSON-2 184kB ± 0% 184kB ± 0% ~ (p=0.455 n=6+6) Schema_MarshalJSON_raw-2 21.9kB ± 0% 21.9kB ± 0% ~ (all equal) Schema_MarshalJSON-2 55.3kB ± 0% 55.3kB ± 0% ~ (p=0.632 n=6+6) name old allocs/op new allocs/op delta Schema_UnmarshalJSON_raw-2 457 ± 0% 457 ± 0% ~ (all equal) Schema_UnmarshalJSON-2 2.00k ± 0% 2.00k ± 0% ~ (all equal) Schema_MarshalJSON_raw-2 484 ± 0% 484 ± 0% ~ (all equal) Schema_MarshalJSON-2 477 ± 0% 477 ± 0% ~ (all equal) ```
Benchmark result ``` name time/op Schema_UnmarshalJSON_raw-2 99.1µs ± 4% Schema_UnmarshalJSON-2 745µs ± 4% Schema_MarshalJSON_raw-2 91.4µs ± 2% Schema_MarshalJSON-2 292µs ± 2% name alloc/op Schema_UnmarshalJSON_raw-2 31.7kB ± 0% Schema_UnmarshalJSON-2 184kB ± 0% Schema_MarshalJSON_raw-2 21.9kB ± 0% Schema_MarshalJSON-2 55.3kB ± 0% name allocs/op Schema_UnmarshalJSON_raw-2 457 ± 0% Schema_UnmarshalJSON-2 2.00k ± 0% Schema_MarshalJSON_raw-2 484 ± 0% Schema_MarshalJSON-2 477 ± 0% ```