Generating OpenAPI Specifications from JADE REST APIs
You can generate OpenAPI specifications from JADE REST APIs, which enables you to automatically generate descriptions for all of the methods that are part of the API and any classes that are required by the API. In addition, you can customize descriptive elements such as the info section.
Use the JADE OpenAPI Generation Wizard to generate an OpenAPI specification from a JADE REST class and any additional documentation set in the wizard. To open the wizard for a REST class, click the Generate OpenAPI button on the Web Options sheet of the Define Application dialog, shown in the following image.
The OpenAPI Generation Wizard is then opened for the class selected in the Rest Service Class list box. There are four steps in the wizard, but all information required for the generation of a valid OpenAPI specification can be determined from the definition of the REST class and any entities that reference it, so it has valid default values.
The default value of "/" for the "servers" section is valid for the OpenAPI specification but not sufficient to allow a consumer of the specification to access your REST API. You can set the server value by including it in the documentation text of the REST API class (see "Setting Default Values for API Documentation Information") or on the Servers sheet of the OpenAPI Generation Wizard (see "Specifying or Maintaining the Server Descriptions").
You can click:
-
The Generate button at any time on a sheet of the wizard to open the OpenAPI Specification dialog in which you can review the generated OpenAPI specification. Product information of prior releases did not document
-
The Reset button on a sheet of the wizard if you want to reset the content of controls to their default values. For details about the tags for REST class API documentation, see "Setting Default Values for API Documentation Information", elsewhere in this chapter.
-
On any sheet of the wizard to navigate directly to that sheet instead of clicking the Next > or < Back button. As the sheets do not have any interdependencies, you can access them in any order.
For details about specifying the OpenAPI specification, see the following subsections.
Alternatively, you can use the REST OpenAPI classes summarized in the following table. (For details, see
Class | Description |
---|---|
Abstract grouping class for classes relating to the JADE OpenAPI Generator | |
|
JadeOpenAPI subclass for generating OpenAPI specifications programmatically |
2020.0.02 and higher
For details about the proxy class generator that consumes an OpenAPI specification of a REST API and generates the appropriate data model and resource proxy classes, see "