Skip to content

Fixed flattening on circular $ref's with remote URL #67

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 1 commit into from
Feb 7, 2021

Conversation

fredbi
Copy link
Member

@fredbi fredbi commented Feb 7, 2021

Flatten no more attempts to set a default BasePath, and rely on go-openapi/spec
to set a defaut (cwd).

Tests

  • added Azure network spec and tested flattening, with or without expansion,
    from both local files and http remote.
  • beefed up assertions for this fixture, checking that all remaining $ref's
    actually resolve in the root document
  • re-enacted Appveyor CI for windows

Signed-off-by: Frederic BIDON [email protected]

@codecov
Copy link

codecov bot commented Feb 7, 2021

Codecov Report

Merging #67 (5445a00) into master (ae8c99d) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
- Coverage   90.41%   90.38%   -0.04%     
==========================================
  Files           7        6       -1     
  Lines        1555     1550       -5     
==========================================
- Hits         1406     1401       -5     
  Misses         98       98              
  Partials       51       51              
Impacted Files Coverage Δ
flatten.go 83.97% <100.00%> (-0.08%) ⬇️
internal/post_go18.go

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 ae8c99d...5445a00. Read the comment docs.

* fixes go-openapi#57 (supports URLs as basepath in all conditions)
* fixes go-openapi#66 (supports empty BasePath, defaults to current working directory)

Flatten no more attempts to set a default BasePath, and rely on go-openapi/spec
to set a defaut (cwd).

Tests
* added Azure network spec and tested flattening, with or without expansion,
  from both local files and http remote.
* beefed up assertions for this fixture, checking that all remaining $ref's
  actually resolve in the root document

* re-enacted Appveyor CI for windows
* Updated README

Signed-off-by: Frederic BIDON <[email protected]>
@fredbi fredbi marked this pull request as ready for review February 7, 2021 18:17
@fredbi fredbi requested a review from casualjim February 7, 2021 18:17
@fredbi fredbi merged commit fd90271 into go-openapi:master Feb 7, 2021
@fredbi fredbi deleted the fix-57 branch February 7, 2021 19:41
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.

Flatten fails when loading a spec from a local file Support URLs as base paths for schemas
1 participant