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

Recognize []byte as base64 string #119

Closed vearutop closed 3 months ago

github-actions[bot] commented 3 months ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 7 2384 (+8) 1625 (+6) 275 484 (+2) 631 (+2) 57.5K (+151B)
Go (test) 13 4086 (+39) 3031 (+31) 311 (+1) 744 (+7) 51 103.8K (+1.1K)
github-actions[bot] commented 3 months ago

Go API Changes

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

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |----------------|-----------------|----------| | Total | | 100.0% | | reflect.go | | 100.0% | | reflect.go:734 | isWellKnownType | 100.0% |
Coverage diff with base branch No changes in coverage.
github-actions[bot] commented 3 months ago

Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta Schema_UnmarshalJSON_raw-4 61.9µs ± 1% 62.1µs ± 1% ~ (p=0.329 n=6+5) Schema_UnmarshalJSON-4 500µs ± 1% 501µs ± 0% ~ (p=0.537 n=6+5) Schema_MarshalJSON_raw-4 44.7µs ± 1% 45.2µs ± 1% +1.00% (p=0.015 n=6+6) Schema_MarshalJSON-4 189µs ± 0% 190µs ± 1% ~ (p=1.000 n=6+6) name old alloc/op new alloc/op delta Schema_UnmarshalJSON_raw-4 31.7kB ± 0% 31.7kB ± 0% ~ (p=0.885 n=6+6) Schema_UnmarshalJSON-4 180kB ± 0% 180kB ± 0% ~ (p=0.455 n=6+6) Schema_MarshalJSON_raw-4 14.6kB ± 0% 14.6kB ± 0% -0.00% (p=0.030 n=6+5) Schema_MarshalJSON-4 53.9kB ± 0% 53.9kB ± 0% ~ (p=0.143 n=5+4) 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 62.1µs ± 1% Schema_UnmarshalJSON-4 501µs ± 0% Schema_MarshalJSON_raw-4 45.2µs ± 1% Schema_MarshalJSON-4 190µs ± 1% 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% ```