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

feat: support switching basepath #530

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tisonkun
Copy link

@tisonkun tisonkun commented Mar 11, 2024

This closes #452.

This supersedes #511.

Signed-off-by: tison <wander4096@gmail.com>
@@ -294,6 +294,11 @@ func (c *APIClient) prepareRequest(
return nil, err
}

// Prepend request base path, if applicable
if c.cfg.Path != "" {
Copy link
Author

@tisonkun tisonkun Mar 11, 2024

Choose a reason for hiding this comment

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

I can't make openapi locally so perhaps we still need some formatting here. But the code functions are proper.

./etc/generate-openapi.sh
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Error opening file "/api/contract/openapi/src/legacy/paths/query.yml" 
ENOENT: no such file or directory, open '/api/contract/openapi/src/legacy/paths/query.yml'
make: *** [openapi] Error 1

@@ -294,6 +294,11 @@ func (c *APIClient) prepareRequest(
return nil, err
}

// Prepend request base path, if applicable
if c.cfg.Path != "" {
url.Path = c.cfg.Path + url.Path
Copy link
Author

Choose a reason for hiding this comment

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

Better to handle / properly. I don't know if there is an existing utility for it. But users can always self add/remove the / on demand.

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.

Feature Request: Support specifying path prefix for InfluxDB URL
1 participant