By Admin on Friday, 06 February 2026
Category: All

OpenAPI Parser CLI

​From sgcOpenAPI Parser 2026.2.0 the Delphi parser supports Command Line Interface.

The sgcOpenAPI Parser includes a command line interface that converts an OpenAPI specification into a Delphi (Pascal) client file. The parser validates and normalizes the specification (OpenAPI 3 JSON + bundled schemas) before generating output.

Usage

General syntax

sgcOpenAPI.exe -i "<input file or url>" -o "<output pas>" [options]

Parameters

All parameters are case-insensitive. Short and long forms are equivalent.

Examples

1) Generate Delphi client from a local file

sgcOpenAPI.exe -i "c:\specs\openapi.json" -o "c:\clients\orders.pas"

2) Generate client from URL, disable classes and documentation

sgcOpenAPI.exe -i "https://api.example.com/openapi.json" -o "c:\clients\api.pas" -nc -nd

3) Use Summary as method names and enable OAuth2

sgcOpenAPI.exe -i "c:\specs\openapi.json" -o "c:\clients\auth.pas" -m 1 -a 3

4) Override Base URL and show log output

sgcOpenAPI.exe -i "c:\specs\openapi.json" -o "c:\clients\override.pas" -u "https://api.example.com/v2" -l 

Troubleshooting

Related Posts