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

Fix default parsing #110

Closed vearutop closed 4 months ago

github-actions[bot] commented 4 months ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 7 2335 (-21) 1583 (-12) 275 477 (-9) 615 (-5) 56.7K (-200B)
Go (test) 13 3485 (+31) 2574 (+25) 308 603 (+6) 51 87.4K (+691B)
github-actions[bot] commented 4 months ago

Go API Changes

# summary
Inferred base version: v0.3.66
Suggested version: v0.3.67
github-actions[bot] commented 4 months ago

Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta Schema_UnmarshalJSON_raw-4 60.9µs ± 2% 60.5µs ± 1% ~ (p=0.429 n=6+5) Schema_UnmarshalJSON-4 487µs ± 0% 488µs ± 0% ~ (p=0.180 n=6+6) Schema_MarshalJSON_raw-4 43.7µs ± 0% 43.3µs ± 1% -0.91% (p=0.002 n=6+6) Schema_MarshalJSON-4 184µs ± 0% 184µs ± 0% ~ (p=0.792 n=5+6) name old alloc/op new alloc/op delta Schema_UnmarshalJSON_raw-4 31.7kB ± 0% 31.7kB ± 0% ~ (p=0.890 n=6+6) Schema_UnmarshalJSON-4 180kB ± 0% 180kB ± 0% ~ (all equal) Schema_MarshalJSON_raw-4 14.6kB ± 0% 14.6kB ± 0% ~ (p=1.000 n=6+6) Schema_MarshalJSON-4 53.9kB ± 0% 53.9kB ± 0% ~ (p=0.268 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 60.5µs ± 1% Schema_UnmarshalJSON-4 488µs ± 0% Schema_MarshalJSON_raw-4 43.3µs ± 1% Schema_MarshalJSON-4 184µ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% ```
github-actions[bot] commented 4 months ago

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |-----------------|------------------|----------| | Total | | 81.8% | | reflect.go | | 81.8% | | reflect.go:1115 | checkInlineValue | 92.2% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |------------|------------------|---------------|------------------| | Total | | 79.2% | 79.3% (+0.1%) | | reflect.go | checkInlineValue | 86.8% | 92.3% (+5.5%) |
codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 81.81818% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 74.54%. Comparing base (57ddbd6) to head (b61051e).

Files Patch % Lines
reflect.go 81.81% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #110 +/- ## ========================================== + Coverage 74.16% 74.54% +0.38% ========================================== Files 7 7 Lines 1223 1218 -5 ========================================== + Hits 907 908 +1 + Misses 244 243 -1 + Partials 72 67 -5 ``` | [Flag](https://app.codecov.io/gh/swaggest/jsonschema-go/pull/110/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/swaggest/jsonschema-go/pull/110/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest) | `74.54% <81.81%> (+0.38%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.