UML / API: How to Model a RESTful API

I need to create a UML class diagram and usage diagram for RESTFul API which I developed using the API framework and Symfony 3.2 (backend) and Ionic 2 (frontend). But I don't know exactly how to describe the structure of my backend API through a class diagram.

If anyone has any idea or can provide any help, I would really appreciate it. Thank!

+3


source to share


2 answers


The Api Platform automatically generates Swagger documentation for your API by URL http://localhost/docs.json

.



You can create UML diagram from Swagger documentation with tools like https://github.com/nrekretep/pikturr

+2


source


So the solution to my problem was as follows:

https://www.ibm.com/developerworks/rational/library/design-implement-restful-web-services/ : In conclusion, I concluded that although for a class diagram (since it's basically just a bunch of methods) it is difficult to modify the reverse api, consider classes like "Ressources", add methods (mostly HTTP methods) and paths for each source.

This was of immense help as well:



Another (easier) way was to use tools like Pikturr that turn your Swagger into a UML diagram.

REST API design software:

  • Visual paradigm
  • IBM Rational Software Architect

Hope this helps.

+3


source







All Articles