OpenAPI Parser API

 From sgcOpenAPI Parser 2026.2.0 the parser allows to use a custom dll to get more detailed info of the parsed pascal file, just create a new dll with the method sgcOpenAPI_CreateSection and copy the library in the same folder where is the parser. Every time a new file section is created the api the method CreateSection will be called and you can modify the content if needed

Dll Example

unit sgcOpenAPI_API_Client;

interface

uses
  Classes, SysUtils;

type
  TsgcOpenAPIPascalSectionType = (soapistHeaderStart, soapistHeaderEnums,
    soapistHeaderClasses, soapistHeaderMainClass, soapistHeaderClassesStructure,
    soapistHeaderMainInstance, soapistHeaderEnd, soapistImplementationStart,
    soapistImplementationClasses, soapistImplementationEnd);

procedure sgcOpenAPI_CreateSection(aType: Integer;
  out aValue: PWideChar); stdcall;

implementation

procedure sgcOpenAPI_CreateSection(aType: Integer; out aValue: PWideChar);
begin
  case TsgcOpenAPIPascalSectionType(aType) of
    soapistHeaderStart: ;
    soapistHeaderEnums: ;
    soapistHeaderClasses: ;
    soapistHeaderMainClass: ;
    soapistHeaderClassesStructure: ;
    soapistHeaderMainInstance: ;
    soapistHeaderEnd: ;
    soapistImplementationStart: ;
    soapistImplementationClasses: ;
    soapistImplementationEnd: ;
  end;
end;

exports sgcOpenAPI_CreateSection;

end. 
×
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

OpenAPI Parser Library

Related Posts