DEV Community

Discussion on: How will you structure REST APIs as an experienced engineer ?

Collapse
 
bopinto profile image
Bernardo Oliveira Pinto

Why not follow an MVC pattern? i.e. one Controller per Entity and, in that Controller, you put all the endpoints for that entity.
Btw, this is the way Swagger generates the stubs from the APIs you design.

Collapse
 
sharadcodes profile image
Sharad Raj (He/Him)

Many have recommended swagger.
Thanks for the reply