Skip to content

fix: Allow relative references in all URLs #630

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
Jul 2, 2022

Conversation

jtv8
Copy link
Contributor

@jtv8 jtv8 commented Jun 10, 2022

Following up from #618 - this doesn't quite bring the library into compliance with the spec yet as this rule applies to all URLs.

https://swagger.io/specification/#relative-references-in-urls

Relative References in URLs
Unless specified otherwise, all properties that are URLs MAY be relative references as defined by RFC3986. Relative references are resolved using the URLs defined in the Server Object as a Base URI.

There aren't (as of 3.0.3) any exceptions defined to this, so this PR removes all uses of AnyUrl and replaces them with str.

@jtv8 jtv8 marked this pull request as ready for review June 10, 2022 14:46
Copy link
Collaborator

@dbanty dbanty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@dbanty dbanty added this to the 0.11.4 milestone Jul 2, 2022
@codecov
Copy link

codecov bot commented Jul 2, 2022

Codecov Report

Merging #630 (71ffef2) into main (82a9ad6) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #630   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         1713      1713           
=========================================
  Hits          1713      1713           
Impacted Files Coverage Δ
...n_client/schema/openapi_schema_pydantic/contact.py 100.00% <100.00%> (ø)
.../openapi_schema_pydantic/external_documentation.py 100.00% <100.00%> (ø)
...thon_client/schema/openapi_schema_pydantic/info.py 100.00% <100.00%> (ø)
...n_client/schema/openapi_schema_pydantic/license.py 100.00% <100.00%> (ø)
...lient/schema/openapi_schema_pydantic/oauth_flow.py 100.00% <100.00%> (ø)
.../schema/openapi_schema_pydantic/security_scheme.py 100.00% <100.00%> (ø)

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 82a9ad6...71ffef2. Read the comment docs.

@dbanty dbanty merged commit 3f1f951 into openapi-generators:main Jul 2, 2022
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