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

Validator Handler should support different base url #178

Open
BalloonWen opened this issue Apr 8, 2021 · 1 comment
Open

Validator Handler should support different base url #178

BalloonWen opened this issue Apr 8, 2021 · 1 comment
Assignees

Comments

@BalloonWen
Copy link
Contributor

BalloonWen commented Apr 8, 2021

e.g. in the OpenAPI spec

servers:
- url: https://${host}/{path1}/{path2}/v1

the default baseUrl in OpenAPIHelper is "/{path1}/{path2}/v1", then whenever a request comes, it will match "/{path1}/{path2}/v1", then rewrite it to "/"
but if there is already a rewrite happening in between (e.g. rewrite by ingress), this will case the normalization fail


update
It is hard for the OpenAPIHelper to know which paths should be rewrite, thus, we should support relative server url

@BalloonWen BalloonWen self-assigned this Apr 8, 2021
BalloonWen added a commit that referenced this issue Apr 12, 2021
- support relative base url
BalloonWen added a commit that referenced this issue Apr 21, 2021
- will get base path from HandlerConfig and use that base path for normalizing paths
- deprecated the old normalized path constructor
BalloonWen added a commit that referenced this issue Apr 26, 2021
- enhanced tests
- fixed openapi was cached in different test classes
stevehu pushed a commit that referenced this issue Apr 26, 2021
* feat #178
- support relative base url

* issue #178
- will get base path from HandlerConfig and use that base path for normalizing paths
- deprecated the old normalized path constructor

* issue-#178
- enhanced tests
- fixed openapi was cached in different test classes
@stevehu
Copy link
Contributor

stevehu commented Apr 26, 2021

BalloonWen added a commit that referenced this issue Apr 26, 2021
- added handler.yml since now specification handler, validator handler, security handler would need base path from handler.yml
stevehu pushed a commit that referenced this issue Apr 26, 2021
- added handler.yml since now specification handler, validator handler, security handler would need base path from handler.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants