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

72 Коммитов

Автор SHA1 Сообщение Дата
xiaoxu qi 984c4f4e83
support round trip validation (#964)
* support round trip validation

* test

* test

* add tests with roundtrip option

* merge ref sibling loader with current jsonloader

* add general validation tests

* update tests

* update test

* update test

* add snapshot

* update test

* test

* fix

* remove refsibling

* update changelog

* bump version

* fix
2023-02-25 10:37:41 +08:00
Ray Chen a993efe883
log additionalProperties invalid type error only (#965)
* log additionalProperties invalid type error only

* Delete unused swaggers

* Fixed test

* Bump version

* Updated package version for beta

* Updated param name

* Updated pkg version for release
2023-02-21 10:11:47 +08:00
Lei Ni 476efaa6e9
Fix empty html report bug (#946)
* rename method

* rename payload file

* fix parseValidationRequest

* add TrafficValidatorTests

* test case

* test case

* revert

* fix test case

* fix empty report

* fix test case

* rename folder

* resolve comments
2023-01-19 17:47:39 +08:00
Ke Yu a87a57277a
Retire some features (#860)
* retire validateExamplesInCompositeSpec in validate-example

* retire SpecValidator in validate-spec

* retire autorestPlugin

* retire dependencies

* retire vscode launch config

* revert simple semantic validation

* npm install

* clear unused dependencies

* update version

* update version to v3.2.0

Co-authored-by: Ray Chen <raychen@microsoft.com>
2022-10-11 16:26:32 +08:00
xiaoxu qi 7742096af8
remove circular ref (#865)
* remove circular ref

* remove duplicated snapshot

* update snapshot

* add test for circular

* add status code

* fix prettier

* add one rp

Co-authored-by: Ray Chen <raychen@microsoft.com>
2022-09-15 18:05:24 +08:00
xiaoxu qi 85fb41394f
Support round trip validation (#847)
* draft: init

* test 01

* update ref

* update attrs

* checker

* update

* update

* update

* remove lazy build

* version 1: ready for tests

* lazy build init

* add test

* update lazy build and test

* update

* fix some comment

* add todos before useing loader

* test for swaggerloader

* use swagger loader

* swagger loader for test

* use traverse swagger

* add comment and use resolveRef as parameter

* remove debug log

* update test and init operationLoader outof while-loop

* use snapshot

* use provider in SwaggerSpec

* update package

* update package from develop

* update package from develop no update

* adopt shouldResolveRef in loader opt

* update test

* update test case

* update properties parser

* update snap

* update snap
2022-08-29 16:03:43 +08:00
xiaoxu qi a4f99bf82e
Add activity id (#824)
* init

* version update

* version update

* update changelog

Co-authored-by: Ray Chen <raychen@microsoft.com>
2022-07-01 16:02:28 +08:00
Ke Yu dff4f111c4
Get real schema and data while error's schema has allOf property (#798) 2022-05-16 17:31:46 +08:00
KeYu(AnkhSpirit) eb0d22d652
loosen date-time validation (#744)
* loosen date-time validation

* recode, fix test error, update snapshot

* update numberOfSpecs
2022-01-26 11:34:07 +08:00
KeYu(AnkhSpirit) 7ad54bc872
Fix false alarm for NOT_PASSED about multipleOf (#743)
* Fix false alarm for NOT_PASSED about multipleOf

* add test and update change log

* update test payload

* bump version to 2.11.5

* reduce the size of the payload file

* update validation logic
2022-01-24 15:53:52 +08:00
KeYu(AnkhSpirit) a92d1bec0f
Fix false alarm for WRITEONLY_PROPERTY_NOT_ALLOWED_IN_RESPONSE (#726)
* Fix false alarm for WRITEONLY_PROPERTY_NOT_ALLOWED_IN_RESPONSE

* update

* fix x-ms-secret check and add test case

* fix test error

* update rule for x-ms-mutability

* add test for more cases

* add test comments, update change log

* add validation on error code in tests

* update error code validation in tests
2022-01-10 15:57:05 +08:00
Ruoxuan Wang d1e42e9767
fix url encoding issue (#706)
* fix url encoding issue

* new URL add base host

* fix URL based

* fix unittest

* rename function

* renmae

* update changelog

* update test and remove unused readme

* fix data-plane regex

* update liveValidator
2021-11-23 11:13:34 +08:00
Ray Chen f079ea65c5
Make response headers as optional (#705)
* Make response headers as optional

* adding test payloads

* Ignore LRO header check for livevalidator

* Support suppression on error code
2021-11-18 13:24:05 +08:00
Ruoxuan Wang 2140c9f99d
Fix cg 3 (#675)
* fix cg

* bump version

* reformat

* reformat

* fix no new line
2021-09-28 13:03:28 +08:00
Phoenix He 2e25ef5da2
Refactor Semantic Feature (#649)
* sync

* Add changelog

Co-authored-by: Phoenix He <tih@microsoft.com>
Co-authored-by: raychen <raychen@microsoft.com>
2021-08-12 17:36:27 +08:00
Ray Chen 1234376d48
Ignore LRO header check in case of sync calls (#637)
* Ignore LRO header check in case of sync calls

* Update snapshots and test swagger
2021-07-06 15:39:47 +08:00
Ray Chen 515b9875d4
Ignore sub level resources validation for missing_resource_id rule (#623)
* Ignore sub level resources validation

* Added test

* Export function parseValidationRequest
2021-05-26 13:26:47 +08:00
Ruoxuan Wang ff64062a5b
Test scenario main (#599)
Support test scenario and test runner
2021-03-24 16:48:10 +08:00
Ray Chen 40b6b7fa84
User/raychen/lro (#588)
* Add LRO validation rule

* Added two rules for LRO validation in live validator.

* Exclude error response from LRO validation.
2021-03-16 16:55:13 +08:00
Ray Chen 307f062f95
Add new rule of missing_resource_id and isArmCall option. (#579)
* Add new rule of missing_resource_id and isArmCall option.
2021-02-26 13:51:01 +08:00
Phoenix He e6d445dc0b
Bugfix collect correct err.data in discriminator validation for multi… (#568)
* Bugfix

* Add test

* Update changelog
2021-01-27 13:22:14 +08:00
Phoenix He 150c5e9c7c
Test Scenario Support (#558)
* Support yaml in jsonLoader

* New package
2021-01-18 16:54:38 +08:00
Phoenix He 5f01014b4b
Always transform response code (#549)
* Always transform response code

* Add test
2020-12-22 09:54:34 +08:00
raychen fcc6da5bf9 Ignore body schema validation when schema is not required and body value is empty. 2020-11-25 14:59:48 +08:00
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
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 7580d59a80
It looks the problem of microsoft.resources was already resolved. Add test case to verify the bahaviour (#509)
Co-authored-by: FAREAST\renhel <renhel@microsoft.com>
2020-05-15 17:01:22 +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
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
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 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
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
nickzhums 7c40ac8572 Exclude certain swaggers during cache initialization in OAV (#467)
* Add default ignore patterns and update tests

* Test

* Update ignore paths code

* Fix conflict

* Lint tool fix

* Lint tool fix

* Update tests

* Lint fix
2019-12-16 17:23:31 +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 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
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
Vlad Barosan 0035655d53
Validate request body when object (#415) 2019-04-10 21:22:59 -07:00
Vlad Barosan ff4748b834
Improve inner error type (#408)
* Add discriminator test

* Improve inner error type

* Remove example files as they are not needed

* Dont use empty arrays for optional params
2019-04-01 10:59:25 -07:00
Vlad Barosan 7c49309fdc
Allow to specify specific validation errors to include in results (#406)
* Allow to specify specific validation errors to include in results

* Address feedback

* remove duplication
2019-03-29 11:12:10 -07:00
Vlad Barosan 44a19e34a8
Seperate request response (#405)
* Refactor and seperate validate method

* re-use seperate validations

* refactoring

* use globby instead of glob sync

* mark that is a breaking change

* new return types

* Add snapshot tests

* Add snapshot tests for live validation

* Add option for relative source location url

* Add severity

* Don't expose get operations externally anymore
2019-03-28 11:47:48 -07:00
billytrend a26e0f3686
Change test runner to jest (#401)
* Change test runner to jest

* Fix sample

* Revert typescript

* Change output file

* Bump version
2019-03-20 17:46:05 +00:00
Vlad Barosan 21d90189f5
Enforce linting and styling (#399)
* Auto fixes for oav lintining issues

* Extra fixes

* Update changelog

* Increment package version

* Extra auto fix for line lengths
2019-03-08 15:38:37 -08:00
Sergey Shandar 598dfa42ab
Remove ts-node (#371) 2019-01-08 15:03:51 -08:00