Use the openapi-gen command to generate an OpenAPI 3.0.3 YAML specification from a Progress Data Object Service catalog, which is in JSON format.

Syntax

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

Progress Data Object Service 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 Progress Data Object Service catalog generated by Progress Developer Studio for OpenEdge for an ABL service:
./mcpgen openapi-gen <catalog.json>
You can use Progress Developer Studio for OpenEdge to build an ABL Web App with a Data Object Service and generate a catalog. Then provide the URL where that catalog is accessible. The URL to access the catalog should look like this:
http://host:port/<web-app>/web/pdo/<ServiceName>
For example, if the Sports2020 web app with the Sports2020Service Data Object Service is deployed and available, you can generate the specification file using:
./mcpgen openapi-gen
http://localhost:8810/Sports2020/web/pdo/Sports2020Service
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 Progress Data Object Service catalog with a custom output file:

./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 Progress Data Object Service 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.
For information about where to place the generated OpenAPI specification in the MCP setup workflow, see "Place the specification" in Step 4: Provide OpenAPI specification.