Use the openapi-gen command to generate an OpenAPI 3.0.3 YAML specification from an OpenEdge business entity catalog, which is in JSON format.

Syntax

./mcpgen openapi-gen <source> [-o <output.yml>]
source

Business entity catalog source, which is either local file path or HTTP(S) URL.

-o output_file

Output YAML file path. Defaults to an auto-generated name based on source.

Examples

The following example generates a specification file using a local business entity catalog endpoint as generated by Progress Developer Studio for OpenEdge for an ABL service:
./mcpgen openapi-gen <catalog.json>
The following example generates a specification file using a remote business entity catalog endpoint as generated by the Developer Studio for an ABL service, which is accessible through a URL:
./mcpgen openapi-gen http://localhost:8810/web/oemanager/catalog
The following example specifies the output YAML file:
./mcpgen openapi-gen catalog.json -o sports-api.yml

The following example generates the specification file from a remote source with a custom output:

./mcpgen openapi-gen https://server.com/web/catalog -o openapi.yml

What openapi-gen command does

The openapi-gen command performs the following functions when you run it:
  • Loads Business Entity catalog from file or URL. It supports gzip-compressed responses.
  • Extracts service metadata, resources, and schema definitions.
  • Converts ABL types, such as INTEGER, DECIMAL, LOGICAL, DATE, and so on to OpenAPI types.
  • Generates CRUD operation paths including, GET, POST, PUT, DELETE. For OpenEdge Data Services, the request body schemas for POST and PUT operations include the expected nested hierarchy, such as dataset and temp-table levels required by the OpenEdge Data Object Service.
  • Creates component schemas for request or response structures.
  • Outputs clean OpenAPI 3.0.3 YAML with proper formatting.

Contents of the output specification file

The openapi-gen command produces an OpenAPI 3.0.3 YAML file specification file, which contains:
  • Service information and server endpoints.
  • Component schemas for all data tables.
  • CRUD paths for operations including, GET, POST, PUT, DELETE.
  • Query parameters for filtering and pagination.
  • Request and response bodies with proper references.