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

18 Коммитов

Автор SHA1 Сообщение Дата
Ray Chen e96760fd6a
Ignore unknown formats in AJV (#910)
* Ignore unknown formats in AJV

* Added testing spec

* Updated test
2022-11-23 17:27:40 +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
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
Ray Chen 967a29d767
Support arm-id format (#802)
* Support arm-id format

* Added test

* Remove .only from test
2022-05-27 17:51:02 +08:00
Ke Yu 0c2683fe44
Fix bug about error path (#776)
* add condition for newPathArr

* add test and change log

* upgrade package version

* add comments for newPathArr

* update comment and assert on the error path

Co-authored-by: Ray Chen <raychen@microsoft.com>
2022-04-07 14:17:19 +08:00
Ke Yu d022e558a1
Clarify the error message of NOT_PASSED (#762)
* Clarify the error message of NOT_PASSED

* add change log

* add assert on the error location
2022-03-10 17:37:07 +08:00
tianxchen-ms 73dfa760e1
add new rules of discriminator (#707)
* add new rules INVALID_XMS_DISCRIMINATOR_VALUE and DISCRIMINATOR_PROPERTY_NOT_FOUND

* fix error meta param

* continue when invalid discriminator type

* fix comments

Co-authored-by: Tianxiang Chen <tianxchen@microsoft.com>
2021-11-22 14:54:51 +08:00
tianxchen-ms 0ac7ebb818
Fix false alarm for MISSING_PATH_PARAMETER_DEFINITION (#708)
* Fix false alarm for MISSING_PATH_PARAMETER_DEFINITION

* fix comments

Co-authored-by: Tianxiang Chen <tianxchen@microsoft.com>
2021-11-22 09:47:45 +08:00
tianxchen-ms 58768ff1e1
check discriminator property type must be string (#698)
* check discriminator property type must be string

* add changelog and bump version

Co-authored-by: Tianxiang Chen <tianxchen@microsoft.com>
2021-11-04 16:50:39 +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
KeYu(AnkhSpirit) 36dfb6e868
update tests for semantic validator (#689)
* update tests for semantic validator

* fix suppress test

Co-authored-by: Ray Chen <raychen@microsoft.com>
2021-10-19 15:14:33 +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 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 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 5f43b2db45
Fix for special symbols inside JSON-Pointer/Reference (#308)
* test for nested properties with `@` character.

* update json-refs.

* fix JSON-Pointer
2018-09-10 17:01:55 -07:00
Sergey Shandar 4fc35d48c6
Fix for `file` in `schema` (#298)
* minor

* remove `json-source-map`

* don't resolve "file" schemas

* downgrade json-refs

* style

* 0.5.2
2018-08-21 15:11:30 -07:00
mcardosos 10a5878451 Does not error on missing definitions section 2018-01-11 17:17:09 -08:00
Amar Zavery 700cb47dd4 add test for semantic validation 2017-11-21 13:19:57 -08:00