- Fixes an issue where auth scheme elements are re-used multiple times in a parse result which can cause exceptions when the parse result is frozen.
- Handle array parameters which contain enumerations.
- Compatibility with Minim 0.19 and Fury 3.0.0-beta.4.
- Support
allOf
when generating data structures for objects
- Updated enum to match the new format
- Add warning when x-example is not of error type when defined as array
- Support
allOf
in object JSON Schemas when producing object data structure elements.
- Updates to fury 3.0.0-beta.3 which supports Refract 1.0 serialisation rules.
- Updates to fury 3.0.0-beta.2.
-
Adds support for
csv
andmulti
parameter collectionFormat for query parameters. -
Parameters which define both an example (
x-example
) anditems
schema will now use thex-example
value as the example. -
URI Template variables are now correctly escaped.
- Data Structure generation from JSON Schema handles array items which contain empty values.
- Data Structure elements are now generated from JSON Schema found in examples.
- Updated yaml-js dependency to 0.1.5. This resolves problems with determining source maps for Swagger documents that include multi-byte unicode characters such as emoji.
- Update fury to 3.0.0-beta.0
- Update minim to 0.15.0
- Update minim-parse-result to 0.4.0
- Upgraded babel-runtime dependency to v6
- Drop support for node 0.12 and 0.10
- Handle inheritance for Path level Parameters
-
Improve handling of default in parameters.
-
Prevent a crash on invalid media types, such as
application/json; invalid-component
and produce warnings for invalid media types.
- Fixes crashes on bad media types.
- Circular references in examples will now give a warning about not being supported yet.
-
Generates JSON examples for JSON subtypes such as
application/hal+json
. -
Fixes a crash during sourcemap construction for some specific documents
- Prevents constructing large arrays and strings when generating a request or
response body from a JSON Schema where there is a large
minItems
,maxItems
,minLength
ormaxLength
.
- Prevents dereferencing external assets such as local files.
-
Improves error reporting in some cases when references are involved.
-
Improves error reporting when the YAML document contains YAML syntax errors to include source maps and the YAML error.
- Added support to exclude extensions from operations
- Upgraded lodash dependency from 3.x.x to 4.x.x
- Added support for adding example values to parameters using
x-example
- Added support for parameter property called x-example, which allows to specify example values also for non-body parameters.
- The adapter is more asynchronous and thus, gives other events in the event loop the ability to run while we're parsing the Swagger document.
- Added authentication support.
- Swagger vendor extensions are now exposes as API Element extensions.
- Response and Request bodies are generated from Schema whenever applicable.
- Accept and Content-type headers are generated based on produces and consumes keys whenever applicable.
- Sample values for non-body parameters are generated whenever applicable.
- Header parameters are appended to request/response header collection.
- Added
formData
support and appropirate request body generation.
- Fixed metadata not being an array of Member Elements.
- Added source maps to resource.href, httpRequest.method, httpResponse.statusCode.
- Removed several unneeded source maps.
- Circular schema references will now give a warning about not being supported yet.
- Added fragment to uncaught error.
- Fixed bug with parameters sourcemaps when they are mixture of body and query parameters.
- All exceptions thrown when converting swagger to refract will now be caught and returned as a proper error in parse result
- Add an example for testing the module in the browser via TonicDev.
- Swagger's
operationId
is now correctly interpreted as transition element'sid
instead ofrelation
.
- Swagger documents that do not validate against the JSON Schema for Swagger will no longer be translated into Refract and instead expose errors for the validation failures.
- Bad JSON references (using
$ref
) are now returned as parse result annotations that include source maps which point to the$ref
line, making debugging easier.
-
Fix handling of resource
href
, which could get overwritten while processing transitions and result in missing parameters in the URI template. -
Code refactoring
- Parsing is now handled by a class to more easily share state between various methods. This lays the framework for more refactoring and code cleanup.
- The parser shared state tracks the path of the component currently being parsed, which makes it easier to split pieces of the parser into separate methods.
- YAML AST lookup paths are now arrays of strings rather than strings of period-separated components, which made escaping very difficult.
- Rather than guessing the YAML type, the AST lookup now checks and handles it accordingly. Paths like
'foo.bar.0.baz'
would fail previously and now work (but are passed as['foo', 'bar', '0', 'baz']
). - Underscore is now replaced with Lodash for consistency with other modules.
- Invalid YAML now returns error
- Add source maps for YAML parse error annotations, which were previously missing.
- Add support for
formData
parameters, which get converted into request data structures. - Add source maps for
messageBodySchema
assets.
- Do not encode JSON strings twice
- Support
x-summary
andx-description
in Path Item Objects
- Generate Swagger schema and spec validation annotations.
- Implement support for link relations in parser annotations.
- Encode dashes (
-
) in URI template parameters.
- Implement support for parser annotations.
- Implement support for source maps.
- Fixes bug where URI templates appended empty query section.
- Fixes additional slashes in URLs when basePath ends with
/
.
- Handle Swagger extensions (
x-*
fields). - Support tags as resource groups when possible.
- Support hostname and basepath.
- Support request parameters when no response is given.
- Better support for HTTP headers.
- Add module for building URI templates from path and operation parameters.
- Allow input to be either a loaded object or JSON/YAML string.
- Better JSON Schema reference handling via
json-schema-ref-parser
package. - Do not set resource titles.
- Use
summary
instead ofoperationId
for action titles. - Set a relation value based on
operationId
for actions.
- Initial release.