eSeGeCe — Enterprise Communication Components for Delphi & .NET
FEATURED · sgcOpenAPI

Stop hand-writing REST clients

Point sgcOpenAPI at an OpenAPI 3.x document. The parser reads it, the generator emits a native Object Pascal SDK, and the OpenAPI server component publishes your own endpoints back out as a live spec. Or skip the generator entirely, because 1,195+ SDKs for AWS, Azure, Google Cloud and Microsoft Graph are already built and bundled.

  • OpenAPI 3.0 and 3.1
  • JSON and YAML
  • Swagger 2.0 auto-converted
  • Delphi 7 to RAD Studio 13

The SDK You Need Is Probably Written

Every tier of sgcOpenAPI, Single, Team and Site, bundles the parser, the code generator, the OpenAPI server component and the whole pre-built SDK library. Nothing is sold separately.

1,195+ Pre-built cloud SDKs Generated from the official OpenAPI specifications and regularly updated.
280+ Amazon AWS services REST service SDKs covering S3, EC2, Lambda, DynamoDB, SQS, SNS, CloudFormation and more.
650+ Microsoft Azure services Azure VMs, Blob Storage, Functions, Cosmos DB, Key Vault and more.
250+ Google Cloud services Compute Engine, Cloud Storage, BigQuery, Pub/Sub, Cloud Functions and more.
15+ Microsoft Graph SDKs Office 365, Microsoft Teams, OneDrive, Outlook and Active Directory.
sgcOpenAPI

One bundled product for Delphi and C++ Builder: an OpenAPI 3.x parser, a native Pascal SDK generator, an OpenAPI server component, and 1,195+ pre-built cloud SDKs. Full source, royalty-free deployment.

Four Clouds, Already in Pascal

You do not have to generate anything to get started. The four largest cloud platforms ship as ready-to-use Pascal SDKs inside sgcOpenAPI, generated from the official specifications and kept up to date.

280+ services

Amazon AWS

REST service SDKs covering S3, EC2, Lambda, DynamoDB, SQS, SNS, CloudFormation and more. Drop the unit into the project and call the service with typed request and response classes.

View AWS SDKs →
650+ services

Microsoft Azure

The largest set in the library. Azure VMs, Blob Storage, Functions, Cosmos DB, Key Vault and the rest of the Azure control plane, each one a generated Pascal client.

View Azure SDKs →
250+ services

Google Cloud

Compute Engine, Cloud Storage, BigQuery, Pub/Sub, Cloud Functions and more.

View Google SDKs →
15+ SDKs

Microsoft Graph

Office 365, Microsoft Teams, OneDrive, Outlook and Active Directory, through the Graph API.

View Microsoft SDKs →
Everything else

Any Other Spec

If the API publishes an OpenAPI or Swagger document, the generator turns it into the same kind of typed Pascal unit. There is no allow list.

Generator features →

Worked guides, from a public specification to a compiling Delphi client:

Spec In, Compiling Code Out

Five steps, all of them inside the IDE. No Node.js, no Java code generator, no template engine to learn.

  1. 1 Point it at a spec

    Load an OpenAPI 3.x document from a file, a URL or a string, in JSON or YAML. Swagger 1.x and 2.x files are detected and converted to the OpenAPI 3.x model for you.

  2. 2 Parse

    TsgcOpenAPIParser resolves $ref pointers, including external files and circular references, flattens allOf, oneOf and anyOf, and reports structural errors with line-level detail.

  3. 3 Generate

    TsgcOpenAPIGenerator emits strongly-typed Pascal classes, records and enumerations, grouped one class per tag, plus PDF and CHM documentation alongside the code.

  4. 4 Compile

    Drop the generated units into the project. There are no external dependencies beyond the sgcOpenAPI runtime, on Delphi 7 through RAD Studio 13 and C++ Builder 2007 through 13.

  5. 5 Call

    Set BaseURL, set the credentials, and call the operation. Type-safe methods, typed results, full IntelliSense in the IDE.

uses
  sgcOpenAPI_Parser, sgcOpenAPI_Generator;
var
  vParser: TsgcOpenAPIParser;
  vGen: TsgcOpenAPIGenerator;
begin
  vParser := TsgcOpenAPIParser.Create(nil);
  try
    vParser.LoadFromFile('C:\specs\github\api.github.com.json');
    Memo1.Lines.Add(Format('GitHub spec: %d paths, %d schemas',
      [vParser.Paths.Count, vParser.Schemas.Count]));

    vGen := TsgcOpenAPIGenerator.Create(nil);
    try
      vGen.Parser := vParser;
      vGen.OutputUnit := 'sgcOpenAPI_GitHub';
      vGen.OutputFolder := 'C:\Generated\GitHub';
      vGen.GroupBy := gbTag;        // one class per tag
      vGen.Generate;
    finally
      vGen.Free;
    end;
  finally
    vParser.Free;
  end;
end;
uses
  sgcOpenAPI_PetStore;  // Generated from petstore.yaml

procedure TForm1.btnGetPetClick(Sender: TObject);
var
  Client: TsgcOpenAPI_PetStoreClient;
  Pet: TsgcOpenAPI_Pet;
begin
  Client := TsgcOpenAPI_PetStoreClient.Create(nil);
  try
    Client.BaseURL := 'https://petstore.swagger.io/v2';
    Client.ApiKey  := 'your-api-key';

    // Type-safe API call with IntelliSense
    Pet := Client.GetPetById(42);
    try
      Memo1.Lines.Add('Name: '     + Pet.Name);
      Memo1.Lines.Add('Status: '   + Pet.Status);
      Memo1.Lines.Add('Category: ' + Pet.Category.Name);
    finally
      Pet.Free;
    end;
  finally
    Client.Free;
  end;
end;

The parser and the generator are separate components, so you can also walk the parsed model yourself and build your own tooling on top of it. The parser component →

Serve the Spec, Do Not Just Consume It

TsgcOpenAPIServer publishes a live OpenAPI 3.x document, routes incoming requests against the spec, validates payloads in both directions, and ships an embedded Swagger UI and Redoc, all from a single Delphi component on top of the sgcWebSockets HTTP/2 server.

OpenAPIServer.pas
uses
  sgcOpenAPI_Server, sgcOpenAPI_Types, sgcHTTP_Server;

procedure TForm1.FormCreate(Sender: TObject);
begin
  FServer := TsgcOpenAPIServer.Create(nil);
  FServer.HTTPServer := sgcHTTPServer1;
  FServer.Spec.LoadFromFile('petstore.yaml');
  FServer.PublishSpecPath := '/openapi.json';
  FServer.SwaggerUIPath   := '/docs';
  FServer.RedocPath       := '/redoc';

  // Bind an operation declared in the spec
  FServer.OnOperation_getPetById :=
    procedure(const Ctx: TsgcOpenAPIContext)
    var
      oPet: TJSONObject;
    begin
      oPet := TJSONObject.Create;
      oPet.AddPair('id',     Ctx.PathParams['petId']);
      oPet.AddPair('name',   'Rex');
      oPet.AddPair('status', 'available');
      Ctx.RespondJSON(200, oPet);
    end;

  sgcHTTPServer1.Port   := 8080;
  sgcHTTPServer1.Active := True;
end;

What that gives you

GET /pets/{petId} runs the handler above. GET /openapi.json returns the live document. GET /docs opens Swagger UI and GET /redoc opens Redoc. HTTP/2 and TLS are already on if the HTTP server has them configured.

Spec-first or code-first

Load a YAML or JSON contract and bind handlers to the operation IDs, or register handlers in Pascal and let the component build the OpenAPI document at runtime.

Validation in both directions

Required fields, type coercion, enum membership, format validators, length and range limits, patterns and schema composition are all enforced before the handler runs. Failures come back as RFC 7807 problem details with field-level diagnostics.

Auth wired up from the spec

Every securityScheme in the document is enforced automatically. You write the credential lookup, the component does the parsing, the challenge headers and the 401 and 403 responses.

API Key HTTP Basic Bearer JWT OAuth2 OpenID Connect mTLS Swagger UI + Redoc

The OpenAPI server component →

The server runs on the same sgcWebSockets HTTP server that hosts your WebSocket endpoints and static files. One port, one TLS certificate, one logging stream.

Six Libraries, One Toolbox

sgcOpenAPI is one of six eSeGeCe component libraries for Delphi, C++ Builder and .NET. They share conventions, they ship with full source, and they deploy royalty-free.

sgcOpenAPI

OpenAPI 3.x parser, native Pascal SDK generator, OpenAPI server component, and 1,195+ pre-built SDKs for AWS, Azure, Google Cloud and Microsoft Graph.

Learn more →

sgcWebSockets

WebSocket, HTTP/2, HTTP/3, MQTT, AMQP, WebRTC, AI and 30+ API integrations. The HTTP server that the OpenAPI server component runs on.

Learn more →

sgcHTML

Server-side HTML and UI components on Bootstrap 5 and htmx. Build the admin or dashboard UI for the REST clients you generate, without a JavaScript front end.

Learn more →

sgcSign

XAdES, PAdES, CAdES and ASiC for documents, Authenticode, ClickOnce, NuGet and VSIX for code. Sign the request and response bodies your API exchanges.

Learn more →

sgcBiometrics

Windows Hello, fingerprint sensors and the Windows Biometric Framework for Delphi and C++ Builder. Gate API access behind a fingerprint.

Learn more →

sgcIndy

Updated Indy TCP/IP components with modern TLS, IPv6 and HTTP/2 for Delphi 7 through 13. The transport layer under the generated clients.

Learn more →

View pricing and editions Download the free trial

What Developers Say

Trusted by Delphi, C++ Builder, Lazarus and .NET developers around the world.

Your sgcWebSockets library is very useful and easy to setup. Keep up the good work!

Simone Moretti Delphi Developer

sgcWebSockets is amazing and your support is the best!

Christian Meyer Founder & CTO

Thanks so much for your help and support, I love your components.

Mark Steinfeld CTO

You are seeing the OpenAPI view of eSeGeCe.

Show me another angle →
30-Day Money-Back GuaranteeNot satisfied? Request a full refund within 30 days of purchase. See refund policy

Generate Your First Pascal SDK Today

Parser, code generator, OpenAPI server component and all 1,195+ pre-built cloud SDKs, on one licence. Full source, royalty-free deployment, Delphi 7 through RAD Studio 13.