visola / go-proxy

A proxy to help with local development in the microservices world
MIT License
18 stars 2 forks source link

Sort endpoints by specificity #27

Closed visola closed 4 years ago

visola commented 4 years ago

User Story

As a user I want my endpoints to match by specificity.

Descritpion

To define specificity, first we need to define a few things:

With the previous definitions in place, specificity is defined by sorting the array of all available endpoints by the following criteria:

  1. The ones with most number of path parts first
  2. After this doesn't actually matter, but for stability, they will be then sorted alphabetically by each path.

Acceptance Criteria