7.1 KiB
Release Notes
v1.0.0 (TBD)
- Added support for nested query parameters, as supported by qs (Issue #39)
- Added
Operation#getParameter(name, [location])
(Issue #56) - Added
Operation#getSecurity
to gather the composite security for an operation (The previous approach was to overwriteOperation.security
with the computed value but this could be confusing) - Added
SwaggerApi.definitionRemotesResolved
(Object containing the Swagger document with all of its remote references resolved) - Changed object exported in the browser from
SwaggerApi
toSway
- Changed the
definition
property forOperation
,Parameter
,Path
andResponse
to now bedefinitionFullyResolved
and now thedefinition
property is the original, non-dereferenced value - Fixed a bug where
Path#getOperation
did not handle uppercase method - Fixed a bug where
Sway#create
did not properly register custom validators (Issue #53) - Fixed a bug where
Sway#create
with a relativeoptions.definition
did not takeoptions.jsonRefs.relativeBase
into account for the initial load - Fixed a bug where identifying required parameters didn't work in all cases (Issue #60)
- Fixed a bug where we removed
String -> [Array|Object]
coercion to fix issue #46 but shouldn't had (Issue #48)' - Moved all response-specific APIs from
Operation
to theResponse
type exceptOperation#validateResponse
(Issue #44)- API Additions
Operation#getResponse
Operation#getResponses
- API Changes
Operation#getResponseExample
->Response#getExample
Operation#getResponseSample
->Response#getSample
- API Additions
- Removed callback support for
Sway#create
(Issue 51) - Removed plugin support (Issue #55)
- Removed approach that would overwrite
Operation.parameters
with the composite parameters (The previous approach would setOperation.parameters
to include all parameter definitions, even ones defined at the path level. This could be confusing.Operation.parameterObjects
,Operation#getParameters
andOperation#getParameter
already solve the need to have a composite view for operation parameters.) - Removed
Parameter#getSchema
andParameter.computedSchema
in favor of usingParameter.schema
for consistency - Removed
SwaggerApi.resolved
in favor ofSwaggerApi.definitionFullyResolved
(Object containing the Swagger with all references fully resolved) - Updated invalid/missing JSON References to be a structural validation errors like z-schema does
- Updated
SwaggerApi#validate
to include json-refs warnings as validation warnings - Updated validation errors/warnings to no longer have
params
pruned (Issue #61) - Updated validation errors/warnings to no longer have
schemaId
pruned when its value is notundefined
(Issue #61) - Various changes to all constructors in
lib/types
(Should have no impact since these are technically internal)
v0.6.0 (2015-11-25)
- Remove logic to do type coercion when the expected type is unknown (We use to assume that a missing
type
was oftype
object
. This is wrong per JSON Schema which allows a missingtype
and handles it specially.)
v0.5.4 (2015-11-25)
- Fixed bug in error reporting when
Buffer
was converted to aString
and failed type conversion
v0.5.3 (2015-11-25)
- Fixed a bug with
String
->Object
conversion resulting in unexpected response validation errors (Issue #46)
v0.5.2 (2015-11-11)
- Added validator for empty path parameter declarations (Issue #40)
- Fixed a bug with validating strings that were not
date
ordate-time
format (Issue #41) - Fixed a bug where passing a
Buffer
toOperation#validateResposne
could result in unexpected schema validation failure (Issue #42)
v0.5.1 (2015-11-03)
- Updated
Operation#validateResponse
to use thedefault
response when validating a response code that isn't defined
v0.5.0 (2015-11-02)
Note: This release changes how Operation#validateResponse
works. Instead of throwing an Error
whenver the API
is consumed when providing a status code that is not documented in Swagger, we now provide the error details in the
response structure. (I realize I said I'd do my best to avoid breaking changes but this change was based on user
feedback and the chances of v0.4.0
installations being out there are very small.)
- Updated
Operation#validateResponse
to no longer throw anError
but instead to put the error details in the response structure
v0.4.0 (2015-11-02)
Note: This release has a breaking change as documented below. I realize changing APIs should result in a major
version release but I did not want to force an early v1.0.0
release just because of this. The possibility of
breaking API changes prior to v1.0.0
were clearly mentioned on the project home page from day one. While I will
do my best to avoid this happening, this was one of those cases where for API consistency, the change was merited.
- Added
Operation#validateRequest
andOperation#validateResponse
APIs - Fixed issue with valid models being marked as inheriting circularly when an ancestor model has a circular reference (Issue #38)
- (BREAKING) Removed
SwaggerApi#getLastErrors
andSwaggerApi#getLastWarnings
in favor ofSwaggerApi#validate
returning the validation results. This will make all of the validation APIs consistent in how they work.
v0.3.3 (2015-10-23)
- Fixed issue with file parameters being marked as invalid (Issue #37)
- Fixed issue with optional parameters being marked as invalid (Issue #34)
- Fixed issue with
Parameter#getValue
not supporting non-plain object *(We need this for when passing in anhttp.ClientRequest
) (Issue #35) - Updated json-refs to fix a bug with remote reference errors (Issue #36)
v0.3.2 (2015-10-14)
- Fixed sub-schema validation of properties with special names (PR 30)
- Updated Swagger 2.0 JSON Schema (PR 31)
v0.3.1 (2015-09-30)
- Add support for
allowEmptyValue
for parameter value validation (Issue #27) - Better integer validation for parameter values (PR #26)
- More human-readable errors related to JSON Schema validation when
anyOf
oroneOf
validation fails (Issue #15) - Update json-refs to work with
options.jsonRefs.location
having a hash (Issue #24)
v0.3.0 (2015-09-18)
- Updated json-refs for service/web worker support (Issues #22)
- Updated z-schema to avoid throwing runtime errors on unknown formats (Issues #20)
v0.2.3 (2015-08-31)
- Updated json-refs to fix a big bug in local reference resolution for remote documents (See json-refs/issues/30)
v0.2.2 (2015-08-31)
- Fix a bug where missing
securityDefinitions
could result in a runtime error
v0.2.1 (2015-08-26)
- Fix bug with loading relative references (Issue #17)
- Fix bug with loading YAML references (Issue #17)
- Make errors in
SwaggerApi#create
handleable (Issue #16)
v0.2.0 (2015-08-25)
- Added
Path
object,SwaggerApi#getPath(reqOrPath)
andSwaggerApi#getPaths()
v0.1.0 (2015-08-12)
- Initial release