I am happy to announce the sgcOpenAPI Pascal Parser, a brand new product allowing import an OpenAPI Specification and generate a Pascal Interface. The sgcOpenAPI Parser supports the following specifications:
- OpenAPI 3.*
- Swagger 2.* (automatically converted from 2.0 to 3.0)
- Swagger 1.* (automatically converted from 1.0 to 3.0)
Supports the following Authentications:
- Basic
- Bearer Token
- OAuth2
- JWT
OpenAPI Parser
An OpenAPI Parser is a tool used for parsing and validating OpenAPI specifications. OpenAPI is a specification for building APIs that defines a standard language-agnostic interface for RESTful web services.
The OpenAPI Parser reads OpenAPI documents written in either JSON or YAML format, and ensures that they adhere to the specification's rules and guidelines. This includes checking that the document contains all the required fields, has valid data types, and conforms to the expected structure.
In addition to validating the syntax of the OpenAPI document, the parser can also be used to generate code from the specification, making it easier to implement the API in different programming languages.
Overall, the OpenAPI Parser helps ensure that APIs are built according to the OpenAPI specification, which can improve interoperability between different APIs and make it easier for developers to consume and integrate them.
Now you can use the sgcOpenAPI Parser to import any OpenAPI Specification and generate the required Delphi / Pascal interface methods to interactuate with the API.
OpenAPI Specification
Find below an example of OpenAPI Specification used to get information given an IP Address
The sgcOpenAPI Parser reads the specification and creates automatically all required classes, methods... to interactuate with the class. Find below the interface created given the prior specification.
Once you have the Pascal interface, it's very easy to start interacting with the API, see below for a simple example written in Delphi.Find below a link to the sgcOpenAPI Parser Trial