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

Custom routes #37

Open
aciccarello opened this issue Dec 14, 2017 · 0 comments
Open

Custom routes #37

aciccarello opened this issue Dec 14, 2017 · 0 comments

Comments

@aciccarello
Copy link

Feature Request

There should be a way to configure custom route mapping. These would translate an incoming URL to one that matches the covalent-data structure

Code snippets if applicable

Possible configuration

/api/*: /$1
/user: /users/1
"/records/:id/header": "/headers/:id"

What is the expected behavior?

Should be able to define configurations to

  • Map all requests of a path to the base path
  • Map an endpoint to a specific record
  • Map requests with an id (or multiple path variables) to a request using that or those variables

What is the motivation / use case for changing the behavior?

Not all apis will conform to the structure encouraged by covalent-data. This would provide an easy way to implement more difficult api structures without creating convoluted schema structures.

Other information

(e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)
See the (json-server configuration](https://github.com/typicode/json-server#add-custom-routes) for an existing implementation.

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