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

Path collision: Static vs dynamic route conflict in OpenAPI spec #2619

Open
JuicyLung91 opened this issue Oct 24, 2024 · 1 comment
Open

Comments

@JuicyLung91
Copy link

Hi Prism team,

We're encountering a routing issue with Prism where it can't distinguish between two similar paths:

/contracts/{contract_id}/items/{item_id}/{reference_date} — reference_date is an integer (e.g., year as 20230729).
/contracts/{contract_id}/items/{item_id}/notes — notes is a static string.
The problem is that Prism interprets "notes" as a value for reference_date, always matching the first path and returns a 422 with an error reference_date must be integer

Question:
Is there a way to configure Prism to handle static segments (like /notes) correctly, so they aren't treated as dynamic parameters? Or do we need to modify our OpenAPI spec to avoid this conflict?

Thanks for your help!

@JuicyLung91
Copy link
Author

It seems like it is already fixed in v5. My docker compose uses the v4. Is it true that it has already been fixed? Sorry for the confusion.

Can be closed.

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

1 participant