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

Allow multiple Mount objects with the same prefix (fixes #2374) #2378

Closed
wants to merge 1 commit into from
Closed

Allow multiple Mount objects with the same prefix (fixes #2374) #2378

wants to merge 1 commit into from

Conversation

nicolaipre
Copy link

Summary

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

This is a proposed fix to solve #2374, similar to the proposed fix for Host() in #2263.

This allows users to have multiple Mount() objects with the same path/prefix set, but use a different name. In essence it allows users to have named route groups, allowing the Mount names to be used directly in the OpenAPI spec, etc...

@nicolaipre nicolaipre changed the title Allow multiple Mount objects with the same prefix - Fixes #2374 Allow multiple Mount objects with the same prefix (fixes #2374) Dec 17, 2023
@nicolaipre
Copy link
Author

After thinking this through with a clear mind it actually isn't necessary at all. I got so stuck in trying to figure out the other routing issues related to Host that I completely lost track of what I was actually trying to solve here.

It is good that it is the way it is now, because if you notice a route not resolving after putting it in a Mount() it is most likely that you have a duplicate Mount, which will let you know and keep your code clean.

Closing the PR and related discussion.

@nicolaipre nicolaipre closed this Dec 21, 2023
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.

1 participant