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
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
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
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
3e29e1344a
Report exmaple position for request errors ( #445 )
...
* Report exmaple position for request errors
Issues#423
* Prevent duplicate loading example file.
* Add some await keyword.
* Fixed unit test.
2019-09-04 13:48:49 +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
Vlad Barosan
74a81b3b2c
Use node env for jest ( #422 )
...
* Use node env for jest
* Fix tslint
2019-04-25 12:19:46 -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
Sergey Shandar
074347d9f1
fix exit code ( #410 )
...
* fix exit code
* changelog
* minor
* 0.16.1
* Update package.json
* result.length
2019-04-05 14:17:28 -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
Vlad Barosan
6a1b7816af
Refactor relative references ( #404 )
...
* Refactor resolve relative references and remove unecessary parsing
* Remove unused references from x-ms-examples
* Update changelog and package.json
2019-03-20 15:43:29 -07:00
Vlad Barosan
8cdb147c43
Don't resolve xms examples for live validation ( #402 )
...
* Don't resolve xms examples for live validation
* Update version and changelog
* Update test string
* keep for semantic
2019-03-19 17:14:21 -07: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
a493f1b1ec
hot fix ( #400 )
...
* INTERNAL_ERROR
* 0.14.4
2019-03-08 13:28:15 -08:00
Sergey Shandar
052297ec6e
ICE fix. ( #398 )
2019-03-07 16:42:07 -08:00
Vlad Barosan
69ea6923c3
Use one cache validator per SpecValidator ( #396 )
2019-03-06 18:17:16 -08:00
Vlad Barosan
3af1bb91af
Add live validator init time docs cache ( #394 )
2019-03-06 16:39:39 -08:00
Vlad Barosan
15e1157efd
Remove global cache ( #393 )
...
* Remove global cache
* update/remove unusued dependencies and increment package version
* Remove unusued imports
* Fix lint errors
2019-03-06 10:05:37 -08:00
Sergey Shandar
67fb79edbc
fix type for polymorphic objects ( #389 )
...
* fix for polymorphic objects
* more comments.
* unit test
* test fro modelAsString
* discriminator should be required property.
* address comments.
2019-02-14 13:54:39 -08:00
Sergey Shandar
04411ace7f
Fix x-ms-enum as discriminator ( #387 )
...
* Fix x-ms-enum as discriminator
* changelog
* source-map update
* address comments.
* copyright
* jsonRefs comment
2019-02-06 16:14:31 -08:00
Sergey Shandar
41bd80095d
More errors with position and URL ( #383 )
...
* Fix for #379
* changelog
* changelog
* Provide URL and position for more errors.
* address comments.
2019-01-30 16:49:32 -08:00
Sergey Shandar
42517d127d
Fix for #381 and for missing source in `RESPONSE_STATUS_CODE_NOT_IN_EXAMPLE` error
...
* Fix for #379
* changelog
* changelog
* Update specTransformer.ts
* Update specTransformer.ts
2019-01-29 10:32:11 -08:00
Sergey Shandar
ca3d3c88de
Handle `text-matches` in suppression. ( #378 )
...
* Handle `text-matches` in suppression.
* openapi-markdown 0.7.3
2019-01-22 11:46:45 -08:00
Sergey Shandar
3b13b883d5
Update JSON types. ( #376 )
2019-01-15 16:11:52 -08:00
Vlad Barosan
c2c858da20
Simplify error property names ( #375 )
2019-01-15 10:16:13 -08:00
Sergey Shandar
cf41d9cb49
OAV shouldn't fail on examples which contain "$schema" properties. ( #374 )
...
* examples as functions
* revert minor changes.
* address comments.
2019-01-14 16:44:53 -08:00
Sergey Shandar
8e839c6c60
No symbol logging ( #372 )
...
* No symbol logging
* changelog
* revert log commenting.
2019-01-09 14:40:48 -08:00
Sergey Shandar
7d0267a651
no default response for non errors ( #367 )
...
* Remove generated CloudError
* resolve responses
* unit test
* tests should also check for error code.
* update yasway
* tests for live validation default status code
* yasway 1.4.0
* changelog
2018-12-07 15:04:17 -08:00
billytrend
76b57f4b4a
Adds retry to github request ( #363 )
...
* Adds retry to github request
* Changes to node-fetch
* Makes config explicit
* Adds call
* Bumps package
* Adds vfs to parsing
* Removed dependencies
* Removes promise syntax
* Fixes whitespace
* minor comments.
* Bumps version
* Fixes date format 🇬🇧
2018-12-07 12:55:34 -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
357bdb0def
Suppress errors in suppression readme ( #360 )
...
* improve error message
* changelog
* something strange
* fix jp bug
* 0.9.5
* change-log
* catch jsonpath exceptions.
* changelog.
* Test
2018-11-28 16:37:48 -08:00
Sergey Shandar
ea6083863d
Improve error message ( #359 )
...
* improve error message
* changelog
* internal error
2018-11-28 11:43:11 -08:00
Sergey Shandar
2fd0a562ee
getErrorsFromSemanticValidation() ( #355 )
...
* getErrorsFromSemanticValidation()
* minor
* 0.9.2
* minor
* 0.9.3
* 0.9.1-3
* 0.9.1
2018-11-20 13:33:06 -08:00
Sergey Shandar
89647dbdf2
fix type errors ( #354 )
...
* type script error fix.
* better model validation errors.
* Improve error types
2018-11-19 14:46:43 -08:00
Sergey Shandar
77f719dcdf
Fix for suppressions. ( #353 )
...
* Fix for suppression.
* minor
* iterator 0.1.1
* live validation test fix.
* Changelog.
* `where` and `from`
2018-11-16 14:47:04 -08:00
Sergey Shandar
74a8db6e6c
Fix for examples in spec. ( #352 )
...
* clouderror source map
* 0.7.15
* additional checks.
* generating cloud error
* additional tests
* fix for inline examples
* changelog
* 0.8.0
* lock
* remove useless checks
* address comments
* more comments.
2018-11-15 17:04:07 -08:00
Sergey Shandar
d6eac3c69d
swagger definition update & remove dead code ( #351 )
...
* cloud error tests
* new swagger definition
* simple semantic validation
2018-11-08 16:36:39 -08:00
Sergey Shandar
705157a9ab
switch from `@ts-common/azure-openapi-markdown` to `@azure/openapi-markdown`. ( #346 )
2018-10-23 16:56:21 -07:00
Sergey Shandar
f918ba1860
Exported functions don't catch exceptions. ( #343 )
...
* Exported functions don't catch exceptions.
* remove suppression-bugs.md
* copyright.
* no run.cmd
* unit test
2018-10-18 14:07:49 -07:00
Sergey Shandar
c6b3b9bed2
Provide schema information for all Schema Objects. ( #341 )
...
* update all schema objects
* 0.7.10
* changelog
* unit test
* address comments
2018-10-15 16:29:12 -07:00
Sergey Shandar
87922a8f56
Source Map for generated objects. ( #339 )
...
* update changelog
* Update
* clearCache()
* Fix suppression errors.
* remove unused function
* fix compilation errors.
* address comments
* address comments.
* test
* test: errorDetails
* improved source map test
2018-10-12 19:42:35 -07:00
Sergey Shandar
7ed2e905e5
another fix. ( #335 )
2018-10-08 17:29:57 -07:00
Sergey Shandar
2fc25411ed
Reading file from HTTPS ( #334 )
2018-10-08 16:05:29 -07:00
Sergey Shandar
9f268206fe
fix find readme ( #333 )
...
* replace `findReadMe` file.
* get suppressions from HTTPS
* changelog
2018-10-08 12:27:16 -07:00
Sergey Shandar
2a3249922e
suppress promise rejection ( #330 )
2018-10-03 10:11:07 -07:00
Sergey Shandar
b12d59ed52
Fix URL encoding test. ( #329 )
2018-10-02 13:38:39 -07:00
Sergey Shandar
676912381e
New suppression API ( #326 )
...
* New suppression API
* update
* createDummy() is removed.
2018-10-01 17:51:07 -07:00
Sergey Shandar
8c3786ccf4
Suppression support for `from` field. ( #324 )
...
* assignOptional
* handle path
* handle "from"
* 0.6.5
* `where` implementation
* address comments
* more comments.
* remove assignOptional
2018-09-28 11:20:39 -07:00
Sergey Shandar
25f17f7cfa
Fix for `resolve-spec` CLI #320 ( #321 )
2018-09-25 13:19:56 -07:00
Sergey Shandar
0a7acc96f0
semantic validation bug fix ( #319 )
...
* semantic validation bug fix
* minor
2018-09-25 10:44:00 -07:00
Sergey Shandar
c31480764b
Suppression. No `where` support yet. ( #317 )
...
* read markdown file.
* suppressions
* supression object
* Return suppressions
* update package-lock.
* prettyPrint() function
* processErrors()
* pass suppression
* where is not implemented yet
* changelog
* TODO:
* resolve conflicts
* switch back to z-schema
* Suppression test
* comments
2018-09-24 16:21:14 -07:00
Veronica Giaudrone
b41b253b1b
Fix semantic result in validate spec instead of editing afterwards ( #318 )
...
* Adding reference documentation for oav model validation
* correcting where url and position get added in the error result
* adding changelog and updating oav version
2018-09-21 16:42:46 -07:00
Veronica Giaudrone
b6dab0f577
Semantic errors source ( #316 )
...
* Adding reference documentation for oav model validation
* adding url and position information to semantic validation errors
* updating package.json
* adding changelog
2018-09-19 17:39:46 -07:00
Veronica Giaudrone
fcfbef76ab
Pretty printing for semantic errors (validate-spec command) ( #315 )
...
* Adding reference documentation for oav model validation
* adding pretty printing to validate-spec command
* adding changelog
2018-09-19 14:37:07 -07:00
Sergey Shandar
43d4fbe615
Fix for x-ms-examples extractor ( #314 )
...
* Suppression Design
* Update swagger-parser
* test files for extracting x-ms-examples
* Remove dead code.
* reproducing errors.
* Remove errors.
* 0.5.10
* address comments.
2018-09-18 11:49:56 -07:00
Sergey Shandar
89adda705c
@ts-common/z-schema ( #310 )
2018-09-11 13:35:30 -07: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
5417eec6d6
Errors have optional `jsonUrl` and `jsonPosition` fields. ( #306 )
...
* sm.isEmpty
* Fix error
* first test
* changelog, yasway
* bug
* commented code
* tslint
* fix
* remove dead code
* merge
* minor
* readonly
* simplified
* address comments
* description in ResponseObject
* sample position
* schema
* path to error
* update of source-map
* update z-schema and yasway
* update package
* changelog
* minor
* address comments
* tests
* bug fix
2018-08-28 15:13:12 -07:00
Sergey Shandar
88160960ef
Proper fix for cloudError ( #305 )
...
* sm.isEmpty
* Fix error
* first test
* changelog, yasway
* bug
* commented code
* tslint
* fix
* remove dead code
* merge
* minor
* readonly
* simplified
* address comments
2018-08-23 13:55:38 -07:00
Sergey Shandar
299cc866be
Fix for CloudError ( #304 )
...
* sm.isEmpty
* Fix error
* first test
* changelog, yasway
* bug
* commented code
2018-08-22 14:32:01 -07:00
Sergey Shandar
8a0ffce1cc
Simplified object information. No `cloneDeep` from `lodash` ( #303 )
...
* new info structure (using functions)
* no upgrade for yassway
* version and changelog
* merge signature improved
2018-08-22 10:22:47 -07:00
Sergey Shandar
811f549921
friendly nested names ( #299 )
...
* friendly names
* generated name
2018-08-21 17:52:41 -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
Sergey Shandar
4f1ddb3c45
Passing object information using title ( #297 )
...
* minor
* send error information using title
* update line and column
* Logging
* remove extra `errorsAddFileInfo`
* remove import
2018-08-19 11:30:54 -07:00
Sergey Shandar
9aee77ea67
File info in errors ( #296 )
...
* package update
* minor
* first transformation
* remove keys/entries
* clean-up
* update yasway
* changelog
* error processing experiment
* file info in errore
* 0.5.0
2018-08-17 15:32:19 -07:00
Sergey Shandar
23f0d59e00
Replacing transformation functions to work with source-map ( #294 )
...
* package update
* minor
* first transformation
* remove keys/entries
* clean-up
* update yasway
* changelog
2018-08-17 01:22:53 -07:00
Vlad Barosan
749c8e64ac
No Nesting for non-discriminator errors ( #295 )
2018-08-16 18:55:58 -07:00
Vlad Barosan
1f24493dc3
Add unique array errors ( #293 )
...
* Add unique array errors
* Lint fixes
* Add test for similar paths on serialized errors
2018-08-15 10:50:16 -07:00
Sergey Shandar
bb66d2c638
Using a JSON parser with a source map ( #292 )
...
* responseReducer & scenarioReducer
* toModelErrors
* toModelErrors: map vs reduce
* Iterable
* less reduce functions
* simplified scenarioReducer
* reduce() => map()
* operationId & scenarios
* minor
* stringMap
* stringMap
* no `Unknown`
* remove unused methods
* source-map design review
* strict TypeScript
* remove some any types
* remove `any` type
* no any
* less any
* new JSON parser
* Using JSON parser with a source map
* minor
* minor
* US data style
* address comments
* address comments
* clean jsonParser
2018-08-13 12:16:26 -07:00
Vlad Barosan
875b75a0c0
Single discriminator error ( #291 )
...
* Single discriminator error
* Add badges to readme
2018-08-10 21:23:12 -07:00
Vlad Barosan
d9297da9b0
Use json pointer for schema title ( #290 )
2018-08-10 16:57:28 -07:00
Vlad Barosan
f1990b98b2
Add property name as schema title ( #289 )
2018-08-10 14:04:08 -07:00
Vlad Barosan
fbefba5149
Insert title to schema ( #287 )
2018-08-08 15:51:46 -07:00
Sergey Shandar
8c40042c65
Replacing `reduce` error collections with lazy iterators. ( #285 )
...
* responseReducer & scenarioReducer
* toModelErrors
* toModelErrors: map vs reduce
* Iterable
* less reduce functions
* simplified scenarioReducer
* reduce() => map()
* operationId & scenarios
* minor
* 0.4.63
* test for getErrorFromModelValidation
2018-08-01 13:02:47 -07:00
Vlad Barosan
2e59377b8e
Fix security vulnerabilities ( #281 )
...
* Update dependencies to solve security vulnerabilities
* Add Prettier
* Update version and changelog
2018-07-25 17:55:59 -07:00
Sergey Shandar
0b6e835553
Export more types ( #278 )
...
* ValidationResult
* processValidationErrors
* BaseValidationError
* changelog
2018-07-20 10:35:59 -07:00
Sergey Shandar
7ac09ebe6b
yasway update ( #277 )
...
* yasway update
* no npm dependency
* changelog
2018-07-19 15:32:36 -07:00
Sergey Shandar
8e3eac69f5
Bug fix: `scenarios is undefined` when running AutoRest plugin ( #276 )
...
* reproduce "scenarios is undefined" error
* Bug fix: `scenarios is undefined` when running AutoRest plugin
2018-07-18 13:47:23 -07:00
Sergey Shandar
d0f8fc0833
export types for different tools ( #273 )
...
* BaseValidationError
* 0.4.58
* severity
* ModelValidationError
* ValidationResultSource
* enum => union
* import export type
* revert changes in ValidationResultSource
* revert changes
* export getErrorsFromModelValidation
* processValidationErrors
* ValidationError
* errorConstants
* errorCodeToSeverity
* serializeErrors
* 0.4.58
2018-07-16 23:28:07 -07:00
Sergey Shandar
0fc3261523
Simplified errors (using `--pretty` option) ( #272 )
...
* Resolve nested Schema Objects
* npm run cli
* errors.
* Error serialization
* simplify initialization.
* minor
* types for validationError
* minor refactoring
* option 'pretty'
* No Node type.
* ported code from openapi-tools
* SemanticValidator and ModelValidator
* a lot
* a lot
* a lot
* better
* consoleLog = off when petty
* yaml
* output to error stream
* 0.57
* some colors
* with reset
* address comments
2018-07-16 13:34:18 -07:00
Sergey Shandar
5bfc9951a1
Error serializer. ( #269 )
...
* Resolve nested Schema Objects
* npm run cli
* errors.
* Error serialization
* simplify initialization.
* minor
2018-07-06 10:37:48 -07:00
Sergey Shandar
bc0c5a3e8e
Remove `@types/winston` ( #270 )
...
* Remove @types/winston
* changelog
* package-lock.json
* Winston 3.0.0
* changelog.
2018-07-05 17:48:42 -07:00
Sergey Shandar
9fc199ef5c
Resolve nested Schema Objects ( #268 )
2018-06-29 15:30:59 -07:00
Vlad Barosan
3cd7940ae6
Do BOM stripping for remote URL's ( #267 )
2018-06-26 16:37:53 -07:00
Vlad Barosan
2e4a5ac0d5
Move to yasway
2018-06-20 16:44:53 -07:00
Sergey Shandar
2bd47bb0ca
revert changes in `validate.ts`
2018-06-19 16:35:06 -07:00
Sergey Shandar
9b527592e8
Replacing `oneOf` with `anyOf`.
2018-06-19 16:28:53 -07:00
Sergey Shandar
0270bc91a2
Repro of #248
2018-06-19 12:23:45 -07:00
Sergey Shandar
6691c43813
A reference on sway.
2018-06-18 14:07:39 -07:00
Sergey Shandar
eca48d9849
address comments
2018-06-11 12:58:08 -07:00
Sergey Shandar
09d132ea09
More TypeScript
2018-06-08 16:35:55 -07:00
Sergey Shandar
77d9bc2a07
tslinter
2018-06-04 06:16:47 -07:00
Sergey Shandar
04fef563b9
tslinter
2018-06-01 17:26:20 -07:00
Sergey Shandar
fdf8593fe5
TS improvements.
2018-06-01 10:01:39 -07:00
Sergey Shandar
596e465640
validators
2018-05-31 21:57:09 -07:00
Sergey Shandar
37e3979805
Reference type
2018-05-31 20:26:41 -07:00
Sergey Shandar
8c86884e26
Request,Responses
2018-05-31 18:46:01 -07:00
Sergey Shandar
8d693b8e80
pluginHod.ts
2018-05-31 17:36:35 -07:00
Sergey Shandar
1933c70d9a
types/
2018-05-31 16:50:45 -07:00
Sergey Shandar
5740fe1aa2
nyc & ts-node
2018-05-31 12:15:24 -07:00
Sergey Shandar
5e594a452f
Cache type
2018-05-30 18:54:48 -07:00
Sergey Shandar
cffed7b6c7
yuml2svg.d.ts
2018-05-30 17:23:05 -07:00
Sergey Shandar
475bc5a6ad
error.ts
2018-05-30 17:17:30 -07:00
Sergey Shandar
136d1b3ead
more TypeScript
2018-05-30 16:16:24 -07:00
Sergey Shandar
8e03be5f5c
specValidator
2018-05-30 15:40:34 -07:00
Sergey Shandar
6e3be56a43
async
2018-05-30 14:37:08 -07:00
Sergey Shandar
16e4b34186
yargs
2018-05-30 13:48:01 -07:00
Sergey Shandar
5f63183acf
more types
2018-05-29 23:53:02 -07:00
Sergey Shandar
c7ebe28720
imports
2018-05-29 21:33:36 -07:00
Sergey Shandar
51c36fddd1
xMsExampleExtractor
2018-05-29 20:30:11 -07:00
Sergey Shandar
edc9594b57
wireFormatGenerator
2018-05-29 18:36:27 -07:00
Sergey Shandar
374af224ee
specValidator
2018-05-29 18:33:22 -07:00
Sergey Shandar
7aa1fb93d6
specResolver
2018-05-29 18:31:41 -07:00
Sergey Shandar
6d616105b7
validationResponse
2018-05-29 18:27:01 -07:00
Sergey Shandar
45560412f2
utils
2018-05-29 18:20:42 -07:00
Sergey Shandar
555f90b9da
logging
2018-05-29 18:14:35 -07:00
Sergey Shandar
efd237cfe4
Contants.
2018-05-29 18:04:11 -07:00
Sergey Shandar
653f6da087
blah
2018-05-29 16:49:20 -07:00
Sergey Shandar
c89376bd36
multiple exports
2018-05-29 16:11:47 -07:00
Sergey Shandar
a75a0a4d6b
TS improvements
2018-05-29 15:38:27 -07:00
Sergey Shandar
68a1e601d8
improve typescript declarations.
2018-05-29 14:39:24 -07:00
Sergey Shandar
4d04902e6d
JavaScript => TypeScript
2018-05-25 17:18:04 -07:00
Sarangan Rajamanickam
e68ce7eaff
Fix Parameter missing issue with parameterized host extension
2018-05-14 14:40:29 -07:00
mcardosos
b4e55f0dd4
Extract headers
2018-04-30 18:45:17 -07:00
Vlad Barosan
43b6c9474d
Update for sway to include new enum case mismatch error
2018-04-19 19:28:51 -07:00
Vlad Barosan
ef94a0beac
Add innererror to cloudError model
2018-03-15 15:15:01 -07:00
Vlad Barosan
1530142a2a
Add test and address feedback
2018-03-15 14:55:52 -07:00
Vlad Barosan
2fbf9d8164
Add option to model implicit default response
2018-03-15 12:12:08 -07:00
Martin Strobel
7f0bb8594a
Adding back off and json special cases.
2018-03-08 14:14:41 -08:00
Martin Strobel
245267deb2
Adding back outer if statement.
...
Reading is good. Sorry folks.
2018-03-08 13:57:32 -08:00
Martin Strobel
f4d89182bd
Respect desired logLevel
...
Despite setting the consoleLogLevel to 'error' here:
32610853cf/test/semantic.js (L19)
A lot of extra lines are being output in CI right now, as seen here:
https://travis-ci.org/Azure/azure-rest-api-specs/jobs/351021743#L694
2018-03-08 13:45:10 -08:00
Vlad Barosan
e67c70462c
Don't validate pure objects ( #221 )
...
* Don't validate pure objects
* Update test for optional query parameters fix in Sway
2018-03-01 11:16:13 -08:00
Vlad Barosan
237053f428
Fix resolve external references bug ( #216 )
2018-02-08 17:58:25 -08:00
Amar Zavery
e37bacf5e2
use utils.getKeys() instead of utils.getValues()
2018-02-08 14:43:21 -08:00
Vlad Barosan
56b6c83fd6
Be more lenient in matching status code string. ( #212 )
...
* Update to generalize matching of status code string
* update changelog and version
2018-02-07 17:35:10 -08:00
Garrett Serack
71252299c9
fixed autorest extension usage ( #211 )
2018-02-07 15:28:06 -08:00
Vlad Barosan
4594adca86
Addressing PR feedback
2018-02-05 14:15:59 -08:00
Vlad Barosan
2aaf70d782
Add support for status code string message in live validation
2018-02-05 10:47:02 -08:00
Vlad Barosan
843bf5bbf6
Fix undefined headers property in model validation
2018-02-01 11:26:47 -08:00
Vlad Barosan
99c21fb260
Fix all linter issues
2018-01-31 12:40:00 -08:00
Vlad Barosan
aaa3851d03
Option to make regex match for live validation case insensitive
2018-01-30 19:04:56 -08:00
Vlad Barosan
ff7d81279e
Fix bugs and warnings from linter
2018-01-30 18:57:42 -08:00
Amar Zavery
f152b66349
Fixed a typo in the variable name while resolving nullable types.
2018-01-30 13:47:53 -08:00
Amar Zavery
e7721821e9
Merge pull request #192 from mcardosos/file
...
File
2018-01-17 10:20:32 -08:00
mcardosos
5bbf7114b1
Fixes consumes and produces
2018-01-16 16:37:37 -08:00
mcardosos
70327dce09
Feedback
2018-01-16 13:30:35 -08:00
mcardosos
10a5878451
Does not error on missing definitions section
2018-01-11 17:17:09 -08:00
mcardosos
0cc12ed317
Sets content type correctly on request
2018-01-09 18:54:22 -08:00
Veronica Giaudrone
df2a2fa8aa
correcting one more case and fixing bug in isPureObject
2018-01-05 11:58:02 -08:00
Veronica Giaudrone
d3d0c896f5
addressing remaining code review feedback
2018-01-05 11:58:02 -08:00
Veronica Giaudrone
021fa30f6b
addressing part of CR feedback and semantic validation impact
2018-01-05 11:58:02 -08:00
Veronica Giaudrone
da2a3df1f5
updating code for nullable types and tests
2018-01-05 11:58:02 -08:00
Veronica Giaudrone
d43d2076a5
allow null types
2018-01-05 11:58:02 -08:00
Amar Zavery
ce4b5805f9
Fixed #190 and #191
2017-12-11 15:00:14 -08:00
Amar Zavery
43f526f034
Merge branch 'master' of github.com:Azure/oav into uml
2017-12-11 14:21:56 -08:00
Amar Zavery
3bdc7d5191
Addressed review feedback
2017-12-05 14:22:07 -08:00
Amar Zavery
31ba4fb54a
Ensure discriminator property has the correct enum constant while resolving it.
2017-12-04 18:13:05 -08:00
Amar Zavery
279aeb35e1
added test and more options
2017-12-04 13:10:41 -08:00
Amar Zavery
7921344cf7
generate uml diagram
2017-12-04 10:42:00 -08:00
Amar Zavery
700cb47dd4
add test for semantic validation
2017-11-21 13:19:57 -08:00
Amar Zavery
c17fc72aff
code-changes: add support for x-ms-parameterized-host
2017-11-20 12:39:15 -08:00
Amar Zavery
b50198201d
code change: validating examples for parameters in formData
2017-11-19 15:28:55 -08:00
Amar Zavery
8e3418dd32
Merge pull request #180 from amarzavery/semantic-dis
...
provide baseUrl by looking at the host and the basePath property
2017-11-09 10:25:33 -08:00
Amar Zavery
26a8049f2e
provide baseUrl by looking at the host and the basePath property
2017-11-08 13:56:30 -08:00
Vlad Barosan
b7bdb5da14
Allow custom swagger paths pattern for building the models cache
2017-11-08 12:47:47 -08:00
Vlad Barosan
e487a14912
Allow custom branch when cloning git repo
2017-11-06 17:02:49 -08:00
Amar Zavery
2f857831c8
code review feedback
2017-10-24 17:07:48 -07:00
Amar Zavery
a0610d73c8
Disable resolving discriminators for semantic validation of a 2.0 openapi spec.
2017-10-24 16:12:08 -07:00
Amar Zavery
eb4160c67c
fix a bug with polymorphic model validation. Entire tree except the leaf nodes need to be traversed for replacing oneOf references.
2017-10-20 17:36:41 -07:00
Vishrut Shah
d78755ab18
Adding first set of test cases
2017-10-18 14:18:54 -07:00
Vishrut Shah
d712baf267
Resolve the polymorphic models and validate examples
2017-10-18 14:18:54 -07:00
Veronica Giaudrone
1a94f6a365
updating model validator plugin to autorest
2017-10-02 14:10:39 -07:00
Amar Zavery
2b517949ca
Provide the filename that has an incorrect json.
2017-09-25 12:01:16 -07:00
Amar Zavery
d181d25349
handle the case of "?" in path across liveValidator, specValidator and wireformatGenerator.
2017-09-14 15:05:06 -07:00
Amar Zavery
52137e0510
addressed feedback and made changes to the logic of unifying xmsPaths. Instead of replacing question markwith slashes from the paths in xmsPaths we will handle them while constructing request in model validation and wireformat generation.
2017-09-14 14:03:32 -07:00
Amar Zavery
818ba553be
addressed feedback
2017-09-14 11:53:25 -07:00
Amar Zavery
a1dd6e49e2
code fixes for #140 and #165
2017-09-12 19:31:20 -07:00
Amar Zavery
77ad3161eb
fixes #161
2017-08-30 09:06:55 -07:00
Vishrut Shah
527b0a7aaf
Wire format generator fixes
2017-08-23 16:13:36 -07:00
Vishrut Shah
b7f9f8c71c
Shallow clone repo
2017-08-11 12:07:38 -07:00
Veronica Giaudrone
ec8608260b
Merge pull request #143 from veronicagg/model-validator-int
...
Preparing oav to plug-in to autorest
2017-08-04 17:47:47 -07:00
Veronica Giaudrone
75e5462566
updating live validator based on feedback
2017-08-03 15:17:14 -07:00
Vishrut Shah
d5dcf4a354
Skipping the live and wire-format folders
2017-08-03 13:58:27 -07:00
Vishrut Shah
f974a31a06
Fixed repo cloning logic for live validator
2017-08-03 13:46:02 -07:00
Veronica Giaudrone
dbc63eb289
updating live validation error
2017-08-02 17:16:13 -07:00
Veronica Giaudrone
561802d586
addressing code review feedback
2017-08-02 17:01:19 -07:00
Veronica Giaudrone
e3d95d906d
Fixing bug found via CI - live validator tests
2017-08-02 17:01:19 -07:00
Veronica Giaudrone
c6192a24b5
Preparing oav to plugin to autorest and adding id to error codes for consistency and documentation
2017-08-02 17:01:19 -07:00
Vishrut Shah
6252310066
Live validator changes to support re-orged repo: azure-rest-api-specs
2017-07-11 16:24:27 -07:00
Amar Zavery
86bd47c015
fixed #134
2017-07-03 15:54:50 -07:00
Amar Zavery
ca444de537
separating md and yaml templates
2017-06-28 09:49:33 -07:00
Amar Zavery
ec0d891aec
initial commit to support yaml format
2017-06-26 10:59:40 -07:00
Vishrut Shah
f7cf17e7c9
Merge pull request #130 from vishrutshah/bug-fix
...
Minor bug fix in error construction
2017-06-07 22:04:00 -07:00
Vishrut Shah
a537d7c835
Addressing CR feedback
2017-06-07 11:28:53 -07:00
Vishrut Shah
1d309b2fb4
Minor bug fix in error construction
2017-06-06 11:58:48 -07:00
Vishrut Shah
53af698533
Do not reject all cache building while one swagger is malicious
2017-06-01 13:21:24 -07:00
Vishrut Shah
e091bc0d61
Bit more precise documentation for cli
2017-05-25 14:21:11 -07:00
Vishrut Shah
474e6c59a0
addressing code review feedbacks
2017-05-24 13:30:41 -07:00
Vishrut Shah
9242594058
Renaming xMsExampleGenerator to xMsExampleExtractor.js
2017-05-23 11:46:20 -07:00
Vishrut Shah
b2097d45ff
Updating command line options and adding log levels
2017-05-23 11:31:14 -07:00
Vishrut Shah
93c34bc224
Adding new CLI command for extracting xmsexamples from recordings
2017-05-23 09:28:17 -07:00
amarzavery
be1cbfc508
ensure long running response status code modeled correctly
2017-04-29 06:06:03 -07:00
amarzavery
31c44003e7
added support for curl
2017-04-28 20:31:07 -07:00
amarzavery
5e7eba7e96
generate wire format in a .md file
2017-04-28 08:57:44 -07:00
amarzavery
79dfcd8b36
removing input from the response to ensure that response is within the size of ETW log response
2017-04-18 19:03:17 -07:00
Vishrut Shah
13afb1bafb
Bug fixes
2017-04-18 15:35:57 -07:00
Vishrut Shah
dfa57da318
Updating live recoedings to export according to required models
2017-04-18 13:40:21 -07:00
Amar Zavery
cdae502b21
updated lib/models/index.d.ts
2017-04-17 17:48:47 -07:00
Amar Zavery
e14d08bb0c
more changes to swagger and generated models accordingly.
2017-04-17 17:37:00 -07:00
Vishrut Shah
888129dd66
Correct initialization of reason
2017-04-17 17:10:00 -07:00
Vishrut Shah
847f109948
Updating changes
2017-04-17 16:33:10 -07:00
Vishrut Shah
3982aa7f03
Remodel getPotentialOperations operation to return reasons
2017-04-17 15:20:08 -07:00
Amar Zavery
dfb3fa3385
code restructuring, spec changes, more tests added liveRequestResponseValidation method
2017-04-15 22:59:25 -07:00
Amar Zavery
903fba38f9
move validate inside lib and bump package version and its dependencies
2017-04-14 13:45:07 -07:00
Amar Zavery
0dfd51065b
circular json firx in result construction
2017-04-14 09:19:20 -07:00
Amar Zavery
6bef059b23
fixes
2017-04-13 20:47:38 -07:00
Amar Zavery
11aab083b0
Merge branch 'master' of github.com:Azure/openapi-validation-tools into bfix
2017-04-13 20:39:06 -07:00
Amar Zavery
d0631769d3
Added options and a new command to get a resolved spec
2017-04-13 20:32:39 -07:00
Vishrut Shah
97ab24e740
Removing test code from liveValidator
2017-04-13 15:19:19 -07:00
Vishrut Shah
7705d8fdae
Adding logic to fall back on searching operation into Microsoft.Unknown
2017-04-13 15:17:53 -07:00