swaggest / jsonschema-go

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

Allow multiple definitions per Go type #98

Closed vearutop closed 12 months ago

github-actions[bot] commented 12 months ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 7 2291 (-3) 1551 (-3) 269 471 598 (-1) 55.2K (-29B)
github-actions[bot] commented 12 months ago

Go API Changes

# summary
Inferred base version: v0.3.61
Suggested version: v0.4.0
github-actions[bot] commented 12 months ago

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |----------------|----------|----------| | Total | | 100.0% | | reflect.go | | 100.0% | | reflect.go:630 | defName | 100.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |------------|----------|---------------|------------------| | Total | | 78.7% | 78.7% (0.0%) | | reflect.go | defName | 82.8% | 81.5% (-1.3%) |
codecov[bot] commented 12 months ago

Codecov Report

Merging #98 (7edf59c) into master (2251096) will decrease coverage by 0.05%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
- Coverage   73.74%   73.70%   -0.05%     
==========================================
  Files           7        7              
  Lines        1196     1194       -2     
==========================================
- Hits          882      880       -2     
  Misses        243      243              
  Partials       71       71              
Flag Coverage Δ
unittests 73.70% <100.00%> (-0.05%) :arrow_down:

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

Files Coverage Δ
reflect.go 84.10% <100.00%> (-0.06%) :arrow_down:

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

github-actions[bot] commented 12 months ago

Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta Schema_UnmarshalJSON_raw-2 73.4µs ± 2% 72.9µs ± 3% ~ (p=0.394 n=6+6) Schema_UnmarshalJSON-2 580µs ± 1% 579µs ± 0% ~ (p=0.690 n=5+5) Schema_MarshalJSON_raw-2 67.4µs ± 3% 66.7µs ± 0% ~ (p=0.177 n=6+5) Schema_MarshalJSON-2 241µs ± 0% 243µs ± 0% +0.95% (p=0.008 n=5+5) name old alloc/op new alloc/op delta Schema_UnmarshalJSON_raw-2 31.6kB ± 0% 31.6kB ± 0% ~ (p=0.682 n=6+6) Schema_UnmarshalJSON-2 184kB ± 0% 184kB ± 0% ~ (p=0.545 n=6+5) Schema_MarshalJSON_raw-2 21.9kB ± 0% 21.9kB ± 0% ~ (all equal) Schema_MarshalJSON-2 55.3kB ± 0% 55.3kB ± 0% ~ (p=0.403 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 72.9µs ± 3% Schema_UnmarshalJSON-2 579µs ± 0% Schema_MarshalJSON_raw-2 66.7µs ± 0% Schema_MarshalJSON-2 243µs ± 0% name alloc/op Schema_UnmarshalJSON_raw-2 31.6kB ± 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% ```