Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In most cases your REST service will not only work with simple types but will also make use of complex types which are already defined as classed in your model. In this case you need to mark your classes with stereotype «OpenAPIType» and that’s it. Most likely you will also have some enumerations. Here it’s the same. Mark them with stereotype «OpenAPIEnumeration» and they will also be part of your OpenAPI specification.

When generating code for OpenAPI types JEAF Generator will also respect information about access type of properties (read-only, read-write and write-only). They can either be defined for OpenAPI only using stereotype «OpenAPI Property» or through UML standard fields (readOnly in UML) or through Java Validation annotations (Java Bean Validation Stereotypes).

As you can see in the diagram above also so called bean parameters are supported. Bean parameters can be used for REST services to group a set of parameters together e.g. you always have the same context parameters that are supported on requests.

...