API Builder Standalone - 3 August 2018

API Builder Standalone - Boston

Summary

This release includes:

Features

  • #4748: Allow swagger scheme, host, and basePath to be editable via configuration

Fixes

  • #4896: Swagger for autogenerated APIs belonging to connectors fails to download

Release Notes

  • #4748: A new apidoc section has been added in the configuration allowing for the host, schemes, and basePath of the swagger API documentation to be overridden so that API Builder can continue to provide valid documentation when the service is behind a proxy or ingress. This new section also gives control over where the documentation is hosted (apidoc.prefix) and if the documentation is turned off (apidoc.disabled). These new values override admin.apiDocPrefix and admin.disableAPIDoc and are provided instead of them for new projects. For more information on how to configure this, see the project configuration documentation. See deprecations #2 and #3.

  • #4748: Previously, the configuration option admin.disableAPIDoc kept the swagger API documentation disabled, even in development mode - which was opposed by the config documentation. Now, since the documentation is required for the admin console to function correctly if the admin console is enabled and installed, the value of admin.disableAPIDoc will not be acknowledged. This will not affect production installs. 

  • #4748: Previously, if the service had no apiPrefix configured, the swagger API documentation would include an invalid (empty) basePath. Now, basePath will not be added to the swagger API documentation if the service configuration results in an empty basePath.

  • #4896: Previously, the Download Swagger button on the API details page may not work if the API name contains characters that require URL encoding. Now, the Download Swagger works for all APIs.

New Deprecations

  • #2: Change in the configuration option used to change where the Swagger API documentation is hosted (admin.apiDocPrefix).
  • #3: Change in the configuration option used to disable Swagger API documentation (admin.disableAPIDoc).

When upgrading to this release, you should consider the complete list of deprecated features.

Updated Modules

Updated Plugins

Known Issues

  • #3825: Filtering the API Builder Console administrator access using IPv6 addresses may cause ENOTFOUND errors.

  • #3867: When attempting to create and save a flow for an imported Swagger endpoint that contains a path or paths defined by references the save will fail.

  • #3960: API Builder has issues with recognizing a required consumes value if anything is appended to it, for example multipart/form-data; charset=utf-8.

  • #3979: Attempting to delete an endpoint in the UI that was created as a result of dereferencing a JSON $ref will yield a 404. API Builder will fail to locate the method since it only exists when the whole Swagger document is dereferenced. An example of a Swagger document using $ref:

    {
    	"swagger": "2.0",
    	"paths" {
    		"x-path": {
    			"get": {}
    		},
    		"/find": {
    			"$ref": "#/paths/x-path"
    		},
    		"/search": {
    			"$ref": "#/paths/x-path"
    		}
    
    	}
    }
    
  • #4050: When rendering the flow editor, the API Builder Console may fail to render the Scalable Vector Graphics (SVG) icons correctly in the Firefox browser. The render failure may result in blank icons being displayed in the tool panel and in the flow diagram. This is due to a long-standing bug in Firefox that fails to scale SVG graphics correctly. To fix, edit the SVG icon and add height and width. For example: <svg ... height="80" width="80" />

  • #4280: Editing large object parameters on the API Orchestration page in the API Builder Console may cause multiple, confusing flow-node configuration panel scroll-bars to appear.

  • #4532: Given a data connector that generates models from a database, and is configured to auto-generate the API for those models (modelAutogen is set to true), and there exists a table with a primary key that is not an auto-incremented number and not named "id" (e.g. is a PK on username), then the API generated will not properly handle the methods for Upsert or Update. In the UI, Upsert will render an example body with the non-id PK (e.g. username) and id and will also fail 500 with various error messages depending on content of the body, "You must provide a Model id and data Object, that will be persisted", required body parameter: username missing", "You must provide a Model id and data Object, that will be persisted". Update will fail with 500 error "invalid field: id".

  • #4716: Given a data connector that generates models from a database, and is configured to auto-generate the API for those models (modelAutogen is set to true), and there exists a table with no primary key, then the API Builder will not able to handle the following methods: Update, Delete, Find By ID, Find and Modify, and Upsert.

  • #4736: Given a swagger with an extension, for example, on the path item object, the Swagger flow-node plugin can fail to load the swagger file, resulting in an error:

    Error loading plugin: @axway/api-builder-plugin-fn-swagger. Cannot convert undefined or null to object
    
  • #4752: The format of a distinct query's response depends on the type of connector.

  • #4759: Calling Update or FindAndModify on a Model that uses the composite connector and contains required fields may fail and cause the server to terminate.

  • #4795: The MongoDB plugin api-builder-plugin-dc-mongo does not correctly support primary keys that are not object identifiers. The MongoDB specification allows for primary keys of other types. As a result, trying to use the plugin will result in errors:

     { "message": "Invalid Value for Find By ID: "YOUR_STRING_PK_NAME", "success": false, "request-id": "c118f187-2090-4a68-b939-37367ac55b80" }
    
  • #4813: If the endpoint swagger file in /endpoints contains special characters in its name, for example [test].json, the endpoint is not rendered correctly in the UI.

  • #4865: The Swagger flow-node plugin strips characters from valid object definition names which can result in schema ID collisions.

  • #4865: The Swagger flow-node plugin does not handle valid object definition names with ~ or / in their name and can result in an invalid schema references in swagger flow-nodes.

Related Links