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

46 Коммитов

Автор SHA1 Сообщение Дата
Scott Beddall cfd51d250a
Remove mockjs from dependencies (#1024)
* remove mockerJS usage mockForPattern
* add a specification which includes a 'pattern' into the examplegenerator test case set
2024-01-29 14:42:21 -08:00
Eddy Ashton 340525eac6
Remove incorrect ASCII conversion (#979)
* Remove incorrect ASCII conversion
* Fix + extend byte format unit tests
* Update snapshots
* Apply snapshot-patch

Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com>
2023-06-13 10:25:12 -07:00
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
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 acc22c7027
Fix P1 issues (#891)
* add title and operationId to example

* generate subscriptionId in guid format

* update snapshot

* get title from x-ms-example first

* update examples

* add rule name to title

* update change log

* update rule suffix of title
2022-11-02 11:46:26 +08:00
xiaoxu qi c2f67e1431
null property should be ignored (#886)
* null property should be ignored

* check null value
2022-10-24 11:32:32 +08:00
xiaoxu qi fb7313c0c8
Xiaoxu/addinfo (#879)
* add details

* update snapshot

* use string template

* update snapshot

* update snapshot
2022-10-11 19:06:14 +08:00
Lei Ni bdaf8e2ef9
Aad auth (#863)
* load authentication

* add appconfig test case

* remove shareScope support

* armEndpoint

* itemGroup for scenario

* prepare & cleanup folder

* fix poller order

* improve lro poller

* implement auth option

* paramiterize armEndpoint

* single script

* fix armEndpoint

* clean lro code

* clean unused dependencies

* fix poller script

* fix host

* add authorization swagger

* improve logging

* check in azure built-in roles

* define roleAssignmentStep

* load roleAssignment step

* collection for scenario file

* fix runCollection

* refactor logging

* add data plane api scenario

* fix log

* update snapshot

* use local variables

* fix testproxy option

* update snapshot

* fix package.json

* changelog

* 3.1.0

* changelog

* Integrate roundtrip into api scenario (#867)

* init

* delete operationMatch

* revert package

* argvs

* init

* delete operationMatch

* revert package

* argvs

* remove skipRoundtripValidation and check isMangementPlane

* update changelog

* update changelog

* update snapshot

* suppress warning log in live validator

* update package-lock.json

* fix schema ref

* fix generated step name

* align with autorest auth options

* fix roundtrip validation

* format handlebars

* Revert "format handlebars"

This reverts commit bdf9b8b290.

* show roundtrip validation results in report

* revert log level

Co-authored-by: xiaoxu qi <xiaoxuqi@microsoft.com>
2022-09-27 15:55:43 +08:00
Matthew Christopher ccdcdfcf3c
ARM ID validation (#851)
* ARM ID validation

* Unit tests

* Restrict arm-id validation to examples and arm tra

* Refactor missing_resource_id rule

Ignore error when response body is empty in example validation;
Add isArmCall flag in semantic validation.

* Updated snapshot of example generation test

Test failed because the location is set as required property in resource model so response body only has location property and doesn't have id property.

* Updated snapshot for example validation test

* Delete examplegen snapshot

* re-add example gen snapshot

* add swagger changes

* add example files used by test

* added examples used by test

* Added all exmaples generated by auto gen

* update index value in model validation

Co-authored-by: raychen <raychen@microsoft.com>
2022-09-21 09:29:24 +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
Ke Yu bf07412d3c
Support data validation and generation in byte format (#834)
* Enable byte format validation and generation

* update snapshot

* update liveValidatorTest snapshot

* update validateExamplesRegression snapshot

* update validation about base64 format

* update snapshot

* Cancel config setting about atob()

Co-authored-by: Ray Chen <raychen@microsoft.com>
2022-07-20 16:59:18 +08:00
Ke Yu 501faac110
Fix issues about: multipart/form-data, duration, exampleJsonPath, LRO validation and generate (#812)
* fix bug about multipart/form-data

* support duration format when generating examples

* bump oav version

* multipart form data should only have one file type parameter is required

* Report real exampleJsonPath when additional parameter includes '.'

* update logic about multipart/form-data

* still validate LRO operation when response doesn't have schema

* update exampleGeneratorTests snapshot

* update regression tests snapshot

* change the domain of LRO header

* update snapshot name

* skip error MULTIPLE_BODY_PARAMETERS when consumes includes multipart/form-data

* update test example fileName

Co-authored-by: Ray Chen <raychen@microsoft.com>
2022-06-24 17:15:32 +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
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
Ray Chen 3329c1669d
Upgrade autorest schema (#701)
* Upgrade autorest schema

* Fix content-type and unknown format issue.

* fix snapshots
2021-11-09 08:43:42 +08:00
Ray Chen 15bc328187
User/raych1/new mv (#680)
* new version of model validation

* package info change

* Update some tests

* clean up some unused code

* support formData parameter

* fix lint issue

* update snapshot

* resolve external swagger error path

* fixed style issue

* fix error in semantic validator test while merging branch 'new-mv' (#691)

* fix snapshots

Co-authored-by: KeYu(AnkhSpirit) <33389195+KeYu-AnkhSpirit@users.noreply.github.com>
2021-10-20 13:42:57 +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
Ray Chen a3176ba721
Update error message of some rules (#602) 2021-03-30 16:28:37 +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 ab8af58add
Update LRO rules for adding allowed response code (#598)
* Update LRO rules for adding allowed response code

* Fix style issue
2021-03-23 17:40:24 +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
JianyeXi 33a8222912
Example generation improvement (#550)
* add example cache

* improve merge array cache algorithm

* fix comments

* fix snapshot

Co-authored-by: jianye xi <jianyxi@microsoft.com>
2021-01-07 10:52:02 +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 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 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
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
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
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 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
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 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
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
Vlad Barosan 0035655d53
Validate request body when object (#415) 2019-04-10 21:22:59 -07:00
Vlad Barosan 43fd5dff3c
Report isSuccessful as undefined when there are runtime errors (#414) 2019-04-08 15:41:00 -07:00
Vlad Barosan 0b4dda3a6c
Pass error filter (#412)
* Update typescript version to 3.4.1 and fix compiler errors

* update sway deps and pass error filter

* Update openapi-markdown

* Update changelog

* Update deps

* use chaining
2019-04-05 16:06:04 -07:00
Vlad Barosan 5e60e761cb
Report real errors for polymporphic models (#409) 2019-04-01 17:30:04 -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 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