Skip to content

Feature Request: Support Camel Case Access for Snake Case API Endpoints in Eden #525

Open
@DoK6n

Description

@DoK6n

What is the problem this feature would solve?

When using Eden for frontend development, we currently have to access snake case API endpoints in a bracket notation, like api['sign-in'].post. This is because the endpoints are defined in snake case, such as '/sign-in'. It would be greatly beneficial if Eden could automatically convert these snake case endpoints to camel case, allowing us to use a more JavaScript-friendly syntax like api.signIn.post.

What is the feature you are proposing to solve the problem?

For example

before:

const { data, status } = await api['emergency-info']['available-beds'].get()

after:

const { data, status } = await api.emergencyInfo.availableBeds.get()
// or
const { data, status } = await api['emergency-info']['available-beds'].get()

This feature would maintain the original snake case routing on the backend while providing a more convenient and idiomatic way to access these endpoints on the frontend. Is there a way to implement this functionality, keeping the API routes in snake case as they are?

What alternatives have you considered?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions