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

Add support for ptr receivers in (Raw)Exposer #101

Closed vearutop closed 7 months ago

github-actions[bot] commented 7 months ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 7 2316 (+23) 1568 (+16) 270 (+1) 478 (+6) 610 (+9) 55.7K (+420B)
Go (test) 13 3322 (+12) 2439 (+4) 308 (+3) 575 (+5) 51 83.2K (+185B)
github-actions[bot] commented 7 months ago

Go API Changes

# summary
Inferred base version: v0.3.62
Suggested version: v0.3.63
github-actions[bot] commented 7 months ago

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |----------------|------------------|----------| | Total | | 100.0% | | reflect.go | | 100.0% | | reflect.go:121 | checkSchemaSetup | 100.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |------------|------------------|---------------|------------------| | Total | | 78.7% | 79.0% (+0.3%) | | reflect.go | checkSchemaSetup | 85.7% | 91.2% (+5.5%) |
codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5420f7d) 73.70% compared to head (3fa086b) 73.98%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #101 +/- ## ========================================== + Coverage 73.70% 73.98% +0.28% ========================================== Files 7 7 Lines 1194 1207 +13 ========================================== + Hits 880 893 +13 Misses 243 243 Partials 71 71 ``` | [Flag](https://app.codecov.io/gh/swaggest/jsonschema-go/pull/101/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/101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest) | `73.98% <100.00%> (+0.28%)` | :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.

github-actions[bot] commented 7 months ago

Benchmark Result

Benchmark diff with base branch ``` Module github.com/bool64/dev not found, downloading. name old time/op new time/op delta Schema_UnmarshalJSON_raw-4 60.6µs ± 1% 61.2µs ± 4% ~ (p=0.240 n=6+6) Schema_UnmarshalJSON-4 498µs ± 0% 501µs ± 1% ~ (p=0.485 n=6+6) Schema_MarshalJSON_raw-4 49.4µs ± 0% 49.8µs ± 2% ~ (p=0.195 n=5+6) Schema_MarshalJSON-4 182µs ± 1% 182µs ± 1% ~ (p=0.792 n=6+5) name old alloc/op new alloc/op delta Schema_UnmarshalJSON_raw-4 31.6kB ± 0% 31.6kB ± 0% ~ (p=0.957 n=6+6) Schema_UnmarshalJSON-4 184kB ± 0% 184kB ± 0% ~ (all equal) Schema_MarshalJSON_raw-4 21.9kB ± 0% 21.9kB ± 0% ~ (p=0.675 n=6+6) Schema_MarshalJSON-4 55.4kB ± 0% 55.4kB ± 0% ~ (p=0.093 n=6+6) name old allocs/op new allocs/op delta Schema_UnmarshalJSON_raw-4 457 ± 0% 457 ± 0% ~ (all equal) Schema_UnmarshalJSON-4 2.00k ± 0% 2.00k ± 0% ~ (all equal) Schema_MarshalJSON_raw-4 484 ± 0% 484 ± 0% ~ (all equal) Schema_MarshalJSON-4 477 ± 0% 477 ± 0% ~ (all equal) ```
Benchmark result ``` name time/op Schema_UnmarshalJSON_raw-4 61.2µs ± 4% Schema_UnmarshalJSON-4 501µs ± 1% Schema_MarshalJSON_raw-4 49.8µs ± 2% Schema_MarshalJSON-4 182µs ± 1% name alloc/op Schema_UnmarshalJSON_raw-4 31.6kB ± 0% Schema_UnmarshalJSON-4 184kB ± 0% Schema_MarshalJSON_raw-4 21.9kB ± 0% Schema_MarshalJSON-4 55.4kB ± 0% name allocs/op Schema_UnmarshalJSON_raw-4 457 ± 0% Schema_UnmarshalJSON-4 2.00k ± 0% Schema_MarshalJSON_raw-4 484 ± 0% Schema_MarshalJSON-4 477 ± 0% ```