OpenAPI Connector (Swagger)

Configure and run the OpenAPI/Swagger connector to import metadata into DataGalaxy.

3 min read

This article explains how to use the OpenAPI connector for DataGalaxy.

This connector is available in the following modes:

Desktop mode ✅SaaS Online mode ❌

Connector Overview

Swagger is a tool for generating documentation for REST APIs based on the OpenAPI specifications. The OpenAPI connector allows to read specification files (.yml, .yaml, .json files) and to import the corresponding object definitions into a NoSQL source. The retrieved objects and their correspondences in DataGalaxy are detailed in the following table:

OpenAPI ObjectDataGalaxy ObjectComments
Path (URL de l'API)DirectoryDepending on the representation mode chosen, the URL of the API and the call path of the methods will be decomposed or regrouped to reproduce the structure of the API.
(Operation GET/POST/PUT/DELETE/...)DirectoryEach operation described gives rise to the creation of a directory
"parameters"File
ParametersFields / SubStructuresThe complete tree structure of the object is represented in DataGalaxy, exploiting the notion of sub-structure when necessary. The type of a schema in the source files is mandatory to determine the target type.
"responses"File
(Response code)SubStructureEach response code (200, 401, 415, ...) gives rise to the creation of a sub structure
(Objets de la réponse)Fields / SubStructuresThe complete tree structure of the response object is represented in DataGalaxy, exploiting the notion of sub-structure when necessary. The type of a schema in the source files is mandatory to determine the target type.

Step 1 : Installation

  • Download DataGalaxy connector from the portal (see here)
  • Extract the connector archive in the directory of your choice
  • Download the JSON Schema plug-in from the portal and copy it into the /lib directory of the connector

Step 2 : Run JSON Schema connector

  • After starting the connector, access the Dictionary connectors:
  • If it has been correctly installed, the OpenAPI plug-in will appear in the list
  • The following information is requested:
ParameterMandatoryDescription
PathYesPath to a directory containing Open API specification files (.yml, .yaml, .json)
Ignore errorsNoOption to ignore the presence of badly structured or uninterpretable files, in order to continue processing when an error is detected. When unchecked, the presence of an error file blocks the import process (default operation).
Substitute variables in URLNoOption to replace variables in the URL with their default values declared in the files.
Describe only the format of successful responsesNoOption to ignore responses with an HTTP code other than 200.
Include all formats (media-types) of requestsNoOption to take into account the media-types present in the queries as a substructure
Include all formats (media-types) of responsesNoOption to take into account the media-types present in the responses as a sub-structure
DataGalaxy container representation modeYesDefines the rule for the representation in DataGalaxy of the URL and endpoint paths of the API. • A detailed representation will create a DataGalaxy directory for each URL segment (i.e. an operation described in a https://urlracine/v2/mon/chemin/doperation path will create 5 levels of directories) • A grouped representation will create a DataGalaxy directory for the base URL, and a sub-directory for each operation (endpoint)

Once this information is filled in, you can test the connection and start the import.

Technical information

The connector supports versions 2 and 3 of the OpenAPI specification.

Link to Swagger documentation and OpenAPI specification: https://swagger.io/specification/

Releases

DatePlugin VersionDataGalaxy releaseDesktop Connector version (minimum)Description
29/09/20268.0.23.423.06.2.2New internal implementation to fix security vulnerabilities
05/05/20267.0.1v3.337.05.15.9Array types handled
16/07/20247.0.0v3.59.05.0.1Migrated from java 11 to java 17

Read more

Related articles

Was this page helpful?