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 →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.
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.
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.
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.
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 →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 →Compute Engine, Cloud Storage, BigQuery, Pub/Sub, Cloud Functions and more.
View Google SDKs →Office 365, Microsoft Teams, OneDrive, Outlook and Active Directory, through the Graph API.
View Microsoft SDKs →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:
Five steps, all of them inside the IDE. No Node.js, no Java code generator, no template engine to learn.
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.
TsgcOpenAPIParser resolves $ref pointers, including external files and circular references, flattens allOf, oneOf and anyOf, and reports structural errors with line-level detail.
TsgcOpenAPIGenerator emits strongly-typed Pascal classes, records and enumerations, grouped one class per tag, plus PDF and CHM documentation alongside the code.
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.
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 →
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.
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;
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.
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.
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.
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.
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.
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.
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 →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 →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 →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 →Windows Hello, fingerprint sensors and the Windows Biometric Framework for Delphi and C++ Builder. Gate API access behind a fingerprint.
Learn more →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 →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!
sgcWebSockets is amazing and your support is the best!
Thanks so much for your help and support, I love your components.