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

265 Коммитов

Автор SHA1 Сообщение Дата
Ruoxuan Wang 83fbc1eb64
Ruowan/gen api scenario (#693)
* generate api-scenario support pass swagger file as input

* support pass swaggers as input

* update changelog and bump version
2021-10-26 15:33:44 +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
Ray Chen 2cf07cb2ef
Export loader types (#690) 2021-10-19 15:55:16 +08:00
Ruoxuan Wang 7f08b5cf98
example extractor support add url parameter (#679) 2021-09-30 16:01:12 +08:00
Lei Ni 561e55e3b0
V2 (#655)
* fix bug

* fix bug

* separate schema def

* fix types

* remove type & add scenario

* fix testResourceLoader

* fix jsonpatch

* fix schemas

* fix schema

* fix types

* fix schema

* fix raw types

* save

* fix loader

* simplify VariableScope in memory

* fix

* fix testScenarioGenerator

* fix

* fix runner

* fix tslint

* restore shareScope

* fix bug

* requiredVariables

* variable type

* fix resolve variables

* bump js-yaml version

* define patternProperties

* restore plain structure

* implement apiScenaroYamlLoader

* expectedResponse & use Example operationId

* fix variableEnv bug

* support patch

* fix bug

* implement Patch per ARM RPC

* log step name

* templateGenerator

* update export types

* add armTemplate parameters convension

* fix bug

* fix request schema

* cleanUpSteps

* error handling when execution

* revert

* revert cliSuppressExceptions

* Update validate-examples-regression-sample.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Revert "Update azure-pipelines.yml for Azure Pipelines"

This reverts commit 273b05ef82.

* Revert "Update validate-examples-regression-sample.yml for Azure Pipelines"

This reverts commit d758018bdb.

* npm install with v6

* Refactor VariableEnv

* fix bug

* variableEnv

* fix outputVariables

* revert placeholder

* add resolveVariables option and turn off in postmanCollectionRunner

* fix pathVariable

* use output method to make output variable global

* update

* fix prettier

* rename to apiScenario

* rename command

* restore folder name

* restore fixture

* remove fixture from .gitignore

* fix

* fix test

* resove armTemplate

* systemData is readOnly

* Fix bug

* fix VariableEnv

* fix resolveString

* fix convention for cleanUp steps

* apply patch

* fix xmsExampleExtract bug

* fix xMsExampleExtractor

* rename folder and add Changelog

Co-authored-by: ruowan <ruowan@microsoft.com>
2021-09-30 11:27:59 +08:00
Ke Yu 5fb05951e6
Updating ansi-regex (#676)
* Updating ansi-regex in yasway

* Updating ansi-regex from 5.0.0 to 5.0.1 in copyfiles

* Updating ansi-regex from 5.0.0 to 5.0.1 in eslint

* Updating ansi-regex from 5.0.0 to 5.0.1 in jest

* Updating ansi-regex from 4.1.0 to 5.0.1 in types/jest

* dedupe ansi-regex 5.0.1

* Revert "dedupe ansi-regex 5.0.1"

This reverts commit 88dfd926ac.

* fix ansi-regex from 2.1.1 to 5.0.1 by updating yargs from 7.1.2 to 15.4.1
2021-09-30 09:43:22 +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
Ke Yu 33c5260747
Fix alerts issues by updating libraries (#669)
* Fix alerts issues by updating libraries

@azure/openapi-markdown
@ts-common/commonmark-to-markdown
yargs
glob-parent

* Fix legal alerts caused by intel and utcstring

* Fix alert issue by updating set-value

* Refresh package-lock.json about set-value

Co-authored-by: Ray Chen <raychen@microsoft.com>
2021-09-24 13:03:43 +08:00
dependabot[bot] 8a2ea9846a
Bump tmpl from 1.0.4 to 1.0.5 (#668)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ray Chen <raychen@microsoft.com>
2021-09-24 12:45:42 +08:00
dependabot[bot] 2094024c1b
Bump axios from 0.21.1 to 0.21.4 (#664)
Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-24 09:31:41 +08:00
Ruoxuan Wang 1209c13802
fix vulerability issue (#667)
* fix vulerability issue

* add postman collection
2021-09-16 15:38:43 +08:00
dependabot[bot] db2f99508f
Bump postcss from 7.0.35 to 7.0.36 (#652)
Bumps [postcss](https://github.com/postcss/postcss) from 7.0.35 to 7.0.36.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.35...7.0.36)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ray Chen <raychen@microsoft.com>
2021-09-13 10:52:16 +08:00
dependabot[bot] 2650617cf7
Bump ws from 5.2.2 to 5.2.3 (#651)
Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-13 10:44:56 +08:00
Ruoxuan Wang d563232003
Ruowan/operation coverage (#662)
* calculate operation coverage

* bump version and update changelog

* fix operation coverage

* runner support step scope variables

* Fix runner armTemplate outpuyt as runtime variables. support different
scope level variables.

* update changelog
2021-09-08 14:40:42 +08:00
Ligengxin 9d766e068f
Cli command bug fix (#658)
* fix validate-traffic command path bug

* Bug fix: generate-examples can't generate 4xx status code

* disable loadValidatorInBackground

* delete space

Co-authored-by: Gengxin Li <v-wenbli@microsoft.com>
2021-08-25 15:04:24 +08:00
Ray Chen a91895fd04
Live validator update from rpaas feedback (#656)
* Live validator update from rpaas feedback

* Isolate RP when running transform in livevalidator

* Use template msg for livevalidation runtime error
2021-08-25 14:36:17 +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
Ruoxuan Wang 6c9aab3879
make runner run api sync (#648)
* runner run test scenario sequentially

* add runner architecture

* bump version and update changelog

* remove install gif update runApiTest.gif
2021-08-10 14:49:25 +08:00
Ligengxin 7320e528a0
Disable checkUnderFileRoot in `Validate Traffic` command (#646)
* Disable checkUnderFileRoot

* Disable checkUnderFileRoot

* bump version

* update
2021-08-03 15:08:25 +08:00
Ruoxuan Wang 5660d08093
Update readme and small bug fix (#644)
* fix lint

* add gif

* add installOav.gif

* update oav -h in readme

* update runApiTest doc

* small fix

* avoid conflict step name when generate postman collection item

* update changelog

* support verbose command update gif

* update doc

* refine doc

* poller do not output err

* update gif

* fix typo

* bug fix. setup subscriptionId as environment variables

* update changelog
2021-07-29 11:32:57 +08:00
JianyeXi 8e43493bf9
support load variables from env & debugging mode (#643)
* load env

* wip

* load env

* add debugging mode

* wip

* add

* small fix

* wip

* remove ci option

* default not clean up

* fix rebase issue

* add from to check

* fix desc

* fix linting error

* fix comments

* wip

* improve consolidating env logic

* fix linting error

* bump version

* add change log

Co-authored-by: jianye xi <jianyxi@microsoft.com>
2021-07-22 10:42:38 +08:00
Ligengxin 992502de36
Bug Fix: validate-traffic command doesn't support relative path input (#642)
* bug fix: validate-traffic command doesn't support relative path input

* Bump version and update changelog
2021-07-16 08:09:29 +08:00
Ruoxuan Wang 3008735de8
Ruowan/pass variables (#638)
* default resourceGroupPrefix apiTest

* run test scenario command support skip cleanup

* runner support predefined resourceGroup. and skip cleanup

* fix resourceUpdate bug

* oav test scenario runner support dryRun mode

* rename analyze-newman-report

* oav runner support pass variables

* support pass variables

* update outputVariables schema

* run-test-scenario add oav run alias

* postman runner support get object value by json pointer

* update changelog and bump version

* udpate jsonPointer unittest

* small fix

* update package-lock

* revert back oav

* revert back readme

* remove unused log
2021-07-15 10:10:47 +08:00
Ligengxin 51e2e4247b
support validate-traffic <traffic-path> <spec-path> command in OAV cli (#633)
* support validate-traffic <traffic-path> <spec-path> command

* fix format

* update command describe

* update

* update log type

* format

* update readme

* delete semicolon

* test ci

* check file path before validate

* resolve comment

* resovle comment

* Update

* add missing dependency files

* fix lint

* remove files

* resolve comment

* fix lint

* Bump version and update changelog

* update

Co-authored-by: Ray Chen <raychen@microsoft.com>
2021-07-13 11:36:21 +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
Ruoxuan Wang 375072f6b9
support extract output from armTemplate deployment (#634)
* support extract output from armTemplate

* update changelog and bump version

* remove unused log

* fix compitablity issue

* fix compatibility issue.
2021-06-29 13:51:20 +08:00
Ruoxuan Wang 8c9e084268
small fix (#632) 2021-06-24 16:33:49 +08:00
Ruoxuan Wang 87d8b0d1df
Ruowan/checklevel (#628)
* support two checklevel and ignore readonly, secret property compare.

* donot output log when request method is post

* rename to RUNTIME_ERROR

* rename level

* remove unused log

* refine description

* update changelog

* rename check level
2021-06-24 13:27:25 +08:00
Zhenglai Zhang 1371ee8fed
Add test scenario JUnit result output and markdown report refinement (#629)
* add markdown report support

* fix linting issues

* update generate markdown report flow

* fix snapshot

* improve report format

* fix markdownReportPath as optional

* fix markdownReportPath

* add junit xml output

* fix markdown

* fix package.json formatting
2021-06-23 10:25:56 +08:00
Ruoxuan Wang a93b956b38
Ruowan/list operations (#625)
* generate listOperation

* rename rule incorrect provisioning state

* refactor api testing code

* rename error code

* update changelog bump version

* update changelog

* fix relative path bug

* update changelog

* output junit report

* revert package.json

* bump version

* add patch

* revert

* rename rule-name

* fix

* rename generate rule put-delete to resource-put-delete
2021-06-17 11:05:57 +08:00
Zhenglai Zhang 0b6adc1b21
add markdown report support for test scenario runner (#624)
* add markdown report support

* fix linting issues

* update generate markdown report flow

* fix snapshot

* improve report format

* fix markdownReportPath as optional
2021-06-10 11:35:16 +08:00
Ruoxuan Wang 9fdf0cd30f
Ruowan/dependency (#622)
* add error log when jsonPointer is invalid

* analyze dependency output resourceId definition json path

* remove unused code

* add test fixtures

* fix unittest

* small fix and optimise dependency structure

* add more field for dependencyResult

* export swaggerAnalyzer

* rename resourceType to fullResourceType

* update description

* bump version and update readme

* update package-lock.json

* update package-lock.json

* fix eslint

* fix prettier error

* test step any of to oneof

* bug fix: get armTemplate deployment parameters. add arm deployment
status check

* update changelog
2021-06-01 14:01:44 +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 50a0dd5a22
Supports different logging types in livevalidator (#621)
* Supports different logging types in livevalidator

* Remove unnecessary perf logging for one operation.
2021-05-18 10:56:28 +08:00
Ruoxuan Wang ccac9026e0
Ruowan/arm endpoint (#620)
* support pass armEndpoint and location

* bump version

* test scenario runner support overwrite location, by args
2021-05-14 14:31:02 +08:00
Ruoxuan Wang caa19ba531
optimise upload blob path and report format (#610)
* optimise upload blob path

add code severity

support load resource type

output all file to outputFolder

* add timings

* run failure. exitCode = 1

* add dataMasker

* generate minute level runId

* support mask token

* escapeRegExp

* refine comment

* update changelog and bump version

* do not output header

* refine report format

* add testScenarioName field

* small fix

* small fix

* add error message for response diff and update report.

* update report blob path

* optimise postman collection blob file path

* add container report for pipeline

* response diff result to array type

* response diff ignore id, location, datetime

* bump handlebars version

* remove internal link

* add comments and small fix

* update runtime error code to "RUNTIME_ERROR"

* update runtime error code

* update runtime error message

* update changelog
2021-05-12 11:08:52 +08:00
Ray Chen 9bec0f5020
examplegen support multiple operations (#618)
* Support examplegen for multiple operations
2021-05-11 16:18:43 +08:00
Ray Chen aa8ead5858
Add more loggings and export types (#615)
* Add more loggings and export types

* fix lint

* Log duration for on demand build validator

* Output err details
2021-05-11 13:41:26 +08:00
Ruoxuan Wang 9b6155260e
support upload generated file and report to blob (#608)
* support upload generated file and report to blob

* small fix

* use <ResourceProvider>/<api-version>/<test-scenario-name> for storing
blob result

* move collection name env name to defaultNaming.ts

* bump version and support auto upload generated file

* auto generate readme.test.md

* update changelog
2021-04-21 10:58:11 +08:00
Ruoxuan Wang 191f544087
oav2.3.1 dependency analyze. auto genereate test-scenario. run test scenario (#607)
* oav2.3.1 dependency analyze. auto genereate test-scenario. run test
scenario

* rename dependencyAnalyzer to swaggerAnalyzer

* output newman json report
2021-04-08 11:27:49 +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 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 a022613e39
Fixed mocked value of LRO headers (#587) 2021-03-15 10:47:08 +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
Ray Chen effbc86ed4
Bump version for re-publish. (#577) 2021-02-08 11:40:30 +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 3b8911bd0f
fix undefined reference (#564)
* fix undefined reference

* bump version

* fix lint

Co-authored-by: jianye xi <jianyxi@microsoft.com>
2021-01-25 10:04:50 +08:00
Phoenix He d46ff90231
Bugfix should copy required array for allOf transformer (#563)
* Bugfix should copy required array for allOf transformer

* Bugfix collect correct err.data in discriminator validation

* Add doc
2021-01-21 15:45:00 +08:00
Phoenix He 7d3b53beb1
Bump to 2.2.0 (#562) 2021-01-19 10:32:07 +08:00
Phoenix He 150c5e9c7c
Test Scenario Support (#558)
* Support yaml in jsonLoader

* New package
2021-01-18 16:54:38 +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 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
dependabot[bot] d9e912a580
Bump node-fetch from 2.6.0 to 2.6.1 (#538)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-14 08:27:30 +08:00
Wenhao Zhang 6eafef4e1d
New function getErrorsFromSemanticValidationForUnifiedPipeline (#533)
* Revert "Update function getErrorsFromSemanticValidation to extract inner error correctly (#530)"

This reverts commit cd3896e62c.

* New function for unified pipeline to extract semantic validation inner error.

* export serializeErrorsForUnifiedPipeline

Co-authored-by: t-zhangw <codespace@72c482c53b75>
2020-09-07 13:59:10 +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
dependabot[bot] 5d7004817e
Bump lodash from 4.17.15 to 4.17.19 (#516)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 08:52:34 +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
dependabot[bot] 88bf4a746b
Bump acorn from 5.7.3 to 5.7.4 (#494)
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-23 09:44:07 +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
Sergey Shandar 07ef51260d
Remove generated CloudError (#366)
* Remove generated CloudError

* resolve responses

* unit test

* tests should also check for error code.

* changelog

* 0.10.0, remove package-lock

* shouldModelImplicitDefaultResponse is removed.
2018-12-06 16:11:21 -08:00
Sergey Shandar 75decf2767
Properly handle JSON errors (#362)
* JSON error

* minor

* still need to throw

* prettyPrint for resolveSpec

* InternalError
2018-12-03 11:15:31 -08:00
Sergey Shandar 743ad2c948
update json parser (#361)
* Update JSON parser to handle UNICODE escape sequences.

* 0.9.6
2018-11-29 14:08:54 -08:00