- Fix issue where an
object
with alength
property was incorrectly traversed (Issue #557) - Remove
string
dependency (PR #542)
- Remove support for nested controllers (Issue #537, #540)
- Added support for nested controllers (PR #422, Issue #283)
- Fix issue where async controllers were not identified properly (Issue #443)
- Fix issue where the
failedValidation
property was not set forContent-Type
request validation errors (PR #420) - Fix issue where
array
body
parameters would coerce non-array types into an array _(Issue #438) - Fix issue where swagger-ui shows an error icon trying to validate a swagger doc for an internal API (Issue #323, #370, #526)
- Updated dependencies for security vulnerabilities (Issue #384, #535)
- Fix issue with initializing middleware with an invalid Swagger document (Issue 355)
- Bring back
84b3e83
which was reverted in0.9.16
- Fix a bug where file parameters could produce a runtime error if
req.files
was empty, which can happen if you do not provide the parameter (Issue #350) - Revert
v0.9.14
release (We will be adding it back for0.10.0
. Long story short, forces that I do not control require that I remove this fix and put it into a minor release instead to avoid upstream projects we do not maintain all the sudden reporting errors in response validation that didn't previously report them. I am sorry for having to do this, it was not my idea and I was against it completely.)
- Fixed an issue where
multer.any()
resulted in file parameters not being found properly (Issue 348) - Updated swagger-ui (Issue #349)
- Fixed an issue where string an
Array
passed as aString
wasn't handled properly (PR 341)
- Upgrade json-refs for upstream bug fixes
- Fixed a problem when initializing middleware where some errors could terminate without being logged
- Added support for nested query parameters, as supported by qs (Issue #294)
- Fixed a bug where the generated swagger-ui URL was wrong behind a proxy (Issue 297, 317)
- Fixed an issue where
consumes
andproduces
values having acharset
could break request/response validation (Issue 295) - Fixed an issue where with Swagger 2.0 documents, you cannot use
#validateModel
with anArray
object (Issue 303) - Fixed an issue where array values were not validated against their validation constraints, on their format/type (Issue 300)
- Fixed an issue with
collectionFormat=multi
not working right with singlar values (Issue 313)
- Backport body-parser to run on environments without
Uint8Array
- Make it so you can provide your own text body parser (Issue 293)
- Report all JSON Schema validation errors instead of failing on the first one (Issue 286)
- Add
ignoreMissingHandler
option to swagger-router middleware to allow the API author to dictate how to handle missing handlers (Issue #274) - Fix bug with handling primitive body parameters
- Make anyOf/oneOf JSON Schema validation errors more human readable (Issue #200)
- Updated swagger-ui (Issue #273)
- Updated the Swagger 2.0 JSON Schema
- Add support for
allowEmptyValue
for parameters (Issue #282) - Better integer/number validation for parameter values (PR #279)
- Fix missing mock support for
date
anddate-time
(Issue #277)
- Fixed a problem with 304 requests running middleware twice (PR 270)
- Fixed a problem with mock support in Hapi.js (Issue #269)
- Fixed an issue where body parameters did not use their real schema during parameter processing (Issue #251)
- Reverted a463907 (Issue #259)
- Added support for URI encoded path parameters (Issue #230)
- Fixed problem for Express where 204/204 remove the
Content-Type
header which makes response validation impossible (PR #258) - Fixed problem for references to within referenceable objects not marking the referenceable object as referenced (Issue #176)
- Updated the build process to produce smaller browser binaries
- Updated the Swagger 2.0 JSON Schema file
- Added support for YAML remote references (Issue #222)
- Added support to do
operationId
based mapping of controllers (Do not confuse this with Issue #219/#221) (PR #218) - Better error handling and debugging for request/response validation
- Fix bug where a primitive string response could trigger a validation failure due to it treated as a model (Issue #224)
- Fix bug where Swagger 2.0 default values were being type coerced unnecessarily (Issue #235)
- Fix issue where mock responses did not have their
Content-Type
set propertly toapplication/json
(Mock mode only works with JSON right now) (Issue #234) - Fix issue where custom formats would break validation (Issue #243)
- Fix problem where references to missing parameters could result in a runtime error (Issue #233)
- Updated swagger-router to throw a
500
when there is a configured route handler but it is missing (Issue #155) - Update swagger-metadata to set the
value
property ofreq.swagger.params
to be the original value if type coercion fails - Update swagger-validator to not perform response validation whenever there is no response schema (PR, 231, Issue #232)
- Updated version of swagger-converter (PR #226)
- Added support for collectionFormat in swagger-metadata middleware (Issue #167)
- Added support for file/multipart parameters and added tests for all known usages of
form
/formData
parameters (Issue #60) - Added unit tests for the CLI (And fixed a number of inconsistencies/bugs as a result) (Issue #84)
- Added validation that checks for operations with both a body and a form/formData parameter (Issue #211)
- Always use
YAML.load
in the CLI when reading files instead of choosing JSON or YAML based on the file extension (Issue #215) - Fixed bug with inline schemas used for inheritance being marked as unused (Issue #187)
- Fixed bug in swaggerUi middleware that did not allow an explicit
apiDocs
path for Swagger 2.0 documents (Issue #183) - Updated CLI validation to have a
--verbose
flag to output pertinent verbose information regardless of validation result (Issue #179)
- Fixed bug with CLI not handling invalid invocations properly
- Fixed bug with bundled parsers being called unnecessarily in middleware (Issues #172)
- Fixed bug with inline schemas for Swagger 2.0 inheritance (Issue #173)
- Fixed bug with middleware initialization due to upstream json-resf bug (Issue #190)
- Fixed bug with validator middleware where the error object had the right message but the error stack did not (Issue #175)
- Update Swagger 2.0 JSON Schema from swagger-spec (Issue #189)
- Update Swagger UI to latest (Issue #163)
- Fix bug in swagger-metadata middleware that could cause
next
to be called more than once due to a downstream error (Issue #165)
- Support one single Swagger path definition being all undefined subpaths for said path (Issue #162)
- Fixed bug where unresolvable model references in operation parameters for Swagger 1.2 were not flagged
- Fixed bug in swagger-router where using mock mode caused the server to stop responding after the first request (Issue #152)
- Debugging support (Issue #8)
- Each middleware provided now is one implementation instead of one implementation per Swagger version (This has zero consumer impact unless you were initializng Swagger middleware directly)
- Validate operation to ensure only one
body
parameter (Issue #136)
- swagger-tools CLI displays help output when an invalid command or no command is passed to swagger-tools CLI (Issue #130)
- swagger-tools CLI handles invalid Swagger documents caused by an invalid/missing Swagger version (Issue #129)
- Bumped all dependencies and development dependencies due to some upstream updates causing issues
- Better handling of references to invalid objects (Issue #120, #121)
- Fix bug validating models with a
default
attribute (Issue #124) - Fix bug validating models without properties (Issue #122)
- swaggerMetadata middleware now converts paramters to their appropriate type (Issue #119)
- swaggerRouter middleware now handles void responses for mock mode (Issue #112)
- swaggerRouter middleware now wraps controller calls in try/catch block and sends errors downstream via
next
(Issue #123) - swaggerSecurity middleware now sends authentication/authorization errors downstream via
next
(Issue #117) - swaggerSecurity middleware now handles API Key authentication/authorization (Issue #128)
- swaggerUi middleware now allows you to serve your own custom swagger-ui resources (Issue #111)
- Attached the original data sent to
res.end
to response validation errors (Issue #110) - Response validation for Swagger 2.0 now takes the default response into account when validating (Issue #99)
- Removed requirement for servers to wire up body/query string parsers (We default to body-parser and qs respectively.) (Issue #70)
- Updated the version of Z-Schema being used to fix some browser issues (Issue #94)
- Updated to build/test the browser using
gulp
gulp test
(Issue #96) - Specification APIs for Swagger 2.0 now do a full validation prior to performing the business logic behidn the API (Issue #97)
- Fixed Quick Start documentation example (Issue 101)
- Fixed a bug in the CLI where local YAML files were not processed properly (Issue #104)
- Fixed a bug where erroneous validation errors were thrown for valid files due to paths with path paramters and vendor extensions (Issue #103)
(Contained only upstream release changes)
- Added API/CLI for Swagger 1.2 to 2.0 conversion (Issue #41)
- Fix browser build (Issue #90)
- Properly support Swagger 2.0 form parameters (Issue #88)
- Support validating responses (Issue #25)
(Contains breaking changes)
- Add an API (
Specification#resolve
) to get all of or part of a Swagger document as fully resolved (Issue #63) - All
Specification
APIs now require an error-first callback as the last argument - Fix support for header parameters where case caused an issue (Issue #82)
- Make sure tests that were async were written properly (Issue #65)
- Middleware now requires you to use the
initializeMiddleware
function during server initialization to validate your Swagger document(s) and return the appropriate middlewares (Issue #77) - Refactor to support upstream path-level authorizations in Swagger 1.2 (Issue #27)
- Support path parameters that are not path segments (Issue #72)
- Support references throughout the Swagger 2.0 document (Issues: #38, #55, #68, #73, #79)
- Support remote reference (Issue #54)
- Support Swagger 2.0 security (Issue #69)
- Support validating remote files from the CLI (Issue #74)
- Support validating YAML files from the CLI (Issue #75)
- Switched from jjv+jjve for JSON Schema validation to ZSchema
- Validate situation in Swagger 1.2 where the model id and the model's
id
field are not the same (Issue #71) - When printing out validation errors/warnings, support inner errors/warnings (Issue #85)
- Various minor bug fixes that did not result in issues
- Various documentation/example fixes to support the changes above