Skip to content

Comments

Support servers in path macro#1293

Open
infiniteregrets wants to merge 3 commits intojuhaku:masterfrom
infiniteregrets:server-in-path
Open

Support servers in path macro#1293
infiniteregrets wants to merge 3 commits intojuhaku:masterfrom
infiniteregrets:server-in-path

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

Copy link
Owner

@juhaku juhaku left a comment

Choose a reason for hiding this comment

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

Great work, only missing CHANGELOG entry, but I can also add that, and this is good to go. 👍

@infiniteregrets
Copy link
Author

@juhaku any update on this?

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