Граф коммитов

340 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Whitlock 6092438bba Removed plugin support
Fixes #55
2016-01-11 10:21:42 -07:00
Jeremy Whitlock 6ca745d60e Added `Operation#getParameter(name, [location])`
Fixes #56
2016-01-08 16:18:01 -07:00
Jeremy Whitlock 371f15e959 Added support for nested query parameters
Fixes #39
2016-01-08 10:25:30 -07:00
Jeremy Whitlock 52d4c431a5 Consistency changes per #52
Update `Operation#validateResponse` and `Response#validateResponse`
consistent with `Operation#validateRequest` and
`Response#validateRequest` respectively by wrapping all arguments in an
object so we can change things without breaking the API.

Fixes #52
2016-01-07 12:38:03 -07:00
Jeremy Whitlock a2bb712d1b Treat invalid/missing JSON References as structural errors 2016-01-07 11:43:12 -07:00
Jeremy Whitlock 13f1c4ccfd Fix bug with loading a relative document with options.relativeBase
While working on #50 I ran into an issue where the initial read of the
Swagger document would not use the `options.jsonRefs.relativeBase`.

Fixes #50
2016-01-07 11:27:52 -07:00
Jeremy Whitlock 0668ca83b0 Cleaned up the jsdoc/API documentation
Fixes #49
2016-01-07 10:31:24 -07:00
Jeremy Whitlock 2ea32491e3 Minor debugging changes 2016-01-06 21:58:31 -07:00
Jeremy Whitlock b1626dc4d6 Treat missing references as structural errors 2016-01-06 21:21:13 -07:00
Jeremy Whitlock 877111239f Updated dependencies to prepare for #43 2016-01-06 14:07:32 -07:00
Jeremy Whitlock 3f72bcc1d1 Added a test for single item array query parameters 2016-01-05 15:17:10 -07:00
Jeremy Whitlock 64af0ccefd Merge pull request #53 from xuanli09/xuanli09-custom-validators
Fixed custom validators not being registered.
2016-01-05 14:27:29 -07:00
Xuan Li 379d6da77c Fixed registration of customValidators during creation of SwaggerApi. 2016-01-05 12:36:35 -08:00
Jeremy Whitlock 1a3102625c Removed callback support
Fixes #51
2015-12-29 11:04:25 -07:00
Jeremy Whitlock f35fb43b2a Added `String -> [Array|Object]` coercion
When working on #46 we removed this type coercion because it caused some issues elsewhere.  It was a mistake and this commit fixes things without breaking the original issue.

Fixes #48
2015-12-29 10:48:32 -07:00
Jeremy Whitlock 4431d83a09 Moved all response-specific APIs to a Response type
Fixes #44
2015-12-27 17:25:55 -07:00
Jeremy Whitlock 5bb0f40169 v0.6.0 2015-11-25 14:51:01 -07:00
Jeremy Whitlock 473c6db5be Stop coercing values when the expected type is unknown
JSON Schema allows its schemas to omit the type property but Sway was
treating missing types as objects.  Not only is this wrong but it also
led to bugs like #46.
2015-11-25 14:43:19 -07:00
Jeremy Whitlock f59b9c035a v0.5.4 2015-11-25 12:51:35 -07:00
Jeremy Whitlock 3e6c34e6b3 Fix bug with invalid type error reporting with Buffers 2015-11-25 12:44:48 -07:00
Jeremy Whitlock 2f4d491b31 v0.5.3 2015-11-25 11:31:48 -07:00
Jeremy Whitlock 0fb8764957 Handle issue with doing String->Object conversion
Right now, we use `JSON.parse` to convert strings to objects but instead
of wrapping that in a try/catch block, we'd let the errors bubble up.
This results in unexpected errors and breaks the type checking portion
of sway so we needed to fix it.

Fixes #46
2015-11-25 11:24:53 -07:00
Jeremy Whitlock a6eb6b746a v0.5.2 2015-11-11 23:40:49 +01:00
Jeremy Whitlock 0460f5086d Preparing for release 2015-11-11 23:38:53 +01:00
Jeremy Whitlock e9d432c579 Validate path parameter declarations that are empty
Fixes #40
2015-11-11 23:36:49 +01:00
Jeremy Whitlock cb2c901bf7 Fix validation of strings when not date/date-time
Fixes #41
2015-11-11 23:21:01 +01:00
Jeremy Whitlock 8f9fc36dbb Handle Buffer types when validating responses/parameter values
Fixes #42
2015-11-11 23:15:34 +01:00
Jeremy Whitlock c2f93462ad Updated schema validation to remove the schemaId from errors 2015-11-03 16:23:59 -07:00
Jeremy Whitlock 2ebd6ebb26 v0.5.1 2015-11-03 15:40:51 -07:00
Jeremy Whitlock dfdaa303eb Update Operation#validateResponse to use the default response when necessary 2015-11-03 15:39:18 -07:00
Jeremy Whitlock 492eca3965 v0.5.0 2015-11-02 15:18:50 -07:00
Jeremy Whitlock 935fe9489d Update Operation#validateResponse to no longer throw an Error
* Instead of throwing an error when called with an undescribed status
  code we now put those details in the response structure
2015-11-02 15:16:18 -07:00
Jeremy Whitlock d7e2037ea2 v0.4.0 2015-11-02 10:57:34 -07:00
Jeremy Whitlock 4bd06f4181 breaking: removed SwaggerApi#getLastErrors and SwaggerApi#getLastWarnings
These APIs were removed in favor of `SwaggerApi#validate` returning the
validation results.  Not only is this API simpler but for the newly
created `Operation#validateRequest` and `Operation#validateResposne`,
these changes will result in a consistent approach for all validation APIs.
2015-11-02 10:53:48 -07:00
Jeremy Whitlock 9f07fcc19a Added request/response validation APIs
* Added Operation#validateRequest
* Added Operation#validateResponse
2015-11-02 10:06:43 -07:00
Jeremy Whitlock f07c8b2cf0 Fix bug with supporting allOf references to model with circular reference
Fixes #38
2015-10-28 14:46:18 -06:00
Jeremy Whitlock f391f6d6e0 Updated README with new binary sizes 2015-10-23 15:10:11 -06:00
Jeremy Whitlock 10a49434d1 v0.3.3 2015-10-23 14:42:19 -06:00
Jeremy Whitlock b5cfe2c7ef Prepare for release. 2015-10-23 14:41:39 -06:00
Jeremy Whitlock 2120d98522 Fixed issue with file parameters being marked as invalid
Fixes #37
2015-10-23 14:33:26 -06:00
Jeremy Whitlock a00750d80c Update release notes for previous commits 2015-10-22 20:21:03 -06:00
Jeremy Whitlock 3e2766cdaf Fix validation of optional parameters
Fixes #34
2015-10-22 20:13:49 -06:00
Jeremy Whitlock db2c16a946 Update Parameter#getValue to work with http.ClientRequest or similar
Fixes #35
2015-10-22 15:37:37 -06:00
Jeremy Whitlock 5f76e9fd96 Updated json-refs to fix a bug with remote reference errors
Fixes #36
2015-10-22 10:07:55 -06:00
Jeremy Whitlock dc9adde5ae Code cleanup
* Broke out lib/types.js into separate files per type
* Broke out test/test-2.0.js into separate files per type
2015-10-20 17:52:34 -06:00
Jeremy Whitlock ff608e640d v0.3.2 2015-10-14 14:34:54 -07:00
Jeremy Whitlock d29bfb6271 Preparing for release 2015-10-14 14:34:46 -07:00
Jeremy Whitlock 0807de5260 Updated release notes for previous PR merges 2015-10-07 08:44:42 -06:00
Jeremy Whitlock 09e8d15be5 Build browser binaries based on PR merge 2015-10-07 08:43:06 -06:00
Jeremy Whitlock 25ba9f5c66 Merge pull request #30 from APIs-guru/master
Fix sub schemas validations from 'properties' keyword
2015-10-07 08:40:08 -06:00