Skip to content

Ref in paths / responses / parameters: flatten $ref in Paths (covers skip schemas) #111

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

Merged
merged 7 commits into from
Nov 26, 2020

Conversation

fredbi
Copy link
Member

@fredbi fredbi commented Dec 24, 2019

This covers the case of $ref's under Path, with some schemas inside. Previous PR #110 did not rebase correctly non-expanded $refs when flatten skips schema expansion.

NOTE: had to add some quick patches to keep things working on windows, although we know that windows support for $ref is still patchy at the moment (see issue #97)

@codecov
Copy link

codecov bot commented Dec 24, 2019

Codecov Report

Merging #111 (622c0ac) into master (81c4553) will increase coverage by 0.34%.
The diff coverage is 70.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
+ Coverage   58.42%   58.76%   +0.34%     
==========================================
  Files          25       25              
  Lines        1912     1928      +16     
==========================================
+ Hits         1117     1133      +16     
+ Misses        615      614       -1     
- Partials      180      181       +1     
Impacted Files Coverage Δ
normalizer.go 80.88% <60.00%> (-3.87%) ⬇️
expander.go 71.18% <80.00%> (+0.59%) ⬆️
ref.go 40.54% <0.00%> (-2.71%) ⬇️
schema.go 29.75% <0.00%> (+2.92%) ⬆️

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 81c4553...622c0ac. Read the comment docs.

@fredbi fredbi force-pushed the fix-2113-skip-schemas branch 2 times, most recently from af319ff to 35332c9 Compare December 24, 2019 15:20
@fredbi fredbi changed the title Fix 2113 skip schemas Fix go-swagger/go-swagger#2113 -- flatten $ref in Paths (covers skip schemas) Dec 24, 2019
@fredbi fredbi force-pushed the fix-2113-skip-schemas branch from 35332c9 to 1a169ef Compare November 17, 2020 08:23
@fredbi fredbi marked this pull request as ready for review November 17, 2020 08:23
@fredbi fredbi force-pushed the fix-2113-skip-schemas branch from 1a169ef to 4c01586 Compare November 17, 2020 10:17
* added some quick patches to keep things running on windows: a more elaborate
  approach is still needed to fully support file $ref on windows

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@fredbi fredbi force-pushed the fix-2113-skip-schemas branch from 4c01586 to cf8db28 Compare November 24, 2020 14:08
@fredbi fredbi marked this pull request as draft November 24, 2020 14:55
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@fredbi fredbi changed the title Fix go-swagger/go-swagger#2113 -- flatten $ref in Paths (covers skip schemas) Ref in paths / responses / parameters: flatten $ref in Paths (covers skip schemas) Nov 25, 2020
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@fredbi fredbi marked this pull request as ready for review November 25, 2020 17:24
@fredbi fredbi requested a review from casualjim November 25, 2020 18:31
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@fredbi fredbi merged commit d0486ac into go-openapi:master Nov 26, 2020
@fredbi fredbi deleted the fix-2113-skip-schemas branch November 26, 2020 07:25
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.

2 participants