4.2.1 • Published 5 months ago

@axway/api-builder-plugin-fn-swagger v4.2.1

Weekly downloads
711
License
SEE LICENCE IN LI...
Repository
-
Last release
5 months ago

api-builder-plugin-fn-swagger

About

This plugin searches for swagger documents in a swagger folder in your application and generates one flow-node per document to be used within Axway API Builder's.

The generated flow-nodes export functions that can be used withing API Builder flows for communication with APIs services described in your swagger documents.

Getting started

  1. Follow the Getting Started Guide to learn how to install and create API Builder application.

  2. Then make sure you have the plugin installed within your application with:

npm install --save @axway/api-builder-plugin-fn-swagger

How to use the plugin?

  1. During the npm install phase the swagger plugin will create a folder named ./swagger in the root of you application. Note that if the folder already exists it will be preserved with all of its content.

  2. Place your swagger JSON files into the ./swagger

  3. (Optional) Place your service icons into the ./swagger folder. The icon should have the same name as swagger JSON file for your service and should be one of the following formats - bmp | jpeg | jpg | png | gif | tiff | svg

  4. Run your app with npm start and the flow-nodes will be available in the tool panel of your application. In the Connectors section, you should see a plugin listed for each JSON Swagger file successfully loaded from your ./swagger folder.

  5. Each flow-node will have a corresponding number of functions based on what has been described in the swagger JSON specification for particular service. Each of these functions could be used during the flow execution.

How to configure the plugin?

Currently the configuration is related with configuring the authentication and endpoint URI to successfully communicate with the service.

Configure Authentication

Depending on the auth type we need different set of parameters to be specified.

Basic Authentication

For basic authentication the following parameters should be provided:

Config paramsDescription
'x-vendor-openapi-username'basic authentication type requires to provide username
'x-vendor-openapi-password'basic authentication type requires to provide password

API Key Authentication

For api key authentication the following parameters should be provided:

Config paramsDescription
'x-vendor-openapi-key'apiKey authentication type requires to provide key

OAuth Authentication

For oAuth authentication the following parameters should be provided:

Config paramsDescription
'x-vendor-openapi-token'OAuth authentication type requires to provide token
Optional Parameters Related with Authentication

'x-vendor-openapi-authtype' - This parameter is optional and only needed when the authentication mechanism for the service is ambiguous. Possible values are - basic, apiKey or oauth2.

If this parameter is omitted the application will detect your parameters provided to decide about the authentication strategy that must be applied. If you provide username and password basic authentication will be applied, if you provide apiKey - api key authentication will be applied, if you provide token - oauth2 authentication will be applied.

Configure Endpoint URI

'x-vendor-openapi-uri' - if this parameter is set the module takes it into account to override the predefined endpoint url. One could specify either the port, host, protocol, or base path as descibed in the table bellow:

Config paramsDescription
'x-vendor-openapi-uri.protocol'application protocol to use, e.g. either http, or https
'x-vendor-openapi-uri.host'server name
'x-vendor-openapi-uri.port'specifies the port on which the host system listens for requests. This parameter is optional. The default one will be set, depends on the protocol.
'x-vendor-openapi-uri.basePath'basePath is the path to the API

Known Limitations

The plugin has the following known limitations:

  • If there are invalid swaggers among your files in the ./swagger folder the plugin will fail to load and no flow-nodes will be created
  • If the user does not configure authentication in accordance to what is described in the swagger file the service may fail to authenticate against the service.
  • Only one authentication mechanism can be used for all the paths described in the swagger file for the service
  • Paths that deals with file upload download are currently not supported

License

This code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: https://support.axway.com/en/auth/general-conditions. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.

4.2.1

5 months ago

3.3.1

5 months ago

3.3.0

6 months ago

4.2.0

6 months ago

4.1.0

6 months ago

4.0.2

2 years ago

3.2.9

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.2.8

2 years ago

3.2.7

2 years ago

3.2.6

2 years ago

3.2.5

2 years ago

3.2.4

2 years ago

3.2.3

2 years ago

3.2.2

2 years ago

3.2.1

2 years ago

3.2.0

2 years ago

3.1.3

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.0.10

2 years ago

3.1.0

2 years ago

3.0.9

2 years ago

3.0.8

2 years ago

3.0.7

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

2.9.6

3 years ago

3.0.0

3 years ago

2.9.5

3 years ago

2.9.4

3 years ago

2.9.3

3 years ago

2.9.2

3 years ago

2.9.1

4 years ago

2.9.0

4 years ago

2.8.0

4 years ago

2.7.8

4 years ago

2.7.7

4 years ago

2.7.6

4 years ago

2.7.5

4 years ago

2.7.4

4 years ago

2.7.3

4 years ago

2.7.2

4 years ago

2.7.1

4 years ago

2.7.0

4 years ago

2.6.12

4 years ago

2.6.11

4 years ago

2.6.10

4 years ago

2.6.9

5 years ago

2.6.8

5 years ago

2.6.7

5 years ago

2.6.6

5 years ago

2.6.5

5 years ago

2.6.4

5 years ago

2.6.3

5 years ago

2.6.2

5 years ago

2.6.1

5 years ago

2.6.0

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.2

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-8

6 years ago

1.0.0-7

6 years ago

1.0.0-6

6 years ago

1.0.0-5

6 years ago

1.0.0-4

6 years ago

1.0.0-3

6 years ago

1.0.0-2

6 years ago

1.0.0-1

6 years ago