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 new API url parameter to Config #17

Closed
wants to merge 6 commits into from

Conversation

Romamo
Copy link
Contributor

@Romamo Romamo commented Feb 7, 2025

Added API url parameter to Config because some specifications do not specify the full URL.

Example:

service_api = OpenAPIClient.from_spec(
    openapi_spec="https://petstore3.swagger.io/api/v3/openapi.json",
    url="https://petstore3.swagger.io/api/v3"
)

@Romamo Romamo marked this pull request as ready for review February 7, 2025 08:02
@Romamo Romamo changed the title new-config-host new-config-url Feb 7, 2025
@Romamo Romamo changed the title new-config-url Add new API url parameter to Config Feb 7, 2025
@vblagoje
Copy link
Owner

Good idea @Romamo - I'll fix the CI issue and take it over from here 🙏

@Romamo
Copy link
Contributor Author

Romamo commented Feb 13, 2025

I didn't tested but you can choose the server also:

service_api = OpenAPIClient.from_spec(
    openapi_spec="https://petstore3.swagger.io/api/v3/openapi.json",
    url=1
)

@vblagoje vblagoje self-requested a review February 13, 2025 13:15
Copy link
Owner

@vblagoje vblagoje left a comment

Choose a reason for hiding this comment

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

Left one naming suggestion. Cool if after your commit I push some tests on your branch and also remove the examples (at least for now)?

vblagoje added a commit that referenced this pull request Mar 6, 2025
* Added url to Config

* Added petstore3 example

* Fixed too-many-branches (PLR0912)

* Fixed I001 [*] Import block is un-sorted or un-formatted

* Renamed url to base_url

* Removed examples

* Update async as well

---------

Co-authored-by: Romamo <[email protected]>
@vblagoje
Copy link
Owner

vblagoje commented Mar 6, 2025

Superseded by #19
Closing

@vblagoje vblagoje closed this Mar 6, 2025
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