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

Recognize popular UUID types #120

Closed vearutop closed 1 week ago

github-actions[bot] commented 1 week ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 7 2395 (+11) 1633 (+8) 275 487 (+3) 632 (+1) 57.8K (+276B)
github-actions[bot] commented 1 week ago

Go API Changes

# summary
Inferred base version: v0.3.71
Suggested version: v0.3.72
github-actions[bot] commented 1 week ago

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |----------------|-----------------|----------| | Total | | 33.3% | | reflect.go | | 33.3% | | reflect.go:734 | isWellKnownType | 20.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |------------|-----------------|---------------|------------------| | Total | | 80.4% | 80.2% (-0.2%) | | reflect.go | isWellKnownType | 100.0% | 78.9% (-21.1%) |
github-actions[bot] commented 1 week ago

Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta Schema_UnmarshalJSON_raw-4 60.4µs ± 2% 59.8µs ± 0% ~ (p=0.082 n=6+5) Schema_UnmarshalJSON-4 478µs ± 0% 479µs ± 0% ~ (p=0.310 n=6+6) Schema_MarshalJSON_raw-4 43.3µs ± 0% 43.7µs ± 1% +1.02% (p=0.004 n=5+6) Schema_MarshalJSON-4 183µs ± 0% 182µs ± 0% ~ (p=0.247 n=5+6) name old alloc/op new alloc/op delta Schema_UnmarshalJSON_raw-4 31.7kB ± 0% 31.7kB ± 0% ~ (p=0.130 n=6+6) Schema_UnmarshalJSON-4 180kB ± 0% 180kB ± 0% ~ (p=0.545 n=6+5) Schema_MarshalJSON_raw-4 14.6kB ± 0% 14.6kB ± 0% ~ (p=0.545 n=6+5) Schema_MarshalJSON-4 53.9kB ± 0% 53.9kB ± 0% ~ (p=0.104 n=6+6) name old allocs/op new allocs/op delta Schema_UnmarshalJSON_raw-4 457 ± 0% 457 ± 0% ~ (all equal) Schema_UnmarshalJSON-4 1.85k ± 0% 1.85k ± 0% ~ (all equal) Schema_MarshalJSON_raw-4 370 ± 0% 370 ± 0% ~ (all equal) Schema_MarshalJSON-4 468 ± 0% 468 ± 0% ~ (all equal) ```
Benchmark result ``` name time/op Schema_UnmarshalJSON_raw-4 59.8µs ± 0% Schema_UnmarshalJSON-4 479µs ± 0% Schema_MarshalJSON_raw-4 43.7µs ± 1% Schema_MarshalJSON-4 182µs ± 0% name alloc/op Schema_UnmarshalJSON_raw-4 31.7kB ± 0% Schema_UnmarshalJSON-4 180kB ± 0% Schema_MarshalJSON_raw-4 14.6kB ± 0% Schema_MarshalJSON-4 53.9kB ± 0% name allocs/op Schema_UnmarshalJSON_raw-4 457 ± 0% Schema_UnmarshalJSON-4 1.85k ± 0% Schema_MarshalJSON_raw-4 370 ± 0% Schema_MarshalJSON-4 468 ± 0% ```