If you have a Swagger 1.2 API description file split into Resource Listing and API Declaration files, you can import/convert it using a ZIP file. Previously, such API description file could only be converted/imported by providing the Resource Listing file via a URL where all API Declaration files were located relative to this URL.
Array Serialization Formats
Multiple formats are now supported for Array serialisation in form and query parameters. Formats supported include UnIndexed
, Indexed
, Plain
, CSV
, PSV
, TSV
.
This settings can be set using our API Blueprint CodeGen setting extension named ARRAYSERIALIZATION
.
Added Swagger Type Discriminator Support
Swagger makes use of a property discriminator
to support polymorphism in custom types. We have now added support for this property in our system. We also offer an extension that will allow you to specify a custom value for the discriminator to override its default value.
Multiple Bug Fixes for Node SDK
Multiple bugs were identified and fixed for Node SDK. A summary of all bugs is given below with some details about each:
- There was a bug in printing multi-line string literals in controller files.
- In Controller files, string encoding for headers had some issues.
- Exception Class imports within Controllers were printed with invalid exception class names.
- Moment.js (for Date/Datetime) import statement was not being handled properly.
- Imports for
Server.js
andEnvironment.js
file inindex.js
will now only be included if multiple base urls are specified in the API description. - Exception Class files' constructor function code has improved.
- API Exception's constructor function code has improved.
- Models or model properties which are being used in endpoints (such as parameters) are now being imported properly in the Controllers. Transitive imports are handled as well (if one model requires another, both are included in the controller).
- Custom Type imports in model files have also been fixed now. If a custom type inherits from another custom type or contains an object of another custom type, that custom type is included in the model file. This import logic has been fixed.
- Code in the
Request Client
file was not generating properly forSuperagent
client. Code for retries was being added even through retries were not enabled. This bug has been fixed.
All the above mentioned bugs have been fixed. We recommend generating Node SDK again to get all these bug fixes and minor code improvements.
Additional properties now allowed in CSharp
We have now added support for additional properties in models in the CSharp SDK. The additional properties are deserialized and stored in a dictionary inside the model.
This can be enabled via navigating to the Settings > CodeGen Settings
page in the API editor and enabling the Enable Additional Model Properties
flag.
Swagger Server Configuration Extension
APIMATIC now offers you a swagger extension to specify Server Configuration details within your Swagger file. When you import this file, we will extract the relevant server configuration information from this extension.
Details
Server configurations can be used to create multiple environments, multiple servers that can be used with specific endpoints and server URLs with template parameters. You can view more details about these configurations at Server Configuration. We have added support for an extension to help you specify this information without having to manually add it through the editor everytime you import your Swagger file. For more details on this extension please see Swagger Server Configuration Extension
Module File in Angular SDKs
A new file, Module.js
has been added to the Angular SDKs. It defines the module of the SDK along with its dependencies.
This is not a breaking change. Everything should work as before, this is just to make it easier to specify the modules that the SDK depends upon.
Multiple Datetime Formats in Angular
We have now added support for multiple datetime formats in our Angular SDKs. The following formats are supported:
- RFC1123 Datetime
(Mon, 15 Jun 2009 20:45:30 GMT)
- RFC3339 Datetime
(2016-03-13T12:52:32.123Z)
- Unix Timestamp
(1480809600)
Wadl Parameter Style Parsing Bug Fix
The WADL imports did not parse the Parameter style information correctly which has now been fixed.
Added Missing Support for Occurrence Indicators in XSD
XML Schema contains two occurrence indicators minOccurs
and maxOccurs
. The support for these was missing when we parsed any XML Schemas but has been added now.