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

Support servers in path macro #1293

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

infiniteregrets
Copy link

@infiniteregrets infiniteregrets commented Jan 15, 2025

Hi! Just want to say thanks for developing this amazing library. I realized that this piece was missing as per these docs https://swagger.io/docs/specification/v3_0/api-host-and-base-path/ and is my use case to be able to override the servers.
I see it is available in the corresponding trait but not the macro, so adding it here.

Very much a WIP, will test and add a few more commits later

@infiniteregrets infiniteregrets marked this pull request as draft January 15, 2025 22:50
@infiniteregrets infiniteregrets marked this pull request as ready for review January 16, 2025 01:37
Comment on lines +35 to +36
server.url = parse_utils::parse_next_literal_str_or_expr(&server_stream)?
}
Copy link
Author

@infiniteregrets infiniteregrets Jan 16, 2025

Choose a reason for hiding this comment

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

rest of the impl is copied, I think URLs can be common amongst paths, so changing it to LitStrOrExpr just like how tags work!

Copy link
Owner

Choose a reason for hiding this comment

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

Yup, that's fine

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