covalent-highlight-nightly
covalent-highlight-nightly copied to clipboard
Custom routes
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.