Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial support for tag-less JSON requests/responses #93

Merged
merged 1 commit into from
Dec 2, 2023

Conversation

vearutop
Copy link
Member

@vearutop vearutop commented Dec 2, 2023

Relates to #90, #91.

Such mode can be enabled with

r := openapi31.NewReflector()
r.JSONSchemaReflector().DefaultOptions = append(r.JSONSchemaReflector().DefaultOptions, jsonschema.ProcessWithoutTags)

Copy link

github-actions bot commented Dec 2, 2023

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 21 3844 (+34) 2864 (+28) 213 (+3) 767 (+3) 777 (+5) 88.9K (+793B)
Go (test) 19 5736 (+53) 4313 (+47) 660 763 (+6) 59 (+4) 149.7K (+1.1K)

Copy link

github-actions bot commented Dec 2, 2023

Go API Changes

# summary
Inferred base version: v0.2.42
Suggested version: v0.2.43

Copy link

github-actions bot commented Dec 2, 2023

Unit Test Coverage

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

Coverage of changed lines
File Function Coverage
Total 100.0%
openapi3/reflect.go 100.0%
openapi3/reflect.go:376 parseParametersIn 100.0%
openapi3/reflect.go:523 parseResponseHeader 100.0%
openapi31/reflect.go 100.0%
openapi31/reflect.go:328 parseParametersIn 100.0%
openapi31/reflect.go:474 parseResponseHeader 100.0%
internal/json_schema.go no coverage
Coverage diff with base branch
File Function Base Coverage Current Coverage
Total 42.2% 42.1% (-0.1%)
openapi3/reflect.go parseParametersIn 86.0% 84.9% (-1.1%)
openapi3/reflect.go parseResponseHeader 92.0% 91.3% (-0.7%)
openapi31/reflect.go parseParametersIn 82.5% 81.1% (-1.4%)
openapi31/reflect.go parseResponseHeader 88.5% 87.5% (-1.0%)
openapi31/reflect.go setupRequest 58.3% 66.7% (+8.4%)

Copy link

codecov bot commented Dec 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1763c57) 37.20% compared to head (d615fed) 36.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
- Coverage   37.20%   36.95%   -0.26%     
==========================================
  Files          14       14              
  Lines        6451     6419      -32     
==========================================
- Hits         2400     2372      -28     
+ Misses       3627     3622       -5     
- Partials      424      425       +1     
Flag Coverage Δ
unittests 36.95% <100.00%> (-0.26%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vearutop vearutop merged commit fb05447 into master Dec 2, 2023
7 of 8 checks passed
@vearutop vearutop deleted the json-tag-less branch December 2, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant