How to handle ambiguous paths in the API spec #599
Labels
documentation
Improvements or additions to documentation
question
Further information is requested
tech debt
Technical Debt
Overview
How to handle ambiguous paths in the API spec?
As seen in the docs linting warnings when running
npm run docs
, we have some ambiguous/conflicting paths.Example:
In some cases, it's clear that the static path segments like
by-delivery-type
,experiements
etc. don't match with the format requirements of the path parameters likesiteId
(uuid),deliveryType
(enum).But it's still confusing and error prone, as routes have to be ordered top down from the most specific to the more dynamic in the API implementation, in order to have the proper behavior of the API implemented.
Details
OpenAPI spec v3.1.1 https://spec.openapis.org/oas/v3.1.1.html#patterned-fields mentions:
Proposed Actions
Come up with a recommendation so that we can avoid ambiguous paths in the future from the API design phase.
The text was updated successfully, but these errors were encountered: