By using the Representational State Transfer (REST) or Java™ API for RESTful Web Services (JAX-RS) template models or Swagger template models, you can
create a UML model that has the corresponding profile applied and reference library elements
imported so that you can model REST web service elements, JAX-RS elements, or Swagger elements.
Before you begin
To model Rest web services, you must have
the REST Modeling capability enabled. To model JAX-RS-specific design capabilities by using
stereotypes in the JAX-RS profile, you must have the JAX-RS Modeling capability
enabled.
Procedure
- Click .
- On the Create Model page, click Standard
template; then click Next.
- On the next Create Model page, in
the Categories pane, click REST Modeling, and
in the Templates pane, complete one of the following steps:
- To create a REST model, click REST Service Model.
If you select this option, the generated model has the REST profile
applied.
- To create a JAX-RS REST model, click JAX-RS Service
Model. If you select this option, the generated model
has both the REST and JAX-RS profiles applied, and it imports the
JAX-RS reference library.
- To create a Swagger REST model, click REST Service Model (Swagger).
If you select this option, the generated model has both REST and Swagger profiles applied and it
imports the Swagger reference library.
- To create a OpenAPI3 REST model, click REST Service Model (OpenAPI3).
If you select this option, the generated model has both REST and Swagger profiles applied and it
imports the OpenAPI3 reference library.
Tip: If these templates are not displayed, select
the Show All Templates check box.
- In the File name field, type a name
for the model and browse to a destination folder.
- Click Finish.
Results
The new model is created and displayed in the
Project Explorer view.
The new model and its default diagram are opened for editing. You can now model REST web service
model elements, domain-specific JAX-RS elements, or Swagger elements.