Create specification for REST API in Enterprise Architect

My client wants me to create a specification for the future REST API using Enterprise Architect (SparxSystems). Delivered text should be well formatted (can be html, docx or rtf). The class diagram should give an image of the message body.

The only thing I have found so far is https://github.com/bayeslife/api-add-in , a plugin for EA to create RAML and much more. Does anyone have a better approach?

+8
rest documentation-generation uml enterprise-architect
source share
3 answers

Sander Hoogendoorn's “Microservice Modeling” presentation contains some interesting slides about REST API modeling in Enterprise Architect. The presentation is available at slideshare.net . The most interesting slide is slide number 75. Here is the image shown on this slide:

Class model of REST service

(Class and attribute names are given in Dutch. Verklaring means a declaration, and Verklaringen means a declaration. But the business behind this example does not matter.)

It would be nice if someone had a plug-in for Enterprise Architect to convert these class diagrams into Swagger specifications (Open API specifications).

+6
source share

I recommend using the postmanerator service, which generates documentation for the API, automatically just saves the API calls to postman in the collection and passes this collector to this service, it generates documentation for the postmanerator link: postmanerator

I hope my answer will be helpful

0
source share

I am currently using Enterprise Architect to model the API. For these projects, you have users who are given a budget to purchase certain products. The model is not yet complete, but I am adding it here as a reference.

In EA, I added some additional stereotypes: path, resource, and view + the new ParamQuery data type.

To model the API, you create a new class diagram and start from the root of your API as the class of the stereotype "Application". Then you add your resources and paths. For each resource you add the necessary operations GET, POST, PUT, etc. If QueryParams are passed in a string for GET operations, you add them as parameters for the operation, but as a QueryParam type (you must create it for the first time). For the body of the POST operations message, you add a parameter to the type of class that it represents.

Then you add the "view" classes used by the Resources.

enter image description here

0
source share

All Articles