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

260 Коммитов

Автор SHA1 Сообщение Дата
raychen 0d8fc2952e Ignore required rule validation in response in case of x-ms-secret. 2020-11-25 10:30:34 +08:00
raychen 8815d179d1 Release 2.0.0 version 2020-11-24 11:07:36 +08:00
Ray Chen 63330796d1
Ignore required rule check in response. (#543)
Only in case of both required and x-ms-secret:true are annotated.
2020-10-16 09:50:16 +08:00
Renhe Li 8f45598321
Apply the latest change for yasway to treat {} and null for parameter body with the same behavour (#541)
Co-authored-by: FAREAST\renhel <renhel@microsoft.com>
2020-09-29 13:18:39 +08:00
Ray Chen 424143000c
Ignore invalid yaml object when parse error. (#539)
* Ignore invalid yaml object when parse error.

* update package.lock
2020-09-16 15:18:52 +08:00
Wenhao Zhang cd3896e62c
Update function getErrorsFromSemanticValidation to extract inner error correctly (#530)
* Fix oav bug

* lint fix

* bump version and add changelog

Co-authored-by: t-zhangw <codespace@72c482c53b75>
2020-09-04 10:51:09 +08:00
Renhe Li f12bb2528c
Fix the additional path item problem for error path (#527)
* Fix the additional path item problem for error path

* Update snapshot file

* Support writeonly property

* Apply the change for write_only property

* Update the version of OAV

Co-authored-by: FAREAST\renhel <renhel@microsoft.com>
2020-08-18 16:28:07 +08:00
Renhe Li 822ab7e7ba
Remove sensitive value is the live validation result of x-ms-secret (#525)
* Remove sensitive value is the live validation result of x-ms-secret

* Undo unnecessary file

Co-authored-by: FAREAST\renhel <renhel@microsoft.com>
2020-08-17 14:14:02 +08:00
Wenhao Zhang d7f69d59cf
Export more methods from oav for validation in unified pipeline (#523)
* Export more methods from oav for validation in unified pipeline

* minor

* add change log and bump version

Co-authored-by: t-zhangw <codespace@72c482c53b75>
2020-08-14 15:56:26 +08:00
Johnson Yang 9365547033
Upgrade yargs version to fix security vulnerability warning (#521) 2020-08-13 08:30:32 +08:00
Ray Chen 79cb1cdcca
Take perf fix from yasway. (#517) 2020-07-27 09:23:29 +08:00
Renhe Li d6241a5024
Fix the bug that the value of 'x-ms-secret' should be boolean instead of string (#514)
Co-authored-by: FAREAST\renhel <renhel@microsoft.com>
2020-07-09 12:59:30 +08:00
Ray Chen 46f761f01a
Fixed nullable value bug (#511)
* Fixed nullable value bug

Avoid adding nullable value for parameter when its' type isn't string.
2020-05-25 17:30:58 +08:00
Ray Chen 11713918e3
Output the exception information when pretty switch is enabled (#504)
* Bug #1106292 output exception info

Output the exception information When pretty switch is enabled.
2020-04-20 14:43:30 +08:00
JianyeXi 3ddb780aa9
fix model validation failure when path parameter value containing sep… (#502)
* fix model validation failure when path parameter value containing sepecial charaters

* handle useSchemePrefix property in x-ms-parameterized-host

* update

* handle default useSchemePrefix

* fix snapshot

Co-authored-by: Jianye Xi <jianyxi@microsoft.com>
2020-04-10 17:08:13 +08:00
Ray Chen a2d2f5edbd
Upgrade yasway version. (#500)
* Upgrade yasway version.

Include the regression fix on customvalidator.
2020-03-30 11:01:11 +08:00
Ray Chen 1dcb4322d0
Upgrade yasway to include the fix. (#498)
* Upgrade yasway to include the fix.

The fix on global parameter validation in request.
Added unit test.

* Update regression snapshot.
2020-03-27 19:15:43 +08:00
Renhe Li a679d0f8c4
Update the version of yasway and add the test case for x-ms-mutiablilty read (#497)
Co-authored-by: FAREAST\renhel <renhel@microsoft.com>
2020-03-26 15:40:54 +08:00
Ray Chen 1deda4b25d
Enable request parameter suppression. (#493)
* Enable request parameter suppression.

Added suppression as member property in base class;
Request only includes parameter, enable parameter name match suppression.
2020-03-23 14:57:41 +08:00
JianyeXi 1c702e952a
Fix invalid internal reference can not report error (#489)
*  check if all internal reference defined
2020-03-19 20:56:08 +08:00
JianyeXi 0aeec688e1
fix issue caused by host path parameter value with url (#482)
* fix  issue caused by host path parameter value with url

* update test snapshot

* update comment

* update test snapshot

* bump up version

* fix typo

* Workaround azuredevops isssue.

There's an issue with YAML pipeline triggers which doesn't trigger
pipeline when it's not explicitly specified in yaml file.

* fix snapshot

Co-authored-by: Ray Chen <raychen@microsoft.com>
2020-03-16 10:46:08 +08:00
Ray Chen 8e702bfc23
Fixed typeerror when search in unknownapiversion. (#481)
* Fixed typeerror when search in unknownapiversion.

added check when search in unknownrp->unknownapiversion;
added unit test.

* Update changelog and bump package version.

* Fix snapshot test.
2020-03-10 17:16:22 +08:00
Ray Chen a1d3bf37a0
Upgraded package version. (#480)
Upgraded openapi-markdown pkg version.
2020-03-03 14:20:49 +08:00
Ray Chen 503e4fd92b
Upgrade virtual-fs pkg version. (#479)
* Upgrade virtual-fs pkg version.

* Upgrade json-parser package version.

* Tweak logging message.
2020-03-02 14:55:49 +08:00
Ray Chen 8de2d085eb
Fall back to child resouce match for liveValidator (#478)
* Fall back to child resouce match for liveValidator

Fall back to match operations in cache to child resouces if having both
of parent and child resouces in request url.

* Fixed the unit tests.
2020-02-14 15:35:46 +08:00
Renhe Li 2c3d07f881
The path matching for live validation should be case insensitive (#477)
* The path matching for live validation should be case insensitive

* update the change log
2020-02-13 10:32:30 +08:00
Ray Chen 48739264de
Base model discriminator value fix. (#476)
Previously for polymorphic case, the discriminator value was set to
model name in case of base model. It should also keep original enum
values which is used in model validation. So this fix is to keep
original enum values then add base model as first element in the enum
values list.
The reason to put base model name as first element is the first element
is used to match the discriminator value of polymorphic models and for
base model case the discriminator should be base model name.
Added a unit test for this change.
2020-02-06 17:38:25 +08:00
Ray Chen b57d7cb7a0
Merge from release to master (#474)
* Security fix for some packages.

Handlebars, kind-of and lodash.

* Trigger release branch in pipeline.
2020-01-20 12:51:33 +08:00
Renhe Li 178de9bfeb
Update the check for MultipleOperationsFound (#473)
* Update the check for MultipleOperationsFound

* Update the package version

* address comments in the review
2020-01-06 15:20:21 +08:00
Renhe Li 5fa8be45ad
Update the version of z-schema and yasway (#469) 2019-12-26 11:21:36 +08:00
Ray Chen 09f76726d8
Task #1032251 live validator swaggerPathPattern (#466)
* Task #1032251 live validator swaggerPathPattern

Change the swaggerPathPattern to array type from string.
2019-12-05 17:43:14 +08:00
nickzhums 5fd37b3e0a
Upgrade yasway version to consume the change for x-ms-secret property update (#463)
* Upgrade yasway version to consume the x-ms-secret property update change
2019-11-27 10:25:13 +08:00
nickzhums d5deab2023 Resource provider and API-version should be case-insensitive for live validation (#461)
* Convert API version to be lowercase during validation and add uunit tests

* Bump oav and yasway version

* Fix tsc formatting issue

* Update outdated unit test

* Update test snapshot

* Update changelog

* Lowercase the query string as well
2019-11-21 15:26:44 +08:00
nickzhums e1e7f7000a
[S1007882] Check if x-ms-mutability property is write-only in the response validation (#459)
* Check if x-ms-mutability property is write-only in the response validation. If so, report an error.
2019-11-04 14:45:27 +08:00
Ray Chen e582db9b31
Extends logging and metrics. (#458)
* Extends logging and metrics.

Add corrleationId;
Log execution time for each operation;
Log splited request info for each call.

* Bump version and minor change on feedback.
2019-10-22 22:55:50 +08:00
Ray Chen 669febd7df
Improve logging for livevalidator (#457)
* Improve logging for livevalidator

Added an optional logging callback to consume by livevalidtor to dump
logs to external caller.
2019-10-14 13:28:14 +08:00
Renhe Li a4b3f87b39
Apply the latest version of yasway and add the error code of SECRET_PROPERTY (#456) 2019-10-12 16:41:58 +08:00
Renhe Li 26cb277199 add unresolvable_reference into error codes (#455)
* add unresolvable_reference into error codes

* Update the version and cleanup employee.json file
2019-09-30 10:47:47 +08:00
Ray Chen 3b8eacdc91
Add prefix to log entry to disaply in github. (#454)
* Add prefix to log entry to disaply in github.

* Wrap message as well.
2019-09-18 15:44:28 +08:00
Ray Chen 6bf90059b9
Fixed internal errors when load local reference file (#452)
* Fixed two internal errors: issue#449 and issue#444.

* Also throw error when load an empty reference file.

* Upgrade yasway version to take path fix.
2019-09-05 10:38:24 +08:00
Ray Chen 59090d8b81
Add package lock file. (#451)
* Add package lock file.

* Update changelog and bump package version.
2019-09-02 16:43:38 +08:00
Renhe Li b25a7827cf
Update the load of suppression file for better error handling (#448)
* Update the load of suppression file for better error handling

* Update change log and change the package version
2019-08-12 16:55:14 +08:00
Amar Zavery 4123d46bee
fix validation for nullable array types and fix a discrepancy in specResolver (#440)
* fix validation for nullable array types and fix a discrepancy in specResolver

* update test snapshot

* apply patch
2019-07-30 15:17:13 -07:00
Ray Chen bcb532dd5c
Report error if 'discriminator' is not required (#439)
* Report error if 'discriminator' is not required

Issue #386 OAV report error if the property for 'discriminator' is not a
requried property.

* Update error object.

* Add an unittest.

* Add suppression process for discriminator.

* Fix review comment and bump up package version.
2019-07-17 09:54:55 +08:00
Sergey Shandar 24cd33cc15
@types/jsonpath and typescript 3.5 (#442)
* @types/jsonpath and typescript 3.5

* no more internal errors?

* minor
2019-07-15 11:01:48 -07:00
Renhe Li 8a7bace89e
Update pathInPayLoad for MISSING_REQUIRED_PROPERTIES and OBJECT_ADDITONAL_PROPERTIES (#438)
* Path in payload for MISSING_REQUIRED_PROPERTIES and for OBJECT_ADDITIONAL_PROPERTIES should point to the property.

* Update the handling for JsonPathInPayload

* Put the missing/additional property handling into setPathProperties

* revert the change in LiveValidator.ts

* Modify the snapshot of the test and change the version to 0.18.7

* update the minor version instead of patch version
2019-07-12 11:21:34 +08:00
Ray Chen 6b4c9a849e Added one more rule for response validation in model validation. (#436)
* Added one more rule for reponse validation.

Fail the validation when there's schema defined for response body in spec but the example
response doesn't provide the body in response.

* Fix the exmaples for unit tests.

* Added two more unit tests.

Coverage for the new added rules about body/schema validation in
response.

* Apply snapshot patch.

* Bump package version and update changeLog file.

* Apply snapshot patch.

* Update version number in changeLog.

* Apply snapshots patch again.

* Update per the review comment.

* Update test snapshot.
2019-07-08 16:02:37 -07:00
Eric Williams d54eaf3cfd
Adding support for JSON path & schema path in errors (#428)
* JSON path support
* Support for schemaPath in errors
2019-06-12 14:19:59 -07:00
Timothee Guerin b89ec0b0e6
Fix: Better error return when cannot find a reference (#427) 2019-05-30 14:37:51 -07:00
Amar Zavery 9b3f0009ec
update cache initialization to Promise.all and update yuml2svg package version and add test for readonly properties (#424)
* update cache initialization to Promise.all and update yuml2svg package version

* nit fix and test artifact update

* Adding tests for validating readOnly properties

* Fix type issue

* Fix type

* Add amar snapshot changes

* address code review feedback

* update changelog and bump min version of yasway to 1.7.3
2019-05-29 15:37:21 -07:00