- 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
Response#validateResponse
- API Changes
Operation#getResponseExample
->Response#getExample
Operation#getResponseSample
->Response#getSample
- API Additions
- Removed callback support for
Sway#create
(Issue 51)
- Remove logic to do
String
->Object
coercion - 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.)
- Fixed bug in error reporting when
Buffer
was converted to aString
and failed type conversion
- Fixed a bug with
String
->Object
conversion resulting in unexpected response validation errors (Issue #46)
- 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)
- Updated
Operation#validateResponse
to use thedefault
response when validating a response code that isn't defined
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
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.
- 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)
- Fixed sub-schema validation of properties with special names (PR 30)
- Updated Swagger 2.0 JSON Schema (PR 31)
- 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)
- Updated json-refs for service/web worker support (Issues #22)
- Updated z-schema to avoid throwing runtime errors on unknown formats (Issues #20)
- Updated json-refs to fix a big bug in local reference resolution for remote documents (See json-refs/issues/30)
- Fix a bug where missing
securityDefinitions
could result in a runtime error
- Fix bug with loading relative references (Issue #17)
- Fix bug with loading YAML references (Issue #17)
- Make errors in
SwaggerApi#create
handleable (Issue #16)
- Added
Path
object,SwaggerApi#getPath(reqOrPath)
andSwaggerApi#getPaths()
- Initial release