From 6d851afe4aa5ad5617f311287d4291a4f8427a33 Mon Sep 17 00:00:00 2001 From: Adil Mirza Date: Fri, 4 Aug 2023 14:55:44 -0700 Subject: [PATCH] Update tests --- test/authenticate-requests.spec.js | 10 +++---- ...-header-format-pattern-requirement.spec.js | 6 ++-- test/date-response-header-regex-check.spec.js | 2 +- test/date-response-header-requirement.spec.js | 8 ++--- test/delete-204-success.spec.js | 2 +- test/etag-header-match-required.spec.js | 8 ++--- ...-operations-match-headers-with-get.spec.js | 8 ++--- test/no-crud-verbs.spec.js | 2 +- ...etag-cache-control-header-required.spec.js | 2 +- ...ication-json-charset-utf8-required.spec.js | 4 +-- test/oas2-array-plural-representation.spec.js | 6 ++-- ...as2-collections-returned-as-arrays.spec.js | 6 ++-- test/oas2-date-fields-iso-format.spec.js | 8 ++--- test/oas2-error-message.spec.js | 8 ++--- test/oas2-error-response-identifier.spec.js | 4 +-- test/oas2-field-names-pas-camel-case.spec.js | 8 ++--- ...ameter-link-header-required-likely.spec.js | 16 +++++----- ...eter-link-header-required-possible.spec.js | 30 +++++++++---------- ...oas2-get-collection-sort-parameter.spec.js | 4 +-- test/oas2-head-operations-no-body.spec.js | 2 +- test/oas2-https-only.spec.js | 2 +- test/oas2-no-boolean-string-enums.spec.js | 12 ++++---- test/oas2-order-parameter-asc-desc.spec.js | 4 +-- test/oas2-path-based-versioning-error.spec.js | 2 +- ...2-path-based-versioning-major-only.spec.js | 2 +- test/oas2-post-201-created.spec.js | 4 +-- ...er-accept-charset-default-required.spec.js | 2 +- ...eader-accept-charset-valid-default.spec.js | 2 +- ...t-header-accept-charset-valid-enum.spec.js | 2 +- ...equest-header-accept-encoding-enum.spec.js | 2 +- ...-header-accept-encoding-valid-enum.spec.js | 2 +- ...equest-header-accept-language-enum.spec.js | 2 +- ...-request-header-date-correct-regex.spec.js | 2 +- ...2-request-header-date-correct-type.spec.js | 8 ++--- ...-request-header-if-match-is-string.spec.js | 2 +- ...est-header-if-none-match-is-string.spec.js | 2 +- ...-request-header-if-range-is-string.spec.js | 2 +- ...cking-id-header-string-requirement.spec.js | 2 +- test/oas3-acceptable-auth.spec.js | 4 +-- ...ication-json-charset-utf8-required.spec.js | 2 +- test/oas3-array-plural-representation.spec.js | 6 ++-- ...as3-collections-returned-as-arrays.spec.js | 10 +++---- test/oas3-date-fields-iso-format.spec.js | 8 ++--- test/oas3-error-message.spec.js | 8 ++--- test/oas3-error-response-identifier.spec.js | 4 +-- test/oas3-field-names-pas-camel-case.spec.js | 8 ++--- ...ameter-link-header-required-likely.spec.js | 16 +++++----- ...eter-link-header-required-possible.spec.js | 30 +++++++++---------- ...oas3-get-collection-sort-parameter.spec.js | 4 +-- test/oas3-head-operations-no-body.spec.js | 2 +- test/oas3-https-only.spec.js | 2 +- test/oas3-jwt-format.spec.js | 2 +- test/oas3-no-boolean-string-enums.spec.js | 12 ++++---- test/oas3-order-parameter-asc-desc.spec.js | 4 +-- test/oas3-path-based-versioning-error.spec.js | 2 +- ...3-path-based-versioning-major-only.spec.js | 2 +- test/oas3-post-201-created.spec.js | 4 +-- ...er-accept-charset-default-required.spec.js | 2 +- ...eader-accept-charset-valid-default.spec.js | 2 +- ...t-header-accept-charset-valid-enum.spec.js | 2 +- ...equest-header-accept-encoding-enum.spec.js | 2 +- ...-header-accept-encoding-valid-enum.spec.js | 2 +- ...equest-header-accept-language-enum.spec.js | 2 +- ...-request-header-date-correct-regex.spec.js | 2 +- ...3-request-header-date-correct-type.spec.js | 8 ++--- ...-request-header-if-match-is-string.spec.js | 2 +- ...est-header-if-none-match-is-string.spec.js | 2 +- ...-request-header-if-range-is-string.spec.js | 2 +- ...cking-id-header-string-requirement.spec.js | 2 +- test/patch-200-204-success.spec.js | 12 ++++---- test/post-header-location.spec.js | 8 ++--- test/post-header.spec.js | 4 +-- test/put-200-204-success.spec.js | 8 ++--- test/resource-name-too-long.spec.js | 8 ++--- test/resource-pas-camel-case-error.spec.js | 4 +-- test/resource-pas-camel-case-info.spec.js | 4 +-- ...pond-with-recommended-delete-codes.spec.js | 4 +-- ...respond-with-recommended-get-codes.spec.js | 2 +- ...spond-with-recommended-patch-codes.spec.js | 6 ++-- ...espond-with-recommended-post-codes.spec.js | 2 +- ...respond-with-recommended-put-codes.spec.js | 2 +- test/sort-recommend-order.spec.js | 2 +- test/status-code-401.spec.js | 2 +- test/status-code-403.spec.js | 2 +- test/status-codes-in-2xx-3xx-4xx-5xx.spec.js | 18 +++++------ test/tracking-id-header-requirement.spec.js | 4 +-- 86 files changed, 226 insertions(+), 226 deletions(-) diff --git a/test/authenticate-requests.spec.js b/test/authenticate-requests.spec.js index 4d2d8ff..4a5d966 100644 --- a/test/authenticate-requests.spec.js +++ b/test/authenticate-requests.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests; "get.security" property must be truthy', path: [ 'paths', '/test', @@ -58,7 +58,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests; "post.security" property must be truthy', path: [ 'paths', '/test', @@ -78,7 +78,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests; "put.security" property must be truthy', path: [ 'paths', '/test', @@ -98,7 +98,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests; "delete.security" property must be truthy', path: [ 'paths', '/test', @@ -118,7 +118,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API.REST.SECURITY.03: My API authenticates and authorizes all requests; "options.security" property must be truthy', path: [ 'paths', '/test', diff --git a/test/date-response-header-format-pattern-requirement.spec.js b/test/date-response-header-format-pattern-requirement.spec.js index 1897f35..2f31621 100644 --- a/test/date-response-header-format-pattern-requirement.spec.js +++ b/test/date-response-header-format-pattern-requirement.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'All \'Date\' response headers should use a custom pattern match for RFC 5322. date-time or other given formats should not be used (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses include a \'Date\' header in the GMT timezone and RFC 5322 format.; "schema.pattern" property must be truthy', path: [ 'paths', '/test', @@ -61,7 +61,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'All \'Date\' response headers should use a custom pattern match for RFC 5322. date-time or other given formats should not be used (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses include a \'Date\' header in the GMT timezone and RFC 5322 format.; "format" property must be falsy', path: [ 'paths', '/test', @@ -87,7 +87,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'All \'Date\' response headers should use a custom pattern match for RFC 5322. date-time or other given formats should not be used (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses include a \'Date\' header in the GMT timezone and RFC 5322 format.; "schema.pattern" property must be truthy', path: [ 'paths', '/anotherTest', diff --git a/test/date-response-header-regex-check.spec.js b/test/date-response-header-regex-check.spec.js index 4537415..d675836 100644 --- a/test/date-response-header-regex-check.spec.js +++ b/test/date-response-header-regex-check.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'The regex pattern used does not pass basic linting sample checks - should not have matched case Thu 8 Apr 2021 19:06:27 GMT (Comma required after Day of Week) (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses include a \'Date\' header in the GMT timezone and RFC 5322 format.; The regex pattern used does not pass basic linting sample checks - should not have matched case Thu 8 Apr 2021 19:06:27 GMT (Comma required after Day of Week)', path: [ 'paths', '/test', diff --git a/test/date-response-header-requirement.spec.js b/test/date-response-header-requirement.spec.js index 2304be2..ef405e4 100644 --- a/test/date-response-header-requirement.spec.js +++ b/test/date-response-header-requirement.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'All responses must include a \'Date\' header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses include a \'Date\' header in the GMT timezone and RFC 5322 format.; An expected pathway is missing. Prerequisite: "headers", search: "Date"', path: [ 'paths', '/test', @@ -58,7 +58,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'All responses must include a \'Date\' header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses include a \'Date\' header in the GMT timezone and RFC 5322 format.; An expected pathway is missing. Prerequisite: "headers", search: "Date"', path: [ 'paths', '/test', @@ -87,7 +87,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'All responses must include a \'Date\' header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses include a \'Date\' header in the GMT timezone and RFC 5322 format.; An expected pathway is missing. Prerequisite: "headers", search: "Date"', path: [ 'paths', '/test', @@ -109,7 +109,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'All responses must include a \'Date\' header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses include a \'Date\' header in the GMT timezone and RFC 5322 format.; An expected pathway is missing. Prerequisite: "headers", search: "Date"', path: [ 'paths', '/test', diff --git a/test/delete-204-success.spec.js b/test/delete-204-success.spec.js index 8db9fd8..35731a2 100644 --- a/test/delete-204-success.spec.js +++ b/test/delete-204-success.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'DELETE operation must return \'204 No Content\' on success (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'DELETE operations return \'204 No Content\' on success.; "responses[204]" property must be truthy', path: [ 'paths', '/test', diff --git a/test/etag-header-match-required.spec.js b/test/etag-header-match-required.spec.js index 2cc3ab2..f062ffa 100644 --- a/test/etag-header-match-required.spec.js +++ b/test/etag-header-match-required.spec.js @@ -33,10 +33,10 @@ describe(ruleName, () => { const spec = await fsPromises.readFile(`${ resPath }/negative.yml`); const res = await spectral.run(spec.toString()); - expect(res).toEqual([ + expect([res[1]]).toEqual([ { code: ruleName, - message: 'In cases where ETag is supported, such resources should also support If-Match and If-None-Match request headers (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'In cases where ETag is supported, such resources should also support If-Match and If-None-Match request headers.; "headers.If-None-Match" property must be truthy', path: [ 'paths', '/test', @@ -66,7 +66,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'In cases where ETag is supported, such resources should also support If-Match and If-None-Match request headers (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'In cases where ETag is supported, such resources should also support If-Match and If-None-Match request headers.; "headers.If-None-Match" property must be truthy', path: [ 'paths', '/test', @@ -89,7 +89,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'In cases where ETag is supported, such resources should also support If-Match and If-None-Match request headers (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'In cases where ETag is supported, such resources should also support If-Match and If-None-Match request headers.; "headers.If-Match" property must be truthy', path: [ 'paths', '/anotherTest', diff --git a/test/head-operations-match-headers-with-get.spec.js b/test/head-operations-match-headers-with-get.spec.js index 3cd2c54..96d9aa1 100644 --- a/test/head-operations-match-headers-with-get.spec.js +++ b/test/head-operations-match-headers-with-get.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'The following headers are missing from the HEAD operation for response code 200: X-RateLimit-Limit (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HEAD operations must return response headers identical to the corresponding GET.; The following headers are missing from the HEAD operation for response code 200: X-RateLimit-Limit', path: [ 'paths', '/test', @@ -67,7 +67,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'The HEAD operation for response code 200 is missing a "headers" definition (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HEAD operations must return response headers identical to the corresponding GET.; The HEAD operation for response code 200 is missing a "headers" definition', path: [ 'paths', '/test', @@ -116,7 +116,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'The following headers are missing from the HEAD operation for response code 200: X-RateLimit-Limit (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HEAD operations must return response headers identical to the corresponding GET.; The following headers are missing from the HEAD operation for response code 200: X-RateLimit-Limit', path: [ 'paths', '/test', @@ -146,7 +146,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'The HEAD operation for response code 200 is missing a "headers" definition (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HEAD operations must return response headers identical to the corresponding GET.; The HEAD operation for response code 200 is missing a "headers" definition', path: [ 'paths', '/test', diff --git a/test/no-crud-verbs.spec.js b/test/no-crud-verbs.spec.js index bb3b0a9..5b4815a 100644 --- a/test/no-crud-verbs.spec.js +++ b/test/no-crud-verbs.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Standard CRUD lifecycle operations map to HTTP verbs; Functional resources are used when non-standard CRUD are needed (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Standard CRUD lifecycle operations map to HTTP verbs; Functional resources are used when non-standard CRUD are needed.; Standard CRUD lifecycle operations map to HTTP verbs; Functional resources are used when non-standard CRUD are needed', path: [ 'paths', '/test/get', diff --git a/test/no-etag-cache-control-header-required.spec.js b/test/no-etag-cache-control-header-required.spec.js index ab6a431..6be1d0e 100644 --- a/test/no-etag-cache-control-header-required.spec.js +++ b/test/no-etag-cache-control-header-required.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Where caching is not appropriate, operations must include a Cache-Control header (e.g. max-age=0, no-cache, no-store, must-revalidate) and must not include an ETag header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Where caching is not appropriate, operations must include a Cache-Control header (e.g. max-age=0, no-cache, no-store, must-revalidate) and must not include an ETag header.; "headers.Cache-Control" property must be truthy', path: [ 'paths', '/test', diff --git a/test/oas2-application-json-charset-utf8-required.spec.js b/test/oas2-application-json-charset-utf8-required.spec.js index 16364fb..ac25f87 100644 --- a/test/oas2-application-json-charset-utf8-required.spec.js +++ b/test/oas2-application-json-charset-utf8-required.spec.js @@ -37,7 +37,7 @@ describe('ruleName', () => { expect(res).toEqual([ { code: ruleName, - message: 'JSON representations should be declared using \'application/json\' or \'application/json; charset=UTF-8\' media types (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'JSON representations should be declared using \'application/json\' or \'application/json; charset=UTF-8\' media types.; "application/json; charset=utf-16" must not match the pattern "^application/json; charset=(?![Uu][Tt][Ff]-8$)"', path: [ 'paths', '/test', @@ -59,7 +59,7 @@ describe('ruleName', () => { }, { code: ruleName, - message: 'JSON representations should be declared using \'application/json\' or \'application/json; charset=UTF-8\' media types (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'JSON representations should be declared using \'application/json\' or \'application/json; charset=UTF-8\' media types.; "application/json; charset=utf-16" must not match the pattern "^application/json; charset=(?![Uu][Tt][Ff]-8$)"', path: [ 'paths', '/test', diff --git a/test/oas2-array-plural-representation.spec.js b/test/oas2-array-plural-representation.spec.js index 3a8f370..fe4b858 100644 --- a/test/oas2-array-plural-representation.spec.js +++ b/test/oas2-array-plural-representation.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use plural noun names for collections (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use plural noun names for collections.; device should be plural.', path: [ 'paths', '/test', @@ -62,7 +62,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use plural noun names for collections (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use plural noun names for collections.; contract should be plural.', path: [ 'paths', '/test', @@ -90,7 +90,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use plural noun names for collections (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use plural noun names for collections.; balance should be plural.', path: [ 'paths', '/test', diff --git a/test/oas2-collections-returned-as-arrays.spec.js b/test/oas2-collections-returned-as-arrays.spec.js index cedbefb..83dbe94 100644 --- a/test/oas2-collections-returned-as-arrays.spec.js +++ b/test/oas2-collections-returned-as-arrays.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Collections should be encapsulated within an object. Do not return un-encapsulated arrays (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Collections are returned as arrays encapsulated with a named field such as \'items\'.; "array" must not match the pattern "^array$"', path: [ 'paths', '/test', @@ -68,7 +68,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Collections should be encapsulated within an object. Do not return un-encapsulated arrays (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Collections are returned as arrays encapsulated with a named field such as \'items\'.; "array" must not match the pattern "^array$"', path: [ 'paths', '/test', @@ -92,7 +92,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Collections should be encapsulated within an object. Do not return un-encapsulated arrays (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Collections are returned as arrays encapsulated with a named field such as \'items\'.; "array" must not match the pattern "^array$"', path: [ 'paths', '/test', diff --git a/test/oas2-date-fields-iso-format.spec.js b/test/oas2-date-fields-iso-format.spec.js index 04bd3e1..40cf8e6 100644 --- a/test/oas2-date-fields-iso-format.spec.js +++ b/test/oas2-date-fields-iso-format.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time.; Field timestamp should be type "string" with a format of "date-time".', path: [ 'paths', '/test', @@ -66,7 +66,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time.; Field requestDate should be type "string" with a format of "date-time".', path: [ 'paths', '/test', @@ -91,7 +91,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time.; Field date should be type "string" with a format of "date-time".', path: [ 'paths', '/test', @@ -116,7 +116,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time.; Field dates\'s items should be type "string" with a format of "date-time".', path: [ 'paths', '/test', diff --git a/test/oas2-error-message.spec.js b/test/oas2-error-message.spec.js index c1d849c..e1a4f43 100644 --- a/test/oas2-error-message.spec.js +++ b/test/oas2-error-message.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Error representations include a useful human-readable message. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include a useful human-readable message.; Error representations include a useful human-readable message.', path: [ 'paths', '/test', @@ -59,7 +59,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Error representations include a useful human-readable message. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include a useful human-readable message.; Error representations include a useful human-readable message.', path: [ 'paths', '/test', @@ -100,7 +100,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Error representations include a useful human-readable message. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include a useful human-readable message.; Error representations include a useful human-readable message.', path: [ 'paths', '/test', @@ -122,7 +122,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Error representations include a useful human-readable message. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include a useful human-readable message.; Error representations include a useful human-readable message.', path: [ 'paths', '/test', diff --git a/test/oas2-error-response-identifier.spec.js b/test/oas2-error-response-identifier.spec.js index b59045e..fe814ed 100644 --- a/test/oas2-error-response-identifier.spec.js +++ b/test/oas2-error-response-identifier.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Error representations include an identifier to help with troubleshooting (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include an identifier to help with troubleshooting.; Error representations include an identifier to help with troubleshooting.', path: [ 'paths', '/test', @@ -60,7 +60,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Error representations include an identifier to help with troubleshooting (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include an identifier to help with troubleshooting.; Error representations include an identifier to help with troubleshooting.', path: [ 'paths', '/test', diff --git a/test/oas2-field-names-pas-camel-case.spec.js b/test/oas2-field-names-pas-camel-case.spec.js index 228eedd..28bbb00 100644 --- a/test/oas2-field-names-pas-camel-case.spec.js +++ b/test/oas2-field-names-pas-camel-case.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'user_id (paths./test.post.parameters.0.name) field is not PasCamelCase (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation field names use PasCamelCase.; user_id (paths./test.post.parameters.0.name)', path: [ 'paths', '/test', @@ -59,7 +59,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'MYData (paths./test.post.parameters.1.schema.properties.MYData) field is not PasCamelCase (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation field names use PasCamelCase.; MYData (paths./test.post.parameters.1.schema.properties.MYData)', path: [ 'paths', '/test', @@ -85,7 +85,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'MYData (paths./test.post.responses.200.schema.items.properties.MYData) field is not PasCamelCase (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation field names use PasCamelCase.; MYData (paths./test.post.responses.200.schema.items.properties.MYData)', path: [ 'paths', '/test', @@ -120,7 +120,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'snake_case (paths./test.get.responses.200.schema.items.properties.snake_case) field is not PasCamelCase (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation field names use PasCamelCase.; snake_case (paths./test.get.responses.200.schema.items.properties.snake_case)', path: [ 'paths', '/test', diff --git a/test/oas2-get-collection-max-parameter-link-header-required-likely.spec.js b/test/oas2-get-collection-max-parameter-link-header-required-likely.spec.js index 17d7273..c1fa476 100644 --- a/test/oas2-get-collection-max-parameter-link-header-required-likely.spec.js +++ b/test/oas2-get-collection-max-parameter-link-header-required-likely.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -58,7 +58,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -87,7 +87,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -107,7 +107,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -142,7 +142,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -169,7 +169,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -198,7 +198,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test/{id}/children', @@ -218,7 +218,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test/{id}/children', diff --git a/test/oas2-get-collection-max-parameter-link-header-required-possible.spec.js b/test/oas2-get-collection-max-parameter-link-header-required-possible.spec.js index 9f9005c..da37857 100644 --- a/test/oas2-get-collection-max-parameter-link-header-required-possible.spec.js +++ b/test/oas2-get-collection-max-parameter-link-header-required-possible.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -58,7 +58,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test', @@ -78,7 +78,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -107,7 +107,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -127,7 +127,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test', @@ -147,7 +147,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -176,7 +176,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -196,7 +196,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test', @@ -216,7 +216,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -245,7 +245,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -272,7 +272,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test', @@ -299,7 +299,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -328,7 +328,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test/{id}/children', @@ -348,7 +348,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test/{id}/children', @@ -368,7 +368,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test/{id}/children', diff --git a/test/oas2-get-collection-sort-parameter.spec.js b/test/oas2-get-collection-sort-parameter.spec.js index 361b25b..3f69f10 100644 --- a/test/oas2-get-collection-sort-parameter.spec.js +++ b/test/oas2-get-collection-sort-parameter.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'It is recommended to add a "sort" query parameter to sort this collection (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Sorting collections is designed with a \'sort\' query parameter.; It is recommended to add a "sort" query parameter to sort this collection', path: [ 'paths', '/test', @@ -65,7 +65,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'It is recommended to add a "sort" query parameter to sort this collection (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Sorting collections is designed with a \'sort\' query parameter.; It is recommended to add a "sort" query parameter to sort this collection', path: [ 'paths', '/test', diff --git a/test/oas2-head-operations-no-body.spec.js b/test/oas2-head-operations-no-body.spec.js index 1731d2a..5429712 100644 --- a/test/oas2-head-operations-no-body.spec.js +++ b/test/oas2-head-operations-no-body.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'HEAD operations with a corresponding GET operation must return no body content (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HEAD operations with a corresponding GET operation must return no body content.; "schema" property must be falsy', path: [ 'paths', '/test', diff --git a/test/oas2-https-only.spec.js b/test/oas2-https-only.spec.js index 9c8c00f..92fc8f6 100644 --- a/test/oas2-https-only.spec.js +++ b/test/oas2-https-only.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'My API supports HTTPS only. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API supports HTTPS only.; "http" must match the pattern "^https$"', path: [ 'schemes', '1', diff --git a/test/oas2-no-boolean-string-enums.spec.js b/test/oas2-no-boolean-string-enums.spec.js index 360de4b..df4528e 100644 --- a/test/oas2-no-boolean-string-enums.spec.js +++ b/test/oas2-no-boolean-string-enums.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -70,7 +70,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -103,7 +103,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -137,7 +137,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -174,7 +174,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -208,7 +208,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', diff --git a/test/oas2-order-parameter-asc-desc.spec.js b/test/oas2-order-parameter-asc-desc.spec.js index c344a69..e2fa54f 100644 --- a/test/oas2-order-parameter-asc-desc.spec.js +++ b/test/oas2-order-parameter-asc-desc.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Ordering collections is designed with an \'order\' query parameter specifying \'asc\' or \'desc\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Ordering collections is designed with an \'order\' query parameter specifying \'asc\' or \'desc\'.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', @@ -67,7 +67,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Ordering collections is designed with an \'order\' query parameter specifying \'asc\' or \'desc\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Ordering collections is designed with an \'order\' query parameter specifying \'asc\' or \'desc\'.; Given does not match target enums.', path: [ 'paths', '/test', diff --git a/test/oas2-path-based-versioning-error.spec.js b/test/oas2-path-based-versioning-error.spec.js index ca82f67..9717b5b 100644 --- a/test/oas2-path-based-versioning-error.spec.js +++ b/test/oas2-path-based-versioning-error.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'API uses path-based versioning. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API uses path-based versioning.; API uses path-based versioning.', path: [], range: { start: { diff --git a/test/oas2-path-based-versioning-major-only.spec.js b/test/oas2-path-based-versioning-major-only.spec.js index f6293d6..c6baac2 100644 --- a/test/oas2-path-based-versioning-major-only.spec.js +++ b/test/oas2-path-based-versioning-major-only.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'API shows only major version numbers on the path; not the revision numbers. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API shows only major version numbers on the path; not the revision numbers.; API shows only major version numbers on the path; not the revision numbers.', path: [], range: { start: { diff --git a/test/oas2-post-201-created.spec.js b/test/oas2-post-201-created.spec.js index b17ecd4..dbab3db 100644 --- a/test/oas2-post-201-created.spec.js +++ b/test/oas2-post-201-created.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'POST operations which create objects return 201 Created, with a full or reference-only representation. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations which create objects return 201 Created, with a full or reference-only representation.; "[201].schema" property must be truthy', path: [ 'paths', '/test', @@ -59,7 +59,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'POST operations which create objects return 201 Created, with a full or reference-only representation. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations which create objects return 201 Created, with a full or reference-only representation.; "[201].schema" property must be truthy', path: [ 'paths', '/other/test', diff --git a/test/oas2-request-header-accept-charset-default-required.spec.js b/test/oas2-request-header-accept-charset-default-required.spec.js index 99b5d2f..ee82bd9 100644 --- a/test/oas2-request-header-accept-charset-default-required.spec.js +++ b/test/oas2-request-header-accept-charset-default-required.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Charset must have a default defined (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "[0].default" property must be truthy', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-accept-charset-valid-default.spec.js b/test/oas2-request-header-accept-charset-valid-default.spec.js index b4cf5e2..4f19cab 100644 --- a/test/oas2-request-header-accept-charset-valid-default.spec.js +++ b/test/oas2-request-header-accept-charset-valid-default.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Default for Accept-Charset must be UTF-8 (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "test" must match the pattern "^[Uu][Tt][Ff]-8$"', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-accept-charset-valid-enum.spec.js b/test/oas2-request-header-accept-charset-valid-enum.spec.js index 51359ad..4a33c9d 100644 --- a/test/oas2-request-header-accept-charset-valid-enum.spec.js +++ b/test/oas2-request-header-accept-charset-valid-enum.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Charset must allow UTF-8 and ISO-8859-1. (The following values are missing from the enum: ISO-8859-1.) (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; The following values are missing from the enum: ISO-8859-1.', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-accept-encoding-enum.spec.js b/test/oas2-request-header-accept-encoding-enum.spec.js index 992c1c6..7de30a8 100644 --- a/test/oas2-request-header-accept-encoding-enum.spec.js +++ b/test/oas2-request-header-accept-encoding-enum.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Encoding should have a list of accepted values (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "[0].enum" property must be truthy', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-accept-encoding-valid-enum.spec.js b/test/oas2-request-header-accept-encoding-valid-enum.spec.js index 1c82a74..75356bc 100644 --- a/test/oas2-request-header-accept-encoding-valid-enum.spec.js +++ b/test/oas2-request-header-accept-encoding-valid-enum.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Encoding accepts a value that is not valid per RFC 7231. (The following values must be removed: notvalid.) (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer) Please see https://www.iana.org/assignments/http-parameters/http-parameters.xhtml', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; The following values must be removed: notvalid.', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-accept-language-enum.spec.js b/test/oas2-request-header-accept-language-enum.spec.js index a040d8d..25c8213 100644 --- a/test/oas2-request-header-accept-language-enum.spec.js +++ b/test/oas2-request-header-accept-language-enum.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Language should have a list of accepted values (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "[0].enum" property must be truthy', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-date-correct-regex.spec.js b/test/oas2-request-header-date-correct-regex.spec.js index 606393d..215a0d6 100644 --- a/test/oas2-request-header-date-correct-regex.spec.js +++ b/test/oas2-request-header-date-correct-regex.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Date header should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; The regex pattern used does not pass basic linting sample checks - should not have matched case Thu 8 Apr 2021 19:06:27 GMT (Comma required after Day of Week)', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-date-correct-type.spec.js b/test/oas2-request-header-date-correct-type.spec.js index f40dc79..1db600f 100644 --- a/test/oas2-request-header-date-correct-type.spec.js +++ b/test/oas2-request-header-date-correct-type.spec.js @@ -39,7 +39,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Date header should be type \'string\' and should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "[0].pattern" property must be truthy', path: [ 'paths', '/test', @@ -61,7 +61,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Date header should be type \'string\' and should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', @@ -92,7 +92,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Date header should be type \'string\' and should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "[0].pattern" property must be truthy', path: [ 'paths', '/test', @@ -114,7 +114,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Date header should be type \'string\' and should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "format" property must be falsy', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-if-match-is-string.spec.js b/test/oas2-request-header-if-match-is-string.spec.js index 53c21a6..d42c75b 100644 --- a/test/oas2-request-header-if-match-is-string.spec.js +++ b/test/oas2-request-header-if-match-is-string.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'If-Match must be a string (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-if-none-match-is-string.spec.js b/test/oas2-request-header-if-none-match-is-string.spec.js index b9a2540..15b4317 100644 --- a/test/oas2-request-header-if-none-match-is-string.spec.js +++ b/test/oas2-request-header-if-none-match-is-string.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'If-None-Match must be a string (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', diff --git a/test/oas2-request-header-if-range-is-string.spec.js b/test/oas2-request-header-if-range-is-string.spec.js index f12437f..eb03588 100644 --- a/test/oas2-request-header-if-range-is-string.spec.js +++ b/test/oas2-request-header-if-range-is-string.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'If-Range must be a string (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', diff --git a/test/oas2-tracking-id-header-string-requirement.spec.js b/test/oas2-tracking-id-header-string-requirement.spec.js index 38c97f6..486107a 100644 --- a/test/oas2-tracking-id-header-string-requirement.spec.js +++ b/test/oas2-tracking-id-header-string-requirement.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: '\'TrackingID\' header should be a string in order to accommodate a UUID (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: '\'TrackingID\' header should be a string in order to accommodate a UUID.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', diff --git a/test/oas3-acceptable-auth.spec.js b/test/oas3-acceptable-auth.spec.js index be8cb45..8eb830b 100644 --- a/test/oas3-acceptable-auth.spec.js +++ b/test/oas3-acceptable-auth.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: 'oas3-acceptable-auth', - message: 'My API authenticates requests using access tokens; NOT username/passwords. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API authenticates requests using access tokens; NOT username/passwords.; My API authenticates requests using access tokens; NOT username/passwords.', path: [ 'components', 'securitySchemes', @@ -64,7 +64,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: 'oas3-acceptable-auth', - message: 'My API authenticates requests using access tokens; NOT username/passwords. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API authenticates requests using access tokens; NOT username/passwords.; My API authenticates requests using access tokens; NOT username/passwords.', path: [ 'components', 'securitySchemes', diff --git a/test/oas3-application-json-charset-utf8-required.spec.js b/test/oas3-application-json-charset-utf8-required.spec.js index 739dcdd..8f622a6 100644 --- a/test/oas3-application-json-charset-utf8-required.spec.js +++ b/test/oas3-application-json-charset-utf8-required.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'JSON representations should be declared using \'application/json\' or \'application/json; charset=UTF-8\' media types (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'JSON representations should be declared using \'application/json\' or \'application/json; charset=UTF-8\' media types.; Object{} must not match the pattern "^application/json; charset=(?![Uu][Tt][Ff]-8$)"', path: [ 'paths', '/test', diff --git a/test/oas3-array-plural-representation.spec.js b/test/oas3-array-plural-representation.spec.js index e191c1f..5f36c2b 100644 --- a/test/oas3-array-plural-representation.spec.js +++ b/test/oas3-array-plural-representation.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use plural noun names for collections (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use plural noun names for collections.; device should be plural.', path: [ 'paths', '/test', @@ -65,7 +65,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use plural noun names for collections (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use plural noun names for collections.; contract should be plural.', path: [ 'paths', '/test', @@ -95,7 +95,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use plural noun names for collections (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use plural noun names for collections.; balance should be plural.', path: [ 'paths', '/test', diff --git a/test/oas3-collections-returned-as-arrays.spec.js b/test/oas3-collections-returned-as-arrays.spec.js index 452802f..17a9040 100644 --- a/test/oas3-collections-returned-as-arrays.spec.js +++ b/test/oas3-collections-returned-as-arrays.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Collections should be encapsulated within an object. Do not return un-encapsulated arrays (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Collections are returned as arrays encapsulated with a named field such as \'items\'.; "array" must not match the pattern "^array$"', path: [ 'paths', '/test', @@ -63,7 +63,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Collections should be encapsulated within an object. Do not return un-encapsulated arrays (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Collections are returned as arrays encapsulated with a named field such as \'items\'.; "array" must not match the pattern "^array$"', path: [ 'paths', '/test', @@ -96,7 +96,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Collections should be encapsulated within an object. Do not return un-encapsulated arrays (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Collections are returned as arrays encapsulated with a named field such as \'items\'.; "array" must not match the pattern "^array$"', path: [ 'paths', '/test', @@ -129,7 +129,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Collections should be encapsulated within an object. Do not return un-encapsulated arrays (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Collections are returned as arrays encapsulated with a named field such as \'items\'.; "array" must not match the pattern "^array$"', path: [ 'paths', '/test', @@ -155,7 +155,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Collections should be encapsulated within an object. Do not return un-encapsulated arrays (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Collections are returned as arrays encapsulated with a named field such as \'items\'.; "array" must not match the pattern "^array$"', path: [ 'paths', '/test', diff --git a/test/oas3-date-fields-iso-format.spec.js b/test/oas3-date-fields-iso-format.spec.js index b757ba5..a302c08 100644 --- a/test/oas3-date-fields-iso-format.spec.js +++ b/test/oas3-date-fields-iso-format.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time.; Field timestamp should be type "string" with a format of "date-time".', path: [ 'paths', '/test', @@ -68,7 +68,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time.; Field requestDate should be type "string" with a format of "date-time".', path: [ 'paths', '/test', @@ -95,7 +95,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time.; Field date should be type "string" with a format of "date-time".', path: [ 'paths', '/test', @@ -122,7 +122,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use strings in \'iso-date-time\' format (RFC-3339) for date/time.; Field dates\'s items should be type "string" with a format of "date-time".', path: [ 'paths', '/test', diff --git a/test/oas3-error-message.spec.js b/test/oas3-error-message.spec.js index 306a26b..ca5bbb7 100644 --- a/test/oas3-error-message.spec.js +++ b/test/oas3-error-message.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Error representations include a useful human-readable message. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include a useful human-readable message.; Error representations include a useful human-readable message.', path: [ 'paths', '/test', @@ -59,7 +59,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Error representations include a useful human-readable message. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include a useful human-readable message.; Error representations include a useful human-readable message.', path: [ 'paths', '/test', @@ -100,7 +100,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Error representations include a useful human-readable message. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include a useful human-readable message.; Error representations include a useful human-readable message.', path: [ 'paths', '/test', @@ -122,7 +122,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Error representations include a useful human-readable message. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include a useful human-readable message.; Error representations include a useful human-readable message.', path: [ 'paths', '/test', diff --git a/test/oas3-error-response-identifier.spec.js b/test/oas3-error-response-identifier.spec.js index 0ac86b4..1b16257 100644 --- a/test/oas3-error-response-identifier.spec.js +++ b/test/oas3-error-response-identifier.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Error representations include an identifier to help with troubleshooting (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include an identifier to help with troubleshooting.; Error representations include an identifier to help with troubleshooting.', path: [ 'paths', '/test', @@ -60,7 +60,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Error representations include an identifier to help with troubleshooting (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Error representations include an identifier to help with troubleshooting.; Error representations include an identifier to help with troubleshooting.', path: [ 'paths', '/test', diff --git a/test/oas3-field-names-pas-camel-case.spec.js b/test/oas3-field-names-pas-camel-case.spec.js index bc064d1..a9c97bc 100644 --- a/test/oas3-field-names-pas-camel-case.spec.js +++ b/test/oas3-field-names-pas-camel-case.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'user_id (paths./test.post.parameters.0.name) field is not PasCamelCase (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation field names use PasCamelCase.; user_id (paths./test.post.parameters.0.name)', path: [ 'paths', '/test', @@ -59,7 +59,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'MYData (paths./test.post.requestBody.content.application/json.schema.properties.MYData) field is not PasCamelCase (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation field names use PasCamelCase.; MYData (paths./test.post.requestBody.content.application/json.schema.properties.MYData)', path: [ 'paths', '/test', @@ -86,7 +86,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'MYData (paths./test.post.responses.200.content.application/json.schema.items.properties.MYData) field is not PasCamelCase (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation field names use PasCamelCase.; MYData (paths./test.post.responses.200.content.application/json.schema.items.properties.MYData)', path: [ 'paths', '/test', @@ -123,7 +123,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'snake_case (paths./test.get.responses.200.content.application/json.schema.items.properties.snake_case) field is not PasCamelCase (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation field names use PasCamelCase.; snake_case (paths./test.get.responses.200.content.application/json.schema.items.properties.snake_case)', path: [ 'paths', '/test', diff --git a/test/oas3-get-collection-max-parameter-link-header-required-likely.spec.js b/test/oas3-get-collection-max-parameter-link-header-required-likely.spec.js index c0cddbd..afe9480 100644 --- a/test/oas3-get-collection-max-parameter-link-header-required-likely.spec.js +++ b/test/oas3-get-collection-max-parameter-link-header-required-likely.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -58,7 +58,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -87,7 +87,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -107,7 +107,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -142,7 +142,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -169,7 +169,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -198,7 +198,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test/{id}/children', @@ -218,7 +218,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test/{id}/children', diff --git a/test/oas3-get-collection-max-parameter-link-header-required-possible.spec.js b/test/oas3-get-collection-max-parameter-link-header-required-possible.spec.js index de648a9..f4b9731 100644 --- a/test/oas3-get-collection-max-parameter-link-header-required-possible.spec.js +++ b/test/oas3-get-collection-max-parameter-link-header-required-possible.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -57,7 +57,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test', @@ -77,7 +77,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -106,7 +106,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -126,7 +126,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test', @@ -146,7 +146,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -175,7 +175,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -195,7 +195,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test', @@ -215,7 +215,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -244,7 +244,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test', @@ -271,7 +271,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test', @@ -298,7 +298,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test', @@ -327,7 +327,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'When returning a paginated collection, include a "max" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "max" query parameter', path: [ 'paths', '/test/{id}/children', @@ -347,7 +347,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When supporting offset-based pagination, operations include a "offset" query parameter (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When supporting offset-based pagination, operations include a "offset" query parameter', path: [ 'paths', '/test/{id}/children', @@ -367,7 +367,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'When returning a paginated collection, include a "Link" header in the response (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Pagination is designed using a \'max\' query parameter and \'Link\' headers per RFC 5988.; When returning a paginated collection, include a "Link" header in the response', path: [ 'paths', '/test/{id}/children', diff --git a/test/oas3-get-collection-sort-parameter.spec.js b/test/oas3-get-collection-sort-parameter.spec.js index 5fea013..00fc6f2 100644 --- a/test/oas3-get-collection-sort-parameter.spec.js +++ b/test/oas3-get-collection-sort-parameter.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'It is recommended to add a "sort" query parameter to sort this collection (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Sorting collections is designed with a \'sort\' query parameter.; It is recommended to add a "sort" query parameter to sort this collection', path: [ 'paths', '/test', @@ -65,7 +65,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'It is recommended to add a "sort" query parameter to sort this collection (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Sorting collections is designed with a \'sort\' query parameter.; It is recommended to add a "sort" query parameter to sort this collection', path: [ 'paths', '/test', diff --git a/test/oas3-head-operations-no-body.spec.js b/test/oas3-head-operations-no-body.spec.js index 0d2fb70..5b28232 100644 --- a/test/oas3-head-operations-no-body.spec.js +++ b/test/oas3-head-operations-no-body.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'HEAD operations with a corresponding GET operation must return no body content (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HEAD operations with a corresponding GET operation must return no body content.; "content" property must be falsy', path: [ 'paths', '/test', diff --git a/test/oas3-https-only.spec.js b/test/oas3-https-only.spec.js index c426be1..15fa9ee 100644 --- a/test/oas3-https-only.spec.js +++ b/test/oas3-https-only.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'My API supports HTTPS only. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API supports HTTPS only.; "http://api.example.com/v1" must match the pattern "^https://"', path: [ 'servers', '0', diff --git a/test/oas3-jwt-format.spec.js b/test/oas3-jwt-format.spec.js index b01d257..16556c8 100644 --- a/test/oas3-jwt-format.spec.js +++ b/test/oas3-jwt-format.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'My API access tokens are passed via the HTTP \'Authorization\' header, with a \'Bearer\' prefix. Need to add "bearerFormat: jwt". (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API access tokens are passed via the HTTP \'Authorization\' header, with a \'Bearer\' prefix.; "Bearer.bearerFormat" property must be truthy', path: [ 'components', 'securitySchemes', diff --git a/test/oas3-no-boolean-string-enums.spec.js b/test/oas3-no-boolean-string-enums.spec.js index a12941c..e938e93 100644 --- a/test/oas3-no-boolean-string-enums.spec.js +++ b/test/oas3-no-boolean-string-enums.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -72,7 +72,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -107,7 +107,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -143,7 +143,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -182,7 +182,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', @@ -218,7 +218,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Representation fields use format-native true/false values for booleans (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Representation fields use format-native true/false values for booleans.; Given matches target enums.', path: [ 'paths', '/test', diff --git a/test/oas3-order-parameter-asc-desc.spec.js b/test/oas3-order-parameter-asc-desc.spec.js index 2939639..ba08c5c 100644 --- a/test/oas3-order-parameter-asc-desc.spec.js +++ b/test/oas3-order-parameter-asc-desc.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Ordering collections is designed with an \'order\' query parameter specifying \'asc\' or \'desc\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Ordering collections is designed with an \'order\' query parameter specifying \'asc\' or \'desc\'.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', @@ -68,7 +68,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Ordering collections is designed with an \'order\' query parameter specifying \'asc\' or \'desc\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Ordering collections is designed with an \'order\' query parameter specifying \'asc\' or \'desc\'.; Given does not match target enums.', path: [ 'paths', '/test', diff --git a/test/oas3-path-based-versioning-error.spec.js b/test/oas3-path-based-versioning-error.spec.js index f5bd520..625e806 100644 --- a/test/oas3-path-based-versioning-error.spec.js +++ b/test/oas3-path-based-versioning-error.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'API uses path-based versioning. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API uses path-based versioning.; API uses path-based versioning.', path: [], range: { start: { diff --git a/test/oas3-path-based-versioning-major-only.spec.js b/test/oas3-path-based-versioning-major-only.spec.js index 848e233..cd8b302 100644 --- a/test/oas3-path-based-versioning-major-only.spec.js +++ b/test/oas3-path-based-versioning-major-only.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'API shows only major version numbers on the path; not the revision numbers. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API shows only major version numbers on the path; not the revision numbers.; API shows only major version numbers on the path; not the revision numbers.', path: [], range: { start: { diff --git a/test/oas3-post-201-created.spec.js b/test/oas3-post-201-created.spec.js index 96dd8c8..f05a722 100644 --- a/test/oas3-post-201-created.spec.js +++ b/test/oas3-post-201-created.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'POST operations which create objects return 201 Created, with a full or reference-only representation. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations which create objects return 201 Created, with a full or reference-only representation.; "[201].content" property must be truthy', path: [ 'paths', '/test', @@ -59,7 +59,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'POST operations which create objects return 201 Created, with a full or reference-only representation. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations which create objects return 201 Created, with a full or reference-only representation.; "[201].content" property must be truthy', path: [ 'paths', '/other/test', diff --git a/test/oas3-request-header-accept-charset-default-required.spec.js b/test/oas3-request-header-accept-charset-default-required.spec.js index 05aed13..31bc0b0 100644 --- a/test/oas3-request-header-accept-charset-default-required.spec.js +++ b/test/oas3-request-header-accept-charset-default-required.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Charset must have a default defined (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "schema.default" property must be truthy', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-accept-charset-valid-default.spec.js b/test/oas3-request-header-accept-charset-valid-default.spec.js index 0b0daef..3e7887b 100644 --- a/test/oas3-request-header-accept-charset-valid-default.spec.js +++ b/test/oas3-request-header-accept-charset-valid-default.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Default for Accept-Charset must be UTF-8 (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "test" must match the pattern "^[Uu][Tt][Ff]-8$"', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-accept-charset-valid-enum.spec.js b/test/oas3-request-header-accept-charset-valid-enum.spec.js index 23736c1..bb41d4a 100644 --- a/test/oas3-request-header-accept-charset-valid-enum.spec.js +++ b/test/oas3-request-header-accept-charset-valid-enum.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Charset must allow UTF-8 and ISO-8859-1. (The following values are missing from the enum: ISO-8859-1.) (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; The following values are missing from the enum: ISO-8859-1.', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-accept-encoding-enum.spec.js b/test/oas3-request-header-accept-encoding-enum.spec.js index 061da3a..f56c3ca 100644 --- a/test/oas3-request-header-accept-encoding-enum.spec.js +++ b/test/oas3-request-header-accept-encoding-enum.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Encoding should have a list of accepted values (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "schema.enum" property must be truthy', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-accept-encoding-valid-enum.spec.js b/test/oas3-request-header-accept-encoding-valid-enum.spec.js index 28f15e9..830a705 100644 --- a/test/oas3-request-header-accept-encoding-valid-enum.spec.js +++ b/test/oas3-request-header-accept-encoding-valid-enum.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Encoding accepts a value that is not valid per RFC 7231. (The following values must be removed: notvalid.) (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer) Please see https://www.iana.org/assignments/http-parameters/http-parameters.xhtml', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; The following values must be removed: notvalid.', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-accept-language-enum.spec.js b/test/oas3-request-header-accept-language-enum.spec.js index 9e7daa0..a9a4815 100644 --- a/test/oas3-request-header-accept-language-enum.spec.js +++ b/test/oas3-request-header-accept-language-enum.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Accept-Language should have a list of accepted values (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "schema.enum" property must be truthy', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-date-correct-regex.spec.js b/test/oas3-request-header-date-correct-regex.spec.js index 0851e6e..203cae4 100644 --- a/test/oas3-request-header-date-correct-regex.spec.js +++ b/test/oas3-request-header-date-correct-regex.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Date header should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; The regex pattern used does not pass basic linting sample checks - should not have matched case Thu 8 Apr 2021 19:06:27 GMT (Comma required after Day of Week)', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-date-correct-type.spec.js b/test/oas3-request-header-date-correct-type.spec.js index 8f3fc41..674e037 100644 --- a/test/oas3-request-header-date-correct-type.spec.js +++ b/test/oas3-request-header-date-correct-type.spec.js @@ -39,7 +39,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Date header should be type \'string\' and should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "schema.pattern" property must be truthy', path: [ 'paths', '/test', @@ -62,7 +62,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Date header should be type \'string\' and should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', @@ -94,7 +94,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Date header should be type \'string\' and should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "schema.pattern" property must be truthy', path: [ 'paths', '/test', @@ -117,7 +117,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Date header should be type \'string\' and should not use the built-in OpenAPI format. Instead, \'pattern\' should be used to specify a custom format (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "format" property must be falsy', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-if-match-is-string.spec.js b/test/oas3-request-header-if-match-is-string.spec.js index b4cabcb..ece2fa3 100644 --- a/test/oas3-request-header-if-match-is-string.spec.js +++ b/test/oas3-request-header-if-match-is-string.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'If-Match must be a string (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-if-none-match-is-string.spec.js b/test/oas3-request-header-if-none-match-is-string.spec.js index 0400b9f..63c9d91 100644 --- a/test/oas3-request-header-if-none-match-is-string.spec.js +++ b/test/oas3-request-header-if-none-match-is-string.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'If-None-Match must be a string (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', diff --git a/test/oas3-request-header-if-range-is-string.spec.js b/test/oas3-request-header-if-range-is-string.spec.js index eb5a253..705435f 100644 --- a/test/oas3-request-header-if-range-is-string.spec.js +++ b/test/oas3-request-header-if-range-is-string.spec.js @@ -38,7 +38,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'If-Range must be a string (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'HTTP headers follow the syntax specified in the corresponding RFCs.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', diff --git a/test/oas3-tracking-id-header-string-requirement.spec.js b/test/oas3-tracking-id-header-string-requirement.spec.js index 18761e5..954e291 100644 --- a/test/oas3-tracking-id-header-string-requirement.spec.js +++ b/test/oas3-tracking-id-header-string-requirement.spec.js @@ -37,7 +37,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: '\'TrackingID\' header should be a string in order to accommodate a UUID (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: '\'TrackingID\' header should be a string in order to accommodate a UUID.; "integer" must match the pattern "^string$"', path: [ 'paths', '/test', diff --git a/test/patch-200-204-success.spec.js b/test/patch-200-204-success.spec.js index 72d6136..6753091 100644 --- a/test/patch-200-204-success.spec.js +++ b/test/patch-200-204-success.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.; PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', @@ -63,7 +63,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.; PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', @@ -90,7 +90,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.; PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', @@ -131,7 +131,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.; PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', @@ -158,7 +158,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.; PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', @@ -186,7 +186,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.; PATCH operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', diff --git a/test/post-header-location.spec.js b/test/post-header-location.spec.js index b418e41..e24dddd 100644 --- a/test/post-header-location.spec.js +++ b/test/post-header-location.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'POST operations that create resources should include a Location header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations that create resources should include a Location header.; "headers.Location" property must be truthy', path: [ 'paths', '/test', @@ -59,7 +59,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'POST operations that create resources should include a Location header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations that create resources should include a Location header.; "headers.Location" property must be truthy', path: [ 'paths', '/anotherTest', @@ -95,7 +95,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'POST operations that create resources should include a Location header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations that create resources should include a Location header.; "headers.Location" property must be truthy', path: [ 'paths', '/test', @@ -118,7 +118,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'POST operations that create resources should include a Location header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations that create resources should include a Location header.; "headers.Location" property must be truthy', path: [ 'paths', '/anotherTest', diff --git a/test/post-header.spec.js b/test/post-header.spec.js index 06b6ba3..22307cf 100644 --- a/test/post-header.spec.js +++ b/test/post-header.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'POST operations that create resources should include a Location header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations that create resources should include a Location header.; "[201].headers" property must be truthy', path: [ 'paths', '/test', @@ -71,7 +71,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'POST operations that create resources should include a Location header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'POST operations that create resources should include a Location header.; "[201].headers" property must be truthy', path: [ 'paths', '/test', diff --git a/test/put-200-204-success.spec.js b/test/put-200-204-success.spec.js index fbe2755..3de6e7e 100644 --- a/test/put-200-204-success.spec.js +++ b/test/put-200-204-success.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PUT operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PUT operations return either \'200 OK\' with full representation or \'204 No Content\'.; PUT operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', @@ -63,7 +63,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PUT operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PUT operations return either \'200 OK\' with full representation or \'204 No Content\'.; PUT operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', @@ -90,7 +90,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PUT operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PUT operations return either \'200 OK\' with full representation or \'204 No Content\'.; PUT operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', @@ -117,7 +117,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'PUT operations return either \'200 OK\' with full representation or \'204 No Content\' (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'PUT operations return either \'200 OK\' with full representation or \'204 No Content\'.; PUT operations return either \'200 OK\' with full representation or \'204 No Content\'.', path: [ 'paths', '/test', diff --git a/test/resource-name-too-long.spec.js b/test/resource-name-too-long.spec.js index 30838fe..c3e34f5 100644 --- a/test/resource-name-too-long.spec.js +++ b/test/resource-name-too-long.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: '"veryLongEndpoint" is longer than allowed maximum of 15 (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Resource names are consistent and succinct; do not use abbreviations.; "veryLongEndpoint" is longer than allowed maximum of 15', path: [ 'paths', '/veryLongEndpoint', @@ -55,7 +55,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: '"someLongEndpoint" is longer than allowed maximum of 15 (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Resource names are consistent and succinct; do not use abbreviations.; "someLongEndpoint" is longer than allowed maximum of 15', path: [ 'paths', '/veryLongEndpoint/someLongEndpoint', @@ -74,7 +74,7 @@ describe(ruleName, () => { }, { code: 'resource-name-too-long', - message: '"veryLongEndpoint" is longer than allowed maximum of 15 (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Resource names are consistent and succinct; do not use abbreviations.; "veryLongEndpoint" is longer than allowed maximum of 15', path: [ 'paths', '/other/veryLongEndpoint', @@ -93,7 +93,7 @@ describe(ruleName, () => { }, { code: 'resource-name-too-long', - message: '"veryVeryVeryLongEndpoint" is longer than allowed maximum of 15 (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Resource names are consistent and succinct; do not use abbreviations.; "veryVeryVeryLongEndpoint" is longer than allowed maximum of 15', path: [ 'paths', '/veryVeryVeryLongEndpoint', diff --git a/test/resource-pas-camel-case-error.spec.js b/test/resource-pas-camel-case-error.spec.js index f539c73..47929bf 100644 --- a/test/resource-pas-camel-case-error.spec.js +++ b/test/resource-pas-camel-case-error.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'snake_case must be PasCamelCase: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Resource names use PasCamelCase.; snake_case must be PasCamelCase', path: [ 'paths', '/snake_case/snake_case', @@ -55,7 +55,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'ALLCAPS must be PasCamelCase: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Resource names use PasCamelCase.; ALLCAPS must be PasCamelCase', path: [ 'paths', '/ALLCAPS/ALLCAPS', diff --git a/test/resource-pas-camel-case-info.spec.js b/test/resource-pas-camel-case-info.spec.js index 00eee8d..3b8e715 100644 --- a/test/resource-pas-camel-case-info.spec.js +++ b/test/resource-pas-camel-case-info.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'snake_case must be PasCamelCase: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Resource names use PasCamelCase.; snake_case must be PasCamelCase', path: [ 'paths', '/snake_case/snake_case', @@ -55,7 +55,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'ALLCAPS must be PasCamelCase: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Resource names use PasCamelCase.; ALLCAPS must be PasCamelCase', path: [ 'paths', '/ALLCAPS/ALLCAPS', diff --git a/test/respond-with-recommended-delete-codes.spec.js b/test/respond-with-recommended-delete-codes.spec.js index 0fd8d34..63e07f0 100644 --- a/test/respond-with-recommended-delete-codes.spec.js +++ b/test/respond-with-recommended-delete-codes.spec.js @@ -42,7 +42,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: '201 is not an acceptable response code for DELETE. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges; 201 is not an acceptable response code for DELETE. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/myResource', @@ -64,7 +64,7 @@ describe(ruleName, () => { }, { code: 'respond-with-recommended-delete-codes', - message: '202 is not an acceptable response code for DELETE. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges; 202 is not an acceptable response code for DELETE. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/myResource', diff --git a/test/respond-with-recommended-get-codes.spec.js b/test/respond-with-recommended-get-codes.spec.js index 0508e0c..5273948 100644 --- a/test/respond-with-recommended-get-codes.spec.js +++ b/test/respond-with-recommended-get-codes.spec.js @@ -42,7 +42,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: '201 is not an acceptable response code for GET. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges; 201 is not an acceptable response code for GET. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/myResource', diff --git a/test/respond-with-recommended-patch-codes.spec.js b/test/respond-with-recommended-patch-codes.spec.js index f59ad0c..f1996be 100644 --- a/test/respond-with-recommended-patch-codes.spec.js +++ b/test/respond-with-recommended-patch-codes.spec.js @@ -42,7 +42,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: '201 is not an acceptable response code for PATCH. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges; 201 is not an acceptable response code for PATCH. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/myResource', @@ -64,7 +64,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: '202 is not an acceptable response code for PATCH. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges; 202 is not an acceptable response code for PATCH. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/myResource', @@ -86,7 +86,7 @@ describe(ruleName, () => { }, { code: 'respond-with-recommended-patch-codes', - message: '279 is not an acceptable response code for PATCH. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges; 279 is not an acceptable response code for PATCH. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/myResource', diff --git a/test/respond-with-recommended-post-codes.spec.js b/test/respond-with-recommended-post-codes.spec.js index fe59059..b9d9f9e 100644 --- a/test/respond-with-recommended-post-codes.spec.js +++ b/test/respond-with-recommended-post-codes.spec.js @@ -42,7 +42,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: '204 is not an acceptable response code for POST. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges; 204 is not an acceptable response code for POST. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/myResource', diff --git a/test/respond-with-recommended-put-codes.spec.js b/test/respond-with-recommended-put-codes.spec.js index 8792bf5..f5c72cc 100644 --- a/test/respond-with-recommended-put-codes.spec.js +++ b/test/respond-with-recommended-put-codes.spec.js @@ -42,7 +42,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: '201 is not an acceptable response code for PUT. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges; 201 is not an acceptable response code for PUT. My API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/myResource', diff --git a/test/sort-recommend-order.spec.js b/test/sort-recommend-order.spec.js index 6b020fc..8841300 100644 --- a/test/sort-recommend-order.spec.js +++ b/test/sort-recommend-order.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Consider using \'order\' with \'sort\' in this operation (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'Consider using \'order\' with \'sort\' in this operation.; Consider changing the "sort" param to an "order" param.', path: [ 'paths', '/test', diff --git a/test/status-code-401.spec.js b/test/status-code-401.spec.js index dd95992..9575712 100644 --- a/test/status-code-401.spec.js +++ b/test/status-code-401.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: 'status-code-401', - message: 'A 401 status code is returned when authentication fails. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'A 401 status code is returned when authentication fails.; An expected pathway is missing. Prerequisite: "undefined", search: "401"', path: [ 'paths', '/myResource', diff --git a/test/status-code-403.spec.js b/test/status-code-403.spec.js index 42c2213..a7da297 100644 --- a/test/status-code-403.spec.js +++ b/test/status-code-403.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: 'status-code-403', - message: 'A 403 status code is returned if a consumer is not authorized to access an operation. (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'A 403 status code is returned if a consumer is not authorized to access an operation.; An expected pathway is missing. Prerequisite: "undefined", search: "403"', path: [ 'paths', '/myResource', diff --git a/test/status-codes-in-2xx-3xx-4xx-5xx.spec.js b/test/status-codes-in-2xx-3xx-4xx-5xx.spec.js index f41f6b5..c7e2164 100644 --- a/test/status-codes-in-2xx-3xx-4xx-5xx.spec.js +++ b/test/status-codes-in-2xx-3xx-4xx-5xx.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges.; Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/test', @@ -57,7 +57,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges.; Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/test', @@ -78,7 +78,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges.; Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/test', @@ -99,7 +99,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges.; Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/test', @@ -120,7 +120,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges.; Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/test', @@ -141,7 +141,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges.; Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/test', @@ -162,7 +162,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges.; Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/test', @@ -183,7 +183,7 @@ describe(ruleName, () => { }, { code: ruleName, - message: 'Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges.; Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/test', @@ -211,7 +211,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges: (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'API responds with recommended HTTP status codes in the 2xx/3xx/4xx/5xx ranges.; Status Code(s) [110] must be in the 2xx/3xx/4xx/5xx ranges', path: [ 'paths', '/test', diff --git a/test/tracking-id-header-requirement.spec.js b/test/tracking-id-header-requirement.spec.js index 85c0213..b0babf6 100644 --- a/test/tracking-id-header-requirement.spec.js +++ b/test/tracking-id-header-requirement.spec.js @@ -36,7 +36,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'All responses must include a \'TrackingID\' header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses must include a \'TrackingID\' header.; An expected pathway is missing. Prerequisite: "headers", search: "TrackingID"', path: [ 'paths', '/test', @@ -65,7 +65,7 @@ describe(ruleName, () => { expect(res).toEqual([ { code: ruleName, - message: 'All responses must include a \'TrackingID\' header (https://developer.cisco.com/docs/api-insights/#!api-guidelines-analyzer)', + message: 'All responses must include a \'TrackingID\' header.; An expected pathway is missing. Prerequisite: "headers", search: "TrackingID"', path: [ 'paths', '/test',