Git Product home page Git Product logo

Comments (4)

hasaziz avatar hasaziz commented on June 17, 2024

please do

from diffy.

puneetkhanduri avatar puneetkhanduri commented on June 17, 2024

That approach would work as long as your URLs don't have any path params. Unfortunately, most (or at least enough) services do have path params in their URL structures. This leads to a very bad situation where almost every request ends up creating an endpoint and your UI gets cluttered with multiple endpoints that actually represent the same controller method.

One feature we would love to see is to do some cardinality analysis on the request URL patterns to dynamically identify path params without knowing anything about the target's internal controller routing logic. e.g.

/user/1/name
/user/2/name
/user/3/name
...
might then be automatically collapsed to a single endpoint represented by:

/user/:path_param1/name

Without the ability to collapse endpoints the user experience degenerates very quickly which is why for the time being we require either the request to have a "Canonical-Resource" header or the responses from the targets to have and "X-Action-Name" header.

from diffy.

coderunner avatar coderunner commented on June 17, 2024

I agree that my suggestion was far from ideal.

I suggested it because I thought this was a slightly better default. I think my main concern was that the displayed text No_controller_reached seemed to indicate some errors which was confusing to me. I noticed that the README was updated, but I wonder if No_controller_reached should be renamed to something like Undefined_endpoint or Unnamed_endpoint?

from diffy.

puneetkhanduri avatar puneetkhanduri commented on June 17, 2024

Agreed. Undefined_endpoint sounds like a better choice than No_controller_reached. Please feel free to do the honors.

from diffy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.