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

Automaticlly adding version to route breaks some routing configurations #57

Open
carnage opened this issue Jun 1, 2020 · 2 comments
Open

Comments

@carnage
Copy link

carnage commented Jun 1, 2020

Bug Report

Q A
Version(s) latest/all

Summary

When an API is set to use url versioning, the listener auto prepends the version segment into the route config however, it doesn't check the route TYPE. If the route type is anything other than Segment, it will break the routing and mean the route will never match.

How to reproduce

  1. Enable url versioning on a route.
  2. Set it's route type to Literal

Expected behavior

Suggest either automatically changing the route type to Segment or throwing an exception stating that the route must already be a segment route type.

@weierophinney weierophinney transferred this issue from laminas-api-tools/api-tools-versioning Jun 1, 2020
@weierophinney
Copy link
Contributor

Transferred this to the api-tools-admin repo, as this sort of check needs to happen during an admin operation.

Alternately, or potentially in addition to, we can add some functionality to api-tools-versioning to raise an exception when it encounters a non-Segment route.

@carnage
Copy link
Author

carnage commented Jun 10, 2020

The admin tool doesn't create routes which don't work; this happens if configuring manually and would also be an issue if you used the module as a stand alone so it definitely needs to raise an exception in the api-tools-versioning component.

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

No branches or pull requests

2 participants