swaggest / openapi-go

OpenAPI structures for Go
https://pkg.go.dev/github.com/swaggest/openapi-go/openapi3
MIT License
259 stars 23 forks source link

Preserve existing media type value during response parsing #118

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 21 3958 (-6) 2945 (-8) 214 799 (+2) 807 91K (-140B)
Go (test) 22 6381 (+178) 4875 (+160) 660 846 (+18) 61 (+2) 164.3K (+4.2K)
github-actions[bot] commented 4 months ago

Go API Changes

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

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |--------------------------|-------------------|----------| | Total | | 100.0% | | openapi3/reflect.go | | 100.0% | | openapi3/reflect.go:691 | parseJSONResponse | 100.0% | | openapi31/reflect.go | | 100.0% | | openapi31/reflect.go:642 | parseJSONResponse | 100.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |------------------------|-------------------|---------------|------------------| | Total | | 45.6% | 46.0% (+0.4%) | | openapi3/entities.go | WithContentItem | 0.0% | 100.0% (+100.0%) | | openapi3/entities.go | WithValue | 0.0% | 100.0% (+100.0%) | | openapi3/jsonschema.go | fromSchemaArray | 25.0% | 100.0% (+75.0%) | | openapi3/reflect.go | parseJSONResponse | 93.8% | 94.4% (+0.6%) | | openapi31/entities.go | WithContentItem | 0.0% | 100.0% (+100.0%) | | openapi31/entities.go | WithValue | 0.0% | 100.0% (+100.0%) | | openapi31/reflect.go | parseJSONResponse | 86.7% | 88.2% (+1.5%) |