Ray Chen
52f2e1118d
Add credscan security task.
...
[skip ci]
2019-12-04 15:33:11 +08:00
nickzhums
ece6f1bc98
Update x-ms-secret validation logic for live validation ( #86 )
...
* Update live validation logic for "x-ms-secret", specifically, check if x-ms-secret is "true" in the response. If so, throw an error
2019-11-22 16:22:31 +08:00
nickzhums
b3798c1795
Use a faster deep clone library and update gulp to version 4 ( #85 )
...
During performance profiling of validation service v1 and v2, it was observed that lodash's deep clone takes a lot of time and CPU during initialization and API load testing.
It turns out that we can find a better deep clone library according to this benchmark:
https://github.com/ahmadnassri/benchmark-node-clone
After experimental testing, I've observed that latency has significantly reduced if we replace lodash's deep clone with clone-deep library (https://www.npmjs.com/package/clone-deep )
Therefore I made a few code changes and created this pull request to improve perf.
2019-11-19 14:58:22 +08:00
nickzhums
77ab4bcbe5
[S1007882] Support x-ms-mutability in response validation ( #83 )
...
Adjust logic in Z-schema custom validator to check if a write-only property (x-ms-mutability) is in the response. If so, report a WRITE_ONLY_PROPERTY_NOT_ALLOWED_IN_RESPONSE error.
Added unit tests for x-ms-secret and x-ms-mutability
2019-10-31 17:05:06 +08:00
Renhe Li
906679ca6b
Add the support for x-ms-secret property ( #82 )
...
* Add custom validator to support additional validation work
* Implement writeOnly property
* Update the code to switch back to use 'x-ms-secret'
* Update to use @ts-common/z-schema
2019-10-12 13:37:02 +08:00
Ray Chen
4fb8e6f1df
Add path info to error message for parameters validation in examples. ( #81 )
...
* Add path info in error for parameters in examples.
Set path info in error message in case of it's null in internal error
messages.
* Add change log and bump package version.
* Fix tslint error.
2019-09-04 14:01:19 +08:00
Ray Chen
2eafebcf13
Skip to load parameter value when it's not provided. ( #80 )
...
* Skip to load parameter value when it's not provided.
* Return the value whatever it is undefined or null.
* Bump the package version.
2019-07-02 11:07:15 +08:00
Amar Zavery
c8af63f200
Ensure propertyName is populated correctly in the error message for readonly property ( #79 )
2019-06-26 11:44:26 -07:00
Eric Williams
0223ed9ceb
Fix to properly return schemaPath in errors ( #78 )
2019-06-12 12:27:47 -07:00
Eric Williams
d1bf668e95
Returning schema paths for missing required property ( #77 )
2019-06-10 13:01:20 -07:00
Eric Williams
c625f02db6
Upgrading to z-schema 4.1.0, bumping version 1.7.3 to 1.7.4 ( #76 )
...
* Upgrade to z-schema 4.1.0
* Bumping version 1.7.3 -> 1.7.4
2019-05-30 11:19:44 -07:00
Amar Zavery
2e5991716d
Add support for validating readonly properties in the request payload ( #74 )
...
* check for type of the payload and presence of the discriminator in the payload while validating the discriminator
* Add support for validating readOnly properties in the request payload
* address review feedback
* fixed lint issue.
2019-05-29 15:03:58 -07:00
Vlad Barosan
bed0b058a0
Update package version ( #73 )
2019-05-08 14:21:25 -07:00
Vlad Barosan
2743fdbd9a
Dont validate discriminator value when in the case of lenient discriminator ( #72 )
2019-05-08 10:13:30 -07:00
Vlad Barosan
377b3ea598
Do request body param validation when its an object ( #71 )
...
* Do request body param validation when its an object
* Improve code for missing required parameter
2019-04-10 17:11:29 -07:00
Vlad Barosan
1a2f694491
Skip validations ( #70 )
...
* Skip validation for response
* update z-schema to support skipping validations
* Validate parameters
* fix lint
* Skip invalid content type also
2019-04-05 14:14:20 -07:00
Vlad Barosan
9cedce73b8
Support polymorphic anyof ( #69 )
2019-04-01 16:47:18 -07:00
Sergey Shandar
9a9c01386e
x-ms-enum ( #68 )
2019-02-05 13:34:18 -08:00
Sergey Shandar
b886814f8d
update ( #67 )
...
* JSON types.
* remove NSP
* Update Types
* Update
2019-01-29 16:15:47 -08:00
Sergey Shandar
78f1a6225b
update types ( #66 )
...
* JSON types.
* remove NSP
* Update Types
2019-01-28 16:16:43 -08:00
Sergey Shandar
058c6017aa
JSON types. ( #65 )
...
* JSON types.
* remove NSP
2019-01-15 15:34:52 -08:00
Sergey Shandar
20785fe256
`default` response is only applied for error status codes. ( #64 )
...
* `default` response is only applied for error status codes.
* 1.4.00
2018-12-06 17:01:33 -08:00
Sergey Shandar
0d632e770b
Move back to z-schema. ( #62 )
...
* back to Z-Schema
* ignore package-lock.json
* ignore .tgz files
2018-11-26 10:43:42 -08:00
Sergey Shandar
2768b08da5
Remove rewire. ( #61 )
...
* Remove rewire.
* switch to ts-common/s-zchema for now.
* z-schema => @ts-common/z-schema
2018-11-21 17:51:13 -08:00
Sergey Shandar
d2bccb6933
StringMap ( #60 )
2018-11-14 15:23:41 -08:00
Sergey Shandar
8c9bf61fe4
According to Swagger 2.0, `responses` is required. ( #59 )
2018-11-13 17:03:10 -08:00
Sergey Shandar
202d214951
InfoObject ( #58 )
2018-11-08 16:15:52 -08:00
Sergey Shandar
54b1296107
swagger version ( #57 )
2018-11-08 15:38:38 -08:00
Sergey Shandar
94fdfcb05c
Update SwaggerObject definition ( #56 )
2018-11-08 15:01:14 -08:00
Sergey Shandar
66fb20a247
no travis-ci ( #55 )
2018-11-02 11:28:01 -07:00
Sergey Shandar
7b4148c719
Merge branch 'validation' of https://github.com/Azure/sway into validation
2018-11-02 11:09:44 -07:00
Sergey Shandar
826456355b
minor
2018-11-02 11:07:40 -07:00
Sergey Shandar
1d83a5d90d
Set up CI with Azure Pipelines
2018-11-02 11:07:14 -07:00
Sergey Shandar
568384def2
validation
2018-11-02 11:05:18 -07:00
Sergey Shandar
f70c5b4218
azure-pipelines ( #54 )
...
* azure-pipelines
* ^
* gulp 3.9.1
* natives ^1.1.6 to fix gulp on Node 11.
2018-11-02 11:01:20 -07:00
orangegrove1955
61800fdb44
Fixed title, corrected spacing for easier reading ( #53 )
2018-10-18 10:09:38 -07:00
Sergey Shandar
cf7e55714f
update ( #50 )
2018-10-12 13:04:45 -07:00
Sergey Shandar
9dcf558333
fix json schema faker ( #49 )
...
* fix json-schema-faker
* 1.0.15
2018-10-02 11:07:03 -07:00
Sergey Shandar
45820dbda0
Sergey/update10 ( #48 )
...
* Switch back to z-schema
* 1.0.14
2018-10-01 16:52:53 -07:00
Sergey Shandar
6adde9c6a0
Switch back to z-schema ( #47 )
2018-09-24 10:22:31 -07:00
Veronica Giaudrone
0afda4f64e
adding symbol info to semantic errors ( #46 )
...
* adding symbol info to semantic errors
* updating package version
* fixing quotes in require
* Update validators.js
2018-09-19 17:13:17 -07:00
Sergey Shandar
8ead61390a
@ts-common/z-schema ( #45 )
...
* description in ResponseObject
* interesting
* package.json update
* update
* update
* update to `sergey/crlf`
* change branch
* Switch to @ts-common/z-schema
2018-09-11 12:43:46 -07:00
Sergey Shandar
57289a6efc
Update Z-Schema ( #44 )
...
* description in ResponseObject
* interesting
* package.json update
* update
* update
* update to `sergey/crlf`
* change branch
2018-08-28 12:57:58 -07:00
Sergey Shandar
4d00755a72
Sergey/readonly2 ( #43 )
...
* update
* remove schema
* readonlyArray
* update
* parameters readonly
* more readonly
2018-08-23 12:18:18 -07:00
Sergey Shandar
d64b286948
Sergey/readonly ( #42 )
...
* update
* remove schema
* readonlyArray
* update
2018-08-23 11:11:55 -07:00
Sergey Shandar
262b170042
remove schema ( #41 )
...
* update
* remove schema
2018-08-22 14:08:41 -07:00
Sergey Shandar
1da8dbe5a9
file schema ( #40 )
...
* SchemaObject
* 0.0.16
* lock
* update
* FileSchemaObject
* ResponseSchemaObject
* upate package.json
* update
2018-08-21 12:51:50 -07:00
Sergey Shandar
171494ab75
type definitions ( #39 )
...
* SchemaObject
* 0.0.16
* lock
* update
2018-08-16 15:35:48 -07:00
Sergey Shandar
87a7096930
update2 ( #38 )
...
* update Operation
* Package lock
* operation fix
* 1.0.44
2018-08-10 20:28:54 -07:00
Sergey Shandar
7c70a95684
update Operation ( #37 )
...
* update Operation
* Package lock
2018-08-10 17:49:31 -07:00