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

Feature: Enhance OpenAPI Specification by Structuring Endpoints Based on Entities for Improved Clarity and User Experience #2053

Open
arvindh123 opened this issue Jan 10, 2024 · 6 comments · May be fixed by #2195

Comments

@arvindh123
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Structuring endpoints based on entities rather than service-specific endpoints, the proposal seeks to streamline the understanding of functionalities related to specific entities, such as users, things, groups, channels, domains making it easier for users to navigate and comprehend the available API functionalities within a specific context.

Describe the feature you are requesting, as well as the possible use case(s) for it.

Structuring API endpoints not based on service-specific endpoints but rather on entities, For example, within the users.yml file, all endpoints would start with /users. Operations related to specific users, such as retrieving user tags (users/{userID}/tag), would be included here. However, I propose including additional endpoints, like /users/{userID}/things, which pertain to the things associated with a user, even if the things functionality resides in a different service.

By including such endpoints in the users.yml API specification, users interacting with this document will find it easier to understand as they would expect users.yml to provide comprehensive user-related functionalities, even if certain functionalities are fulfilled by other services.

Indicate the importance of this feature to you.

Must-have

Anything else?

No response

@arvindh123 arvindh123 self-assigned this Jan 10, 2024
@dborovcanin
Copy link
Collaborator

@arvindh123 Also, consider this option:absmach/magistrala-old#261 (comment)

@arvindh123
Copy link
Contributor Author

arvindh123 commented Jan 10, 2024

@dborovcanin , I agree with your idea absmach/magistrala-old#261 (comment)
I will check the possibilities in code and create a new issue

@dborovcanin
Copy link
Collaborator

@arvindh123 What's the plan with this one, should @Musilah start working on it, but with absmach/magistrala-old#261 (comment) in mind? I.e. we keep all the API grouped based on entity, but we also update API accordingly so we do not have confusing endpoints?

@arvindh123
Copy link
Contributor Author

I think @Musilah can start work on API docs. May be after release we can update API endpoint as per your idea in this comments.

@dborovcanin
Copy link
Collaborator

We should also consider just changing the endpoint names. I find grouping "per service" still relevant in case someone wants to integrate with Magistrala API (so knowing which service provides the API may be relevant).

@arvindh123
Copy link
Contributor Author

An Example case :

/groups/{groupID}/users/-> This is present in Users Service , but start with group
This need to changed to /users/groups/{groupID}

@dborovcanin dborovcanin modified the milestones: S3, S4 Apr 30, 2024
@dborovcanin dborovcanin modified the milestones: S4, S5 May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

4 participants