swaggest / jsonschema-go

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

Add support for nullable items of maps and slices #22

Closed vearutop closed 3 years ago

github-actions[bot] commented 3 years ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 6 1337 948 114 275 388 30.5K (-38B)
Go (test) 7 1273 (+23) 969 (+20) 125 179 (+3) 17 33.6K (+542B)
YAML 6 359 (-1) 312 (-1) 31 16 0 11.4K (-14B)
github-actions[bot] commented 3 years ago

Exported API Changes Report

# summary
Inferred base version: v0.3.20
Suggested version: v0.3.21
github-actions[bot] commented 3 years ago

Unit Test Coverage

total: (statements) 70.1%

Coverage diff with base branch ```diff ```
codecov[bot] commented 3 years ago

Codecov Report

Merging #22 (d39c5cc) into master (db23b28) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #22   +/-   ##
=======================================
  Coverage   64.68%   64.68%           
=======================================
  Files           6        6           
  Lines         875      875           
=======================================
  Hits          566      566           
  Misses        251      251           
  Partials       58       58           
Flag Coverage Δ
unittests 64.68% <100.00%> (ø)

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

Impacted Files Coverage Δ
reflect.go 72.30% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update db23b28...d39c5cc. Read the comment docs.

github-actions[bot] commented 3 years ago

Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta Schema_UnmarshalJSON_raw-2 100µs ±15% 97µs ±11% ~ (p=0.421 n=5+5) Schema_UnmarshalJSON-2 742µs ± 2% 784µs ± 7% ~ (p=0.095 n=5+5) Schema_MarshalJSON_raw-2 106µs ± 7% 113µs ± 6% ~ (p=0.095 n=5+5) Schema_MarshalJSON-2 323µs ± 5% 340µs ± 6% ~ (p=0.056 n=5+5) name old alloc/op new alloc/op delta Schema_UnmarshalJSON_raw-2 31.7kB ± 0% 31.7kB ± 0% ~ (p=0.175 n=5+5) Schema_UnmarshalJSON-2 187kB ± 0% 187kB ± 0% ~ (p=0.556 n=4+5) Schema_MarshalJSON_raw-2 28.8kB ± 0% 28.8kB ± 0% ~ (p=1.000 n=5+4) Schema_MarshalJSON-2 53.8kB ± 0% 53.8kB ± 0% ~ (p=0.635 n=5+5) name old allocs/op new allocs/op delta Schema_UnmarshalJSON_raw-2 457 ± 0% 457 ± 0% ~ (all equal) Schema_UnmarshalJSON-2 1.94k ± 0% 1.94k ± 0% ~ (all equal) Schema_MarshalJSON_raw-2 621 ± 0% 621 ± 0% ~ (all equal) Schema_MarshalJSON-2 484 ± 0% 484 ± 0% ~ (all equal) ```