-
JSON Schemas generated for
fixed-type
arrays with a single sub-type will no longer be wrapped in ananyOf
schema. Thusarray[Object]
asfixed-type
will now result in the following schema:{ "type": "array", "items": { "type": "object" } }
- JSON Schemas generated for
fixed-type
arrays with no types will no longer produce an emptyanyOf
subschema.anyOf
must be a non-empty array in JSON Schema.
- Drafter contains two new options for disabling messageBody and
messageBodySchema generation from MSON. See the APIs
skip_gen_bodies
andskip_gen_body_schemas
respectively.
- Parsing and serialisation options in the C API of Drafter contain breaking
changes. Direct access to the option structures are no longer possible, a new
API layer has been added for the options. See
drafter_init_parse_options
anddrafter_serialize_options
respectively.
-
Improved support for URI Template. Drafter supports up to, and including level 4 of URI Template. This includes support for the URI Template explode (
*
) modifier, and reserved value operator (+
), and others. -
Added support for JSON Schema Draft 7 in schema generation from MSON. JSON Schemas are now generated using Draft 7 instead of Draft 4.
- Added support for dynamically linking against Drafter. The installation of Drafter will now install a dynamic library (dll/so/dylib) on the system.
-
Avoid crashes on unresolved references, especially when MSON mixins reference primitive types (e.g.
Include (object)
). #752 -
Prevent crashes under some circumstances while handling incorrectly indented blocks. #755
-
Fixed cases where an enum with a matching sample, default or enumeration value would issue a duplication warning and the incorrect description may be selected. #749
-
Resolves an incompatibility with Microsoft Visual Studio 2019 which preventing Drafter from compiling. Resolves incompatibilities with older versions of Microsoft Visual Studio which caused run-time crashes.
-
Numerous improvements to the correctness of the content type parsing which is used to detect JSON and JSON Schema content types. This includes fixing the detection of media types as case-insensitive, previously
application/JSON
would not have been identified as a JSON type unlike the naming requirements for comparison in RFC 6838. -
Certain warnings and errors now contain more compact source maps in cases where the annotation spanned multiple indented lines. This can improve the parse result size and amount of memory used by the parser and surrounding tooling when encountering warnings or errors which contain incorrectly indented blocks.
- Avoid duplication in
enumerations
for same elements with different description #718
- Adds de-duplication of objects in
anyOf
in produced JSON Schemas under cases where the properties have been declared in different orders in MSON. #664
-
Fix escaping keys in generated JSON/JSON-Scheme in generated assets #719
-
When using a type hint with an array, for example
array[Unknown]
. We will now emit a warning when the referenced type does not exist. The invalid type reference will not be present in the parse result. -
Prevents Drafter from aborting while parsing some API Blueprints due to invalid internal state.
- The default build type is now release when using cmake.
- JSON value & JSON schema backends now support top-level Reference Elements.
This prevents crashes on
Include
statements inenum
contexts. #709
-
The
fixed
type attribute now inherits to empty objects. This regression was introduced in 4.0.0-pre.1. #686 -
Prevents a segmentation fault while parsing a document which contains an "empty"
One Of
MSON entry. #699 -
Prevent an infinite loop while parsing a document with a circular MSON reference. #702
- Drafter now correctly expands types nested in EnumElement #689
-
Drafter no longer attempts to interpret non-primitive MSON type hints as fallbacks for nested values. #682
+ (array[object]) + MSON string now interpreted as String Element instead of Object Element
-
Release builds of Drafter will no longer include assertions, this prevents the potential for development intended assertions to cause Drafter to abort.
-
generated JSON Schema makes use of the
enum
validation instead of the more syntax heavyanyOf
for each enumerations EnumElement entry typing a single value -
transitioned from C++14 back to C++11 to support older compilers
- Parameters which are of
enum
type will now have theirdefault
values correctly serialized in the output usingenum
type
- Add column/line info to anotations source maps
-
This release contains numerous changes to enumerations which affect how enumerations are serialised in API Elements.
- See API Elements 1.0 for further specification on the format of the enumerations.
- Samples are now collected as collection of individual elements.
- The parser will now emit a warning when you define multiple default values for an enumeration.
-
Descriptions for MSON structures are no longer found in generated JSON Schemas.
- Significant performance improvements have been made to this release and parse times for API Blueprints are halved.
-
Large numbers will no longer be clipped and numbers will be rendered how they was described. For example
10.00
will be rendered as10.00
and not10
. #443 -
JSON Schema will no longer contain redundant anyOf entries when using fixed-type arrays. #566
-
Restored handling API Blueprints where referencing an unknown type inside an
array[]
would cause an assertion failure instead of a parsing error. #556 -
Fix parsing MSON object structures where a property is declared without a key. This was causing an assertion failure instead of a parse error. #547
-
JSON Schema generation will no longer include duplicate required properties when a property in MSON structure is duplicated. #493
-
The following compiler versions are supported:
- Microsoft Visual C++ 2015 or higher
- GCC 5.3 or higher
- Clang 4.0 or higher
-
Deprecated API Blueprint AST support has been removed.
-
Drafter will now produce API Elements 1.0 using the Refract 1.0 JSON Serialisation format. Refract JSON Serialisation API Elements 1.0
- Instead of returning int, functions that may error return
drafter_error
type. This adds additional type-safety when handling errors.
- Fix JSON Schema "required" for multiple defined members #493
-
Fix JSON Schema for OneOf when required is present. #453
-
Allow fixed-type when the nested type in array is six characters. #463
-
Fix a few issues with codeblocks format.
- Fix JSON Schema support for nullable with enums. #455
-
Action identifiers may now contain
(
and)
characters.## My Action (Deprecated) [GET]
- Parameters values in API Elements are always serialized as API Element
strings. This ensure consistency with API Blueprint AST and to prevent
values being serialized differently. For example boolean of value
1
in API Blueprint AST would be treated as a string and therefore be serialized as1
. However in API Elements it wouldn't be treated as truthy since1
is not equal totrue
and would be serialized asfalse
.
-
Prevent exposing duplicate parameters in API Elements output when a parameter is overshadowed.
-
Fix support for escaped MSON-style parameters. #445
- Ensure that escaped property names in MSON are not treated as markdown. snowcrash#422
-
Properly handle MD "code fences" while parsing headers (related to changes in sundown paser)
-
fix crash - changes in sundown leads to crash for undisclosed item list
-
Improved sourcemaps of warnings when encountering malformed headers
-
Added warning when default and sample is specified without value
-
Improved JSON Schema regarding defaults #424
-
Handle
fixed-type
with variable property names when generating JSON Schemas. #390 -
Drafter will now check the validity of header names and provide a warning for invalid characters found within a header name. Invalid headers will be skipped in the parse outputs. #382
-
Fix handling of escaped parameter identifiers with the older non-MSON parameter syntax. #391
-
Rectify JSON Schema generation for variable property names #367
-
Add missing sourcemaps for named type references #386
-
Warn user on "action" with non-absolute path #350
-
Prevent crashing and improve structure of result from parsing regarding markdown lists.
-
Correctly set the content type for custom JSON Schema. #392
-
Fix the JSON Schema generated when using
fixed-type
attribute #389 -
Fix and improve URI Template parameters validation #402
- Prevent crashing when no default value is specified for enum members
- Warn when primitive values in MSON doesn't follow the given type format #334
-
While overriding a property on an inherited object, the description and type annotation was not being overridden. #366
-
Always give an error when unable to find named type. snowcrash#354
-
Ensure that escaped values in MSON are not treated as markdown #365
-
Fixes detection of parameters using the MSON syntax when the description of a parameter includes
(
or)
. snowcrash#345
-
Warn about reserved characters in Named type declaration. snowcrash#335
-
Add
fixed-type
keyword support. mson#66 -
Add warnings when the given MSON type attributes contradict each other.
-
Ensure that sample values are rendered in JSON Schema when using the
fixed
attribute. #343 -
Prevents an empty properties section being treated as an unrecognized block. #127 snowcrash#200
-
Fixes rendering when One Of contains member sections with named types. #360
-
Default and sample enum values will take precedence as the example value in the rendered JSON structure over the enum members.
-
Add type attributes for array values. #193
-
Value members with required will not have items in JSON Schema anymore. #371
-
Ensures that MSON validation warnings are present when generating APIB AST.
-
Improved validation of
Request
keyword matching.
-
Drafter now uses C++11.
The following compiler versions are supported:
- Microsoft Visual C++ 2013 or higher
- GCC 4.8 or higher
- Clang 3.5 or higher
-
Drafter now provides a full C and C++ API interface, you may now validate, parse and serialize an API Blueprint. Please see
drafter.h
header for full API documentation. -
Improve error messages for a few blueprint errors
-
Correctly render named primitive types when used as a nested or member type such as
items (array[Other Type])
in JSON. #312 -
Fixes an issue where defining an implicit object data structure would raise an invalid syntax warning and not be parsed. #318
-
Prevent causing an infinite loop when parsing a resource which inherits from itself. #328
-
Correctly parse object samples within arrays. #246
-
Correctly render JSON Schema when
fixed
is used on attributes section or named type mson#60
-
Fixes a bug when a referenced mixin inherits another named type #254
-
Some of the errors have been changed to warnings
-
Fixes "One Of" JSON rendering. This fix does not include JSON schema for multiple
One of
definition in MSON object. #288
-
Parameters in Refract output will no longer contain a
content
value when there is no sample value. #286 -
Errors raised from Snowcrash, the underlying parser are now treated as errors. This resolves an issue where Drafter would get into an infinite loop when certain circular references are found in MSON Data Structures. #255
-
Errors raised from drafter are now correctly treated as errors, previously they were exposed as warnings.
-
Improved error reporting with source maps when using cdrafter.
-
Resolved an issue when using a mixins from implicit objects would raise a warning that the implicit object was not an object. #138 #243
This release restores an API that caused a breaking change in the previous pre-release 2.3.0-pre.1.
-
It was causing lot of different problems like segmentation faults, stack overflows or even infinite loops depending on what error was ignored. #269
-
Variable property name issues are fixed including correct generation of JSON Schema.
-
Improved error reporting. Some of the semantic errors like circular references were issued without a sourcemap information, that is not the case anymore.
-
httpRequest
andhttpResponse
payloads now have source maps attached while using the Refract output. #259
-
Partial implementation of RFC 4: Request Parameters has been added. Request parameters are now parsed, however validation of these parameters is not yet handled.
-
Adds support for building Drafter with Microsoft Visual Studio 2015.
-
The content-type for JSON Schema messageBodySchema is now correctly
application/schema+json
. -
Fixes a problem while rendering JSON Schema may have resulted in an
ExtendElement
warning. #217
- The JavaScript API has been aligned with the Protagonist binding, allowing you to use Drafter JS and Protagonist with the same interface.
- Fixes a crash when handling circular references in MSON Mixins.