From 51de2dcc096a3acf5ce58d76b50180ba10359d59 Mon Sep 17 00:00:00 2001 From: wtrocki Date: Fri, 14 Mar 2025 17:42:19 +0100 Subject: [PATCH 1/3] CLOUDP-305862: replace urls --- tools/spectral/ipa/rulesets/IPA-005.yaml | 2 +- tools/spectral/ipa/rulesets/IPA-102.yaml | 10 +++++----- tools/spectral/ipa/rulesets/IPA-104.yaml | 24 ++++++++++++------------ tools/spectral/ipa/rulesets/IPA-105.yaml | 14 +++++++------- tools/spectral/ipa/rulesets/IPA-106.yaml | 12 ++++++------ tools/spectral/ipa/rulesets/IPA-107.yaml | 4 ++-- tools/spectral/ipa/rulesets/IPA-108.yaml | 16 ++++++++-------- tools/spectral/ipa/rulesets/IPA-109.yaml | 8 ++++---- tools/spectral/ipa/rulesets/IPA-113.yaml | 4 ++-- tools/spectral/ipa/rulesets/IPA-123.yaml | 4 ++-- 10 files changed, 49 insertions(+), 49 deletions(-) diff --git a/tools/spectral/ipa/rulesets/IPA-005.yaml b/tools/spectral/ipa/rulesets/IPA-005.yaml index 92d0cc8983..2e74c5f7a1 100644 --- a/tools/spectral/ipa/rulesets/IPA-005.yaml +++ b/tools/spectral/ipa/rulesets/IPA-005.yaml @@ -14,7 +14,7 @@ rules: - Exception rule names must start with 'xgen-IPA-' prefix - Each exception must include a non-empty reason as a string - This rule itself does not allow exceptions - message: '{{error}} http://go/ipa-spectral#IPA-102' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-005-exception-extension-format' severity: error given: '$..x-xgen-IPA-exception' then: diff --git a/tools/spectral/ipa/rulesets/IPA-102.yaml b/tools/spectral/ipa/rulesets/IPA-102.yaml index cfc5c5a1b8..b5b860e3cb 100644 --- a/tools/spectral/ipa/rulesets/IPA-102.yaml +++ b/tools/spectral/ipa/rulesets/IPA-102.yaml @@ -17,7 +17,7 @@ rules: - Paths with `x-xgen-IPA-exception` for this rule are excluded from validation - Double slashes (//) are not allowed in paths - message: '{{error}} http://go/ipa-spectral#IPA-102' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-102-collection-identifier-camelCase' severity: warn given: $.paths then: @@ -28,8 +28,8 @@ rules: ignoredValues: ['v2', 'v1'] xgen-IPA-102-path-alternate-resource-name-path-param: - description: 'Paths should alternate between resource names and path params. http://go/ipa/102' - message: '{{error}} http://go/ipa/102' + description: 'Paths should alternate between resource names and path params.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-102-path-alternate-resource-name-path-param' severity: error given: '$.paths' then: @@ -37,8 +37,8 @@ rules: function: 'eachPathAlternatesBetweenResourceNameAndPathParam' xgen-IPA-102-collection-identifier-pattern: - description: Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers. http://go/ipa/102 - message: '{{error}} http://go/ipa/102' + description: Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers. + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-102-collection-identifier-pattern' severity: warn given: $.paths then: diff --git a/tools/spectral/ipa/rulesets/IPA-104.yaml b/tools/spectral/ipa/rulesets/IPA-104.yaml index 1905849d55..1a24ec9001 100644 --- a/tools/spectral/ipa/rulesets/IPA-104.yaml +++ b/tools/spectral/ipa/rulesets/IPA-104.yaml @@ -11,47 +11,47 @@ functions: rules: xgen-IPA-104-resource-has-GET: - description: 'APIs must provide a Get method for resources. http://go/ipa/104' - message: '{{error}} http://go/ipa/104' + description: 'APIs must provide a Get method for resources.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-resource-has-GET' severity: warn given: '$.paths' then: field: '@key' function: 'eachResourceHasGetMethod' xgen-IPA-104-get-method-returns-single-resource: - description: 'The purpose of the Get method is to return data from a single resource. http://go/ipa/104' - message: '{{error}} http://go/ipa/104' + description: 'The purpose of the Get method is to return data from a single resource.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-returns-single-resource' severity: warn given: '$.paths[*].get.responses[*].content' then: field: '@key' function: 'getMethodReturnsSingleResource' xgen-IPA-104-get-method-response-code-is-200: - description: 'The Get method must return a 200 OK response. http://go/ipa/104' - message: '{{error}} http://go/ipa/104' + description: 'The Get method must return a 200 OK response.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-response-code-is-200' severity: warn given: '$.paths[*].get' then: function: 'getResponseCodeShouldBe200OK' xgen-IPA-104-get-method-returns-response-suffixed-object: - description: 'The Get method of a resource should return a "Response" suffixed object. http://go/ipa/104' - message: '{{error}} http://go/ipa/104' + description: 'The Get method of a resource should return a "Response" suffixed object.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-returns-response-suffixed-object' severity: warn given: '$.paths[*].get.responses[*].content' then: field: '@key' function: 'getMethodReturnsResponseSuffixedObject' xgen-IPA-104-get-method-response-has-no-input-fields: - description: 'The Get method response object must not include writeOnly properties (fields that should be used only on creation or update, ie output fields). http://go/ipa/104' - message: '{{error}} http://go/ipa/104' + description: 'The Get method response object must not include writeOnly properties (fields that should be used only on creation or update, ie output fields).' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-response-has-no-input-fields' severity: warn given: '$.paths[*].get.responses[*].content' then: field: '@key' function: 'getMethodResponseHasNoInputFields' xgen-IPA-104-get-method-no-request-body: - description: 'The Get method request must not include a body. http://go/ipa/104' - message: '{{error}} http://go/ipa/104' + description: 'The Get method request must not include a body.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-no-request-body' severity: warn given: '$.paths[*].get' then: diff --git a/tools/spectral/ipa/rulesets/IPA-105.yaml b/tools/spectral/ipa/rulesets/IPA-105.yaml index 74b7f417a2..3cf2ce6ca4 100644 --- a/tools/spectral/ipa/rulesets/IPA-105.yaml +++ b/tools/spectral/ipa/rulesets/IPA-105.yaml @@ -9,22 +9,22 @@ functions: rules: xgen-IPA-105-list-method-response-code-is-200: - description: 'The List method must return a 200 OK response. http://go/ipa/105' - message: '{{error}} http://go/ipa/105' + description: 'The List method must return a 200 OK response.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-105-list-method-response-code-is-200' severity: warn given: '$.paths[*].get' then: function: 'listResponseCodeShouldBe200OK' xgen-IPA-105-list-method-no-request-body: - description: 'The List method request must not include a body. http://go/ipa/105' - message: '{{error}} http://go/ipa/105' + description: 'The List method request must not include a body.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-105-list-method-no-request-body' severity: warn given: '$.paths[*].get' then: function: 'listMethodHasNoRequestBody' xgen-IPA-105-resource-has-list: - description: 'APIs must provide a List method for resources. http://go/ipa/105' - message: '{{error}} http://go/ipa/105' + description: 'APIs must provide a List method for resources.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-105-resource-has-list' severity: warn given: '$.paths' then: @@ -44,7 +44,7 @@ rules: - A response is considered paginated if it contains an array property named `results` - Validation ignores resources without a Get method - Paths with `x-xgen-IPA-exception` for this rule are excluded from validation - message: '{{error}} http://go/ipa-spectral#IPA-105' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-105-list-method-response-is-get-method-response' severity: warn given: '$.paths[*].get.responses[*].content' then: diff --git a/tools/spectral/ipa/rulesets/IPA-106.yaml b/tools/spectral/ipa/rulesets/IPA-106.yaml index b9090c2d2c..8dae36f453 100644 --- a/tools/spectral/ipa/rulesets/IPA-106.yaml +++ b/tools/spectral/ipa/rulesets/IPA-106.yaml @@ -1,5 +1,5 @@ # IPA-106: Create -# http://go/ipa-spectral#IPA-106 +# https://mdb.link/mongodb-atlas-openapi-validation# functions: - createMethodRequestBodyIsRequestSuffixedObject @@ -16,7 +16,7 @@ rules: ##### Implementation details Validation checks the POST method for resource collection paths. - message: '{{error}} http://go/ipa-spectral#IPA-106' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-request-body-is-request-suffixed-object' severity: warn given: '$.paths[*].post.requestBody.content' then: @@ -29,7 +29,7 @@ rules: ##### Implementation details Validation checks the POST method for resource collection paths. - message: '{{error}} http://go/ipa-spectral#IPA-106' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-should-not-have-query-parameters' severity: warn given: '$.paths[*].post' then: @@ -45,7 +45,7 @@ rules: Validation checks the POST method for resource collection paths. - `readOnly:true` properties of Get method response will be ignored. - `writeOnly:true` properties of Create method request will be ignored. - message: '{{error}} http://go/ipa-spectral#IPA-106' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-request-body-is-get-method-response:' severity: warn given: '$.paths[*].post.requestBody.content' then: @@ -58,7 +58,7 @@ rules: ##### Implementation details Validation checks the POST method for resource collection paths. - message: '{{error}} http://go/ipa-spectral#IPA-106' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-request-has-no-readonly-fields' severity: warn given: '$.paths[*].post.requestBody.content' then: @@ -71,7 +71,7 @@ rules: ##### Implementation details Validation checks the POST method for resource collection paths. - message: '{{error}} http://go/ipa-spectral#IPA-106' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-response-code-is-201' severity: warn given: '$.paths[*].post' then: diff --git a/tools/spectral/ipa/rulesets/IPA-107.yaml b/tools/spectral/ipa/rulesets/IPA-107.yaml index 3d14c1b57c..3cc42b093b 100644 --- a/tools/spectral/ipa/rulesets/IPA-107.yaml +++ b/tools/spectral/ipa/rulesets/IPA-107.yaml @@ -15,7 +15,7 @@ rules: - Query parameters `envelope` and `pretty` are exempt from this rule - Operation objects with `x-xgen-IPA-exception` for this rule are excluded from validation - message: '{{error}} http://go/ipa-spectral#IPA-107' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-107-put-must-not-have-query-params' severity: warn given: '$.paths[*].put' then: @@ -32,7 +32,7 @@ rules: - Query parameters `envelope` and `pretty` are exempt from this rule - Operation objects with `x-xgen-IPA-exception` for this rule are excluded from validation - message: '{{error}} http://go/ipa-spectral#IPA-107' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-107-patch-must-not-have-query-params' severity: warn given: '$.paths[*].patch' then: diff --git a/tools/spectral/ipa/rulesets/IPA-108.yaml b/tools/spectral/ipa/rulesets/IPA-108.yaml index 989ef51b14..9a20af4f91 100644 --- a/tools/spectral/ipa/rulesets/IPA-108.yaml +++ b/tools/spectral/ipa/rulesets/IPA-108.yaml @@ -3,32 +3,32 @@ rules: xgen-IPA-108-delete-response-should-be-empty: - description: Delete method response should not have schema reference to object. http://go/ipa/108 - message: '{{error}} http://go/ipa/108' + description: Delete method response should not have schema reference to object. + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-108-delete-response-should-be-empty' severity: warn given: $.paths[*].delete.responses[204] then: function: deleteMethodResponseShouldNotHaveSchema xgen-IPA-108-delete-method-return-204-response: - description: DELETE method must return 204 No Content. http://go/ipa/108 - message: '{{error}} http://go/ipa/108' + description: DELETE method must return 204 No Content. + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-108-delete-method-return-204-response' severity: warn given: $.paths[*].delete then: function: deleteMethod204Response xgen-IPA-108-delete-include-404-response: - description: DELETE method must include 404 response and return it when resource not found. http://go/ipa/108 - message: '{{error}} http://go/ipa/108' + description: DELETE method must include 404 response and return it when resource not found. + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-108-delete-include-404-response' severity: warn given: $.paths[*].delete then: function: deleteMethod404Response xgen-IPA-108-delete-request-no-body: - description: DELETE method must not have request body. http://go/ipa/108 - message: '{{error}} http://go/ipa/108' + description: DELETE method must not have request body. + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-108-delete-request-no-body' severity: warn given: $.paths[*].delete then: diff --git a/tools/spectral/ipa/rulesets/IPA-109.yaml b/tools/spectral/ipa/rulesets/IPA-109.yaml index ca2757f3da..0aaafb77cf 100644 --- a/tools/spectral/ipa/rulesets/IPA-109.yaml +++ b/tools/spectral/ipa/rulesets/IPA-109.yaml @@ -7,16 +7,16 @@ functions: rules: xgen-IPA-109-custom-method-must-be-GET-or-POST: - description: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109' - message: '{{error}} http://go/ipa/109' + description: 'The HTTP method for custom methods must be GET or POST.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-109-custom-method-must-be-GET-or-POST' severity: error given: '$.paths[*]' then: function: 'eachCustomMethodMustBeGetOrPost' xgen-IPA-109-custom-method-must-use-camel-case: - description: 'The custom method must use camelCase format. http://go/ipa/109' - message: '{{error}} http://go/ipa/109' + description: 'The custom method must use camelCase format.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-109-custom-method-must-use-camel-case' severity: error given: '$.paths[*]' then: diff --git a/tools/spectral/ipa/rulesets/IPA-113.yaml b/tools/spectral/ipa/rulesets/IPA-113.yaml index fe6de74bc9..3078d4d511 100644 --- a/tools/spectral/ipa/rulesets/IPA-113.yaml +++ b/tools/spectral/ipa/rulesets/IPA-113.yaml @@ -6,8 +6,8 @@ functions: rules: xgen-IPA-113-singleton-must-not-have-id: - description: 'Singleton resources must not have a user-provided or system-generated ID. http://go/ipa/113' - message: '{{error}} http://go/ipa/113' + description: 'Singleton resources must not have a user-provided or system-generated ID.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-113-singleton-must-not-have-id' severity: warn given: '$.paths[*]' then: diff --git a/tools/spectral/ipa/rulesets/IPA-123.yaml b/tools/spectral/ipa/rulesets/IPA-123.yaml index ce29fe2928..3464a51cbe 100644 --- a/tools/spectral/ipa/rulesets/IPA-123.yaml +++ b/tools/spectral/ipa/rulesets/IPA-123.yaml @@ -6,8 +6,8 @@ functions: rules: xgen-IPA-123-enum-values-must-be-upper-snake-case: - description: 'Enum values must be UPPER_SNAKE_CASE. http://go/ipa/123' - message: '{{error}} http://go/ipa/123' + description: 'Enum values must be UPPER_SNAKE_CASE.' + message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-123-enum-values-must-be-upper-snake-case' severity: error given: '$..enum' then: From a72f0cc61f8f1201bea857fe1d0ea55c6db58512 Mon Sep 17 00:00:00 2001 From: wtrocki Date: Fri, 14 Mar 2025 18:17:12 +0100 Subject: [PATCH 2/3] fix: tests --- .../IPA105exceptionExtensionFormat.test.js | 8 ++--- .../ipa/__tests__/__helpers__/testRule.js | 2 +- .../collectionIdentifierCamelCase.test.js | 30 +++++++++---------- .../collectionIdentifierPattern.test.js | 6 ++-- ...eateMethodRequestBodyIsGetResponse.test.js | 20 ++++++------- ...RequestBodyIsRequestSuffixedObject.test.js | 10 +++---- ...teMethodRequestHasNoReadonlyFields.test.js | 8 ++--- ...eateMethodResponseCodeIs201Created.test.js | 6 ++-- ...MethodShouldNotHaveQueryParameters.test.js | 6 ++-- .../__tests__/deleteMethod204Response.test.js | 6 ++-- .../__tests__/deleteMethod404Response.test.js | 6 ++-- .../deleteMethodNoRequestBody.test.js | 2 +- ...eMethodResponseShouldNotHaveSchema.test.js | 2 +- .../eachCustomMethodMustBeGetOrPost.test.js | 16 +++++----- .../eachCustomMethodMustUseCamelCase.test.js | 12 ++++---- .../eachEnumValueMustBeUpperSnakeCase.test.js | 16 +++++----- ...tesBetweenResourceNameAndPathParam.test.js | 24 +++++++-------- .../eachResourceHasGetMethod.test.js | 10 +++---- .../eachResourceHasListMethod.test.js | 4 +-- .../getMethodHasNoRequestBody.test.js | 4 +-- .../getMethodResponseHasNoInputFields.test.js | 4 +-- ...ethodReturnsResponseSuffixedObject.test.js | 8 ++--- .../getMethodReturnsSingleResource.test.js | 8 ++--- .../getResponseCodeShouldBe200OK.test.js | 8 ++--- .../listMethodHasNoRequestBody.test.js | 2 +- ...tMethodResponseIsGetMethodResponse.test.js | 10 +++---- .../listResponseCodeShouldBe200OK.test.js | 8 ++--- .../ipa/__tests__/singletonHasNoId.test.js | 6 ++-- ...updateMethodMustNotHaveQueryParams.test.js | 16 ++++------ 29 files changed, 132 insertions(+), 136 deletions(-) diff --git a/tools/spectral/ipa/__tests__/IPA105exceptionExtensionFormat.test.js b/tools/spectral/ipa/__tests__/IPA105exceptionExtensionFormat.test.js index 5264f037bc..1a72f31b08 100644 --- a/tools/spectral/ipa/__tests__/IPA105exceptionExtensionFormat.test.js +++ b/tools/spectral/ipa/__tests__/IPA105exceptionExtensionFormat.test.js @@ -51,25 +51,25 @@ testRule('xgen-IPA-005-exception-extension-format', [ errors: [ { code: 'xgen-IPA-005-exception-extension-format', - message: 'IPA exceptions must have a valid rule name and a reason. http://go/ipa-spectral#IPA-102', + message: 'IPA exceptions must have a valid rule name and a reason.', path: ['paths', '/path1', 'x-xgen-IPA-exception'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-005-exception-extension-format', - message: 'IPA exceptions must have a valid rule name and a reason. http://go/ipa-spectral#IPA-102', + message: 'IPA exceptions must have a valid rule name and a reason.', path: ['paths', '/path2', 'x-xgen-IPA-exception', 'xgen-IPA-100-rule-name'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-005-exception-extension-format', - message: 'IPA exceptions must have a valid rule name and a reason. http://go/ipa-spectral#IPA-102', + message: 'IPA exceptions must have a valid rule name and a reason.', path: ['paths', '/path3', 'x-xgen-IPA-exception', 'invalid-rule-name'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-005-exception-extension-format', - message: 'IPA exceptions must have a valid rule name and a reason. http://go/ipa-spectral#IPA-102', + message: 'IPA exceptions must have a valid rule name and a reason.', path: ['paths', '/path4', 'x-xgen-IPA-exception', 'xgen-IPA-100-rule-name'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/__helpers__/testRule.js b/tools/spectral/ipa/__tests__/__helpers__/testRule.js index 622a15b9db..824cb2687c 100644 --- a/tools/spectral/ipa/__tests__/__helpers__/testRule.js +++ b/tools/spectral/ipa/__tests__/__helpers__/testRule.js @@ -17,7 +17,7 @@ export default (ruleName, tests) => { errors.forEach((error, index) => { expect(error.code).toEqual(testCase.errors[index].code); - expect(error.message).toEqual(testCase.errors[index].message); + expect(error.message).toMatch(testCase.errors[index].message); expect(error.path).toEqual(testCase.errors[index].path); }); }); diff --git a/tools/spectral/ipa/__tests__/collectionIdentifierCamelCase.test.js b/tools/spectral/ipa/__tests__/collectionIdentifierCamelCase.test.js index 5dd568047d..a69dca5302 100644 --- a/tools/spectral/ipa/__tests__/collectionIdentifierCamelCase.test.js +++ b/tools/spectral/ipa/__tests__/collectionIdentifierCamelCase.test.js @@ -45,7 +45,7 @@ testRule('xgen-IPA-102-collection-identifier-camelCase', [ { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'Resources' in path '/Resources' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'Resources' in path '/Resources' is not in camelCase.", path: ['paths', '/Resources'], severity: DiagnosticSeverity.Warning, }, @@ -62,7 +62,7 @@ testRule('xgen-IPA-102-collection-identifier-camelCase', [ { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'resource_groups' in path '/resource_groups' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'resource_groups' in path '/resource_groups' is not in camelCase.", path: ['paths', '/resource_groups'], severity: DiagnosticSeverity.Warning, }, @@ -79,7 +79,7 @@ testRule('xgen-IPA-102-collection-identifier-camelCase', [ { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'resource-groups' in path '/resource-groups' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'resource-groups' in path '/resource-groups' is not in camelCase.", path: ['paths', '/resource-groups'], severity: DiagnosticSeverity.Warning, }, @@ -96,7 +96,7 @@ testRule('xgen-IPA-102-collection-identifier-camelCase', [ { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'Resources' in path '/Resources:createResource' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'Resources' in path '/Resources:createResource' is not in camelCase.", path: ['paths', '/Resources:createResource'], severity: DiagnosticSeverity.Warning, }, @@ -113,7 +113,7 @@ testRule('xgen-IPA-102-collection-identifier-camelCase', [ { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'resourcesAPI' in path '/resourcesAPI' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'resourcesAPI' in path '/resourcesAPI' is not in camelCase.", path: ['paths', '/resourcesAPI'], severity: DiagnosticSeverity.Warning, }, @@ -145,21 +145,21 @@ testRule('xgen-IPA-102-collection-identifier-camelCase', [ { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path '/api//users' contains double slashes (//) which is not allowed. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path '/api//users' contains double slashes (//) which is not allowed.", path: ['paths', '/api//users'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path '/resources///{resourceId}' contains double slashes (//) which is not allowed. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path '/resources///{resourceId}' contains double slashes (//) which is not allowed.", path: ['paths', '/resources///{resourceId}'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path '//doubleSlashAtStart' contains double slashes (//) which is not allowed. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path '//doubleSlashAtStart' contains double slashes (//) which is not allowed.", path: ['paths', '//doubleSlashAtStart'], severity: DiagnosticSeverity.Warning, }, @@ -186,21 +186,21 @@ testRule('xgen-IPA-102-collection-identifier-camelCase', [ { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'API' in path '/API/Resource_groups/{userId}/User-profiles' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'API' in path '/API/Resource_groups/{userId}/User-profiles' is not in camelCase.", path: ['paths', '/API/Resource_groups/{userId}/User-profiles'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'Resource_groups' in path '/API/Resource_groups/{userId}/User-profiles' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'Resource_groups' in path '/API/Resource_groups/{userId}/User-profiles' is not in camelCase.", path: ['paths', '/API/Resource_groups/{userId}/User-profiles'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'User-profiles' in path '/API/Resource_groups/{userId}/User-profiles' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'User-profiles' in path '/API/Resource_groups/{userId}/User-profiles' is not in camelCase.", path: ['paths', '/API/Resource_groups/{userId}/User-profiles'], severity: DiagnosticSeverity.Warning, }, @@ -217,14 +217,14 @@ testRule('xgen-IPA-102-collection-identifier-camelCase', [ { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'Valid' in path '/api/Valid/Invalid_resource/{id}:validCustomMethod' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'Valid' in path '/api/Valid/Invalid_resource/{id}:validCustomMethod' is not in camelCase.", path: ['paths', '/api/Valid/Invalid_resource/{id}:validCustomMethod'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'Invalid_resource' in path '/api/Valid/Invalid_resource/{id}:validCustomMethod' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'Invalid_resource' in path '/api/Valid/Invalid_resource/{id}:validCustomMethod' is not in camelCase.", path: ['paths', '/api/Valid/Invalid_resource/{id}:validCustomMethod'], severity: DiagnosticSeverity.Warning, }, @@ -241,14 +241,14 @@ testRule('xgen-IPA-102-collection-identifier-camelCase', [ { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path '/api//Invalid_segment//resources' contains double slashes (//) which is not allowed. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path '/api//Invalid_segment//resources' contains double slashes (//) which is not allowed.", path: ['paths', '/api//Invalid_segment//resources'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-collection-identifier-camelCase', message: - "Collection identifiers must be in camelCase. Path segment 'Invalid_segment' in path '/api//Invalid_segment//resources' is not in camelCase. http://go/ipa-spectral#IPA-102", + "Collection identifiers must be in camelCase. Path segment 'Invalid_segment' in path '/api//Invalid_segment//resources' is not in camelCase.", path: ['paths', '/api//Invalid_segment//resources'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/collectionIdentifierPattern.test.js b/tools/spectral/ipa/__tests__/collectionIdentifierPattern.test.js index 987a0a1792..5f9be34033 100644 --- a/tools/spectral/ipa/__tests__/collectionIdentifierPattern.test.js +++ b/tools/spectral/ipa/__tests__/collectionIdentifierPattern.test.js @@ -45,7 +45,7 @@ testRule('xgen-IPA-102-collection-identifier-pattern', [ { code: 'xgen-IPA-102-collection-identifier-pattern', message: - "Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers (/[a-z][a-zA-Z0-9]*/). Path segment 'Resources' in path '/Resources' doesn't match the required pattern. http://go/ipa/102", + "Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers (/[a-z][a-zA-Z0-9]*/). Path segment 'Resources' in path '/Resources' doesn't match the required pattern.", path: ['paths', '/Resources'], severity: DiagnosticSeverity.Warning, }, @@ -63,14 +63,14 @@ testRule('xgen-IPA-102-collection-identifier-pattern', [ { code: 'xgen-IPA-102-collection-identifier-pattern', message: - "Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers (/[a-z][a-zA-Z0-9]*/). Path segment 'resource-groups' in path '/resource-groups' doesn't match the required pattern. http://go/ipa/102", + "Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers (/[a-z][a-zA-Z0-9]*/). Path segment 'resource-groups' in path '/resource-groups' doesn't match the required pattern.", path: ['paths', '/resource-groups'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-collection-identifier-pattern', message: - "Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers (/[a-z][a-zA-Z0-9]*/). Path segment 'user_profiles' in path '/user_profiles' doesn't match the required pattern. http://go/ipa/102", + "Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers (/[a-z][a-zA-Z0-9]*/). Path segment 'user_profiles' in path '/user_profiles' doesn't match the required pattern.", path: ['paths', '/user_profiles'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/createMethodRequestBodyIsGetResponse.test.js b/tools/spectral/ipa/__tests__/createMethodRequestBodyIsGetResponse.test.js index 640e55a4ac..f02a5f90d9 100644 --- a/tools/spectral/ipa/__tests__/createMethodRequestBodyIsGetResponse.test.js +++ b/tools/spectral/ipa/__tests__/createMethodRequestBodyIsGetResponse.test.js @@ -393,56 +393,56 @@ testRule('xgen-IPA-106-create-method-request-body-is-get-method-response', [ { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106', + 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106', + 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106', + 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106', + 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106', + 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceThree', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'Could not validate that the Create request body schema matches the response schema of the Get method. The Get method does not have a schema. http://go/ipa-spectral#IPA-106', + 'Could not validate that the Create request body schema matches the response schema of the Get method. The Get method does not have a schema.', path: ['paths', '/resourceFour', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106', + 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceCircular', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106', + 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceCircular', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, @@ -492,14 +492,14 @@ testRule('xgen-IPA-106-create-method-request-body-is-get-method-response', [ { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106', + 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/animalResource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', message: - 'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106', + 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/animalResource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/createMethodRequestBodyIsRequestSuffixedObject.test.js b/tools/spectral/ipa/__tests__/createMethodRequestBodyIsRequestSuffixedObject.test.js index fa73dba7f7..2d3cefe9c7 100644 --- a/tools/spectral/ipa/__tests__/createMethodRequestBodyIsRequestSuffixedObject.test.js +++ b/tools/spectral/ipa/__tests__/createMethodRequestBodyIsRequestSuffixedObject.test.js @@ -155,35 +155,35 @@ testRule('xgen-IPA-106-create-method-request-body-is-request-suffixed-object', [ { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', message: - 'The response body schema must reference a schema with a Request suffix. http://go/ipa-spectral#IPA-106', + 'The response body schema must reference a schema with a Request suffix. ', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', message: - 'The response body schema must reference a schema with a Request suffix. http://go/ipa-spectral#IPA-106', + 'The response body schema must reference a schema with a Request suffix. ', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', message: - 'The response body schema must reference a schema with a Request suffix. http://go/ipa-spectral#IPA-106', + 'The response body schema must reference a schema with a Request suffix. ', path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', message: - 'The response body schema must reference a schema with a Request suffix. http://go/ipa-spectral#IPA-106', + 'The response body schema must reference a schema with a Request suffix. ', path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', message: - 'The response body schema is defined inline and must reference a predefined schema. http://go/ipa-spectral#IPA-106', + 'The response body schema is defined inline and must reference a predefined schema. ', path: ['paths', '/resourceThree', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/createMethodRequestHasNoReadonlyFields.test.js b/tools/spectral/ipa/__tests__/createMethodRequestHasNoReadonlyFields.test.js index 58c98dd8af..bd5c056b11 100644 --- a/tools/spectral/ipa/__tests__/createMethodRequestHasNoReadonlyFields.test.js +++ b/tools/spectral/ipa/__tests__/createMethodRequestHasNoReadonlyFields.test.js @@ -152,14 +152,14 @@ testRule('xgen-IPA-106-create-method-request-has-no-readonly-fields', [ { code: 'xgen-IPA-106-create-method-request-has-no-readonly-fields', message: - 'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: id. http://go/ipa-spectral#IPA-106', + 'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: id. ', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-has-no-readonly-fields', message: - 'The Create method request object must not include input fields (readOnly properties). Found readOnly property at one of the inline schemas. http://go/ipa-spectral#IPA-106', + 'The Create method request object must not include input fields (readOnly properties). Found readOnly property at one of the inline schemas. ', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, @@ -192,7 +192,7 @@ testRule('xgen-IPA-106-create-method-request-has-no-readonly-fields', [ { code: 'xgen-IPA-106-create-method-request-has-no-readonly-fields', message: - 'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: user.userId. http://go/ipa-spectral#IPA-106', + 'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: user.userId. ', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, @@ -225,7 +225,7 @@ testRule('xgen-IPA-106-create-method-request-has-no-readonly-fields', [ { code: 'xgen-IPA-106-create-method-request-has-no-readonly-fields', message: - 'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: items.items.itemId. http://go/ipa-spectral#IPA-106', + 'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: items.items.itemId. ', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/createMethodResponseCodeIs201Created.test.js b/tools/spectral/ipa/__tests__/createMethodResponseCodeIs201Created.test.js index 34d21ff71f..d9d8ecade9 100644 --- a/tools/spectral/ipa/__tests__/createMethodResponseCodeIs201Created.test.js +++ b/tools/spectral/ipa/__tests__/createMethodResponseCodeIs201Created.test.js @@ -74,21 +74,21 @@ testRule('xgen-IPA-106-create-method-response-code-is-201', [ { code: 'xgen-IPA-106-create-method-response-code-is-201', message: - 'The Create method must return a 201 Created response. This method either lacks a 201 Created response or defines a different 2xx status code. http://go/ipa-spectral#IPA-106', + 'The Create method must return a 201 Created response. This method either lacks a 201 Created response or defines a different 2xx status code.', path: ['paths', '/resourceOne', 'post'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-response-code-is-201', message: - 'The Create method must return a 201 Created response. This method either lacks a 201 Created response or defines a different 2xx status code. http://go/ipa-spectral#IPA-106', + 'The Create method must return a 201 Created response. This method either lacks a 201 Created response or defines a different 2xx status code.', path: ['paths', '/resourceTwo', 'post'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-response-code-is-201', message: - 'The Create method must return a 201 Created response. This method either lacks a 201 Created response or defines a different 2xx status code. http://go/ipa-spectral#IPA-106', + 'The Create method must return a 201 Created response. This method either lacks a 201 Created response or defines a different 2xx status code.', path: ['paths', '/resourceThree', 'post'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/createMethodShouldNotHaveQueryParameters.test.js b/tools/spectral/ipa/__tests__/createMethodShouldNotHaveQueryParameters.test.js index 8346a7a4b8..694e47ee0d 100644 --- a/tools/spectral/ipa/__tests__/createMethodShouldNotHaveQueryParameters.test.js +++ b/tools/spectral/ipa/__tests__/createMethodShouldNotHaveQueryParameters.test.js @@ -120,21 +120,21 @@ testRule('xgen-IPA-106-create-method-should-not-have-query-parameters', [ errors: [ { code: 'xgen-IPA-106-create-method-should-not-have-query-parameters', - message: 'Create operations should not have query parameters. Found [filter]. http://go/ipa-spectral#IPA-106', + message: 'Create operations should not have query parameters. Found [filter]. ', path: ['paths', '/resource', 'post'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-should-not-have-query-parameters', message: - 'Create operations should not have query parameters. Found [query-param]. http://go/ipa-spectral#IPA-106', + 'Create operations should not have query parameters. Found [query-param]. ', path: ['paths', '/resourceTwo', 'post'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-should-not-have-query-parameters', message: - 'Create operations should not have query parameters. Found [query-param-2]. http://go/ipa-spectral#IPA-106', + 'Create operations should not have query parameters. Found [query-param-2]. ', path: ['paths', '/resourceTwo', 'post'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/deleteMethod204Response.test.js b/tools/spectral/ipa/__tests__/deleteMethod204Response.test.js index 88d364298f..a3d20fa93e 100644 --- a/tools/spectral/ipa/__tests__/deleteMethod204Response.test.js +++ b/tools/spectral/ipa/__tests__/deleteMethod204Response.test.js @@ -33,7 +33,7 @@ testRule('xgen-IPA-108-delete-method-return-204-response', [ errors: [ { code: 'xgen-IPA-108-delete-method-return-204-response', - message: 'DELETE method should return 204 No Content status code. http://go/ipa/108', + message: 'DELETE method should return 204 No Content status code.', path: ['paths', '/resource/{id}', 'delete'], severity: DiagnosticSeverity.Warning, }, @@ -51,7 +51,7 @@ testRule('xgen-IPA-108-delete-method-return-204-response', [ errors: [ { code: 'xgen-IPA-108-delete-method-return-204-response', - message: 'DELETE method should return 204 No Content status code. http://go/ipa/108', + message: 'DELETE method should return 204 No Content status code.', path: ['paths', '/resource/{id}', 'delete'], severity: DiagnosticSeverity.Warning, }, @@ -75,7 +75,7 @@ testRule('xgen-IPA-108-delete-method-return-204-response', [ errors: [ { code: 'xgen-IPA-108-delete-method-return-204-response', - message: 'DELETE method should return 204 No Content status code. http://go/ipa/108', + message: 'DELETE method should return 204 No Content status code.', path: ['paths', '/resource/{id}', 'delete'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/deleteMethod404Response.test.js b/tools/spectral/ipa/__tests__/deleteMethod404Response.test.js index 49b492f4b7..43d6828407 100644 --- a/tools/spectral/ipa/__tests__/deleteMethod404Response.test.js +++ b/tools/spectral/ipa/__tests__/deleteMethod404Response.test.js @@ -32,7 +32,7 @@ testRule('xgen-IPA-108-delete-include-404-response', [ errors: [ { code: 'xgen-IPA-108-delete-include-404-response', - message: 'DELETE method should include 404 status code for not found resources. http://go/ipa/108', + message: 'DELETE method should include 404 status code for not found resources.', path: ['paths', '/resource/{id}', 'delete'], severity: DiagnosticSeverity.Warning, }, @@ -52,7 +52,7 @@ testRule('xgen-IPA-108-delete-include-404-response', [ errors: [ { code: 'xgen-IPA-108-delete-include-404-response', - message: 'DELETE method should include 404 status code for not found resources. http://go/ipa/108', + message: 'DELETE method should include 404 status code for not found resources.', path: ['paths', '/resource/{id}', 'delete'], severity: DiagnosticSeverity.Warning, }, @@ -74,7 +74,7 @@ testRule('xgen-IPA-108-delete-include-404-response', [ errors: [ { code: 'xgen-IPA-108-delete-include-404-response', - message: 'DELETE method should include 404 status code for not found resources. http://go/ipa/108', + message: 'DELETE method should include 404 status code for not found resources.', path: ['paths', '/resource/{id}', 'delete'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/deleteMethodNoRequestBody.test.js b/tools/spectral/ipa/__tests__/deleteMethodNoRequestBody.test.js index 8a3ea84fb5..75d0b0b806 100644 --- a/tools/spectral/ipa/__tests__/deleteMethodNoRequestBody.test.js +++ b/tools/spectral/ipa/__tests__/deleteMethodNoRequestBody.test.js @@ -40,7 +40,7 @@ testRule('xgen-IPA-108-delete-request-no-body', [ errors: [ { code: 'xgen-IPA-108-delete-request-no-body', - message: 'DELETE method should not have a request body. http://go/ipa/108', + message: 'DELETE method should not have a request body.', path: ['paths', '/resource/{id}', 'delete'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/deleteMethodResponseShouldNotHaveSchema.test.js b/tools/spectral/ipa/__tests__/deleteMethodResponseShouldNotHaveSchema.test.js index 877d151c59..163bb0a333 100644 --- a/tools/spectral/ipa/__tests__/deleteMethodResponseShouldNotHaveSchema.test.js +++ b/tools/spectral/ipa/__tests__/deleteMethodResponseShouldNotHaveSchema.test.js @@ -65,7 +65,7 @@ testRule('xgen-IPA-108-delete-response-should-be-empty', [ { code: 'xgen-IPA-108-delete-response-should-be-empty', message: - 'Error found for application/vnd.atlas.2023-01-01+json: DELETE method should return an empty response. The response should not have a schema property. http://go/ipa/108', + 'Error found for application/vnd.atlas.2023-01-01+json: DELETE method should return an empty response. The response should not have a schema property.', path: ['paths', '/resource/{id}', 'delete', 'responses', '204'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/eachCustomMethodMustBeGetOrPost.test.js b/tools/spectral/ipa/__tests__/eachCustomMethodMustBeGetOrPost.test.js index 7fb58d3077..f05a50cc62 100644 --- a/tools/spectral/ipa/__tests__/eachCustomMethodMustBeGetOrPost.test.js +++ b/tools/spectral/ipa/__tests__/eachCustomMethodMustBeGetOrPost.test.js @@ -93,49 +93,49 @@ testRule('xgen-IPA-109-custom-method-must-be-GET-or-POST', [ errors: [ { code: 'xgen-IPA-109-custom-method-must-be-GET-or-POST', - message: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109', + message: 'The HTTP method for custom methods must be GET or POST.', path: ['paths', '/a/{exampleId}:method'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-be-GET-or-POST', - message: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109', + message: 'The HTTP method for custom methods must be GET or POST.', path: ['paths', '/a:method'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-be-GET-or-POST', - message: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109', + message: 'The HTTP method for custom methods must be GET or POST.', path: ['paths', '/b/{exampleId}:method'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-be-GET-or-POST', - message: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109', + message: 'The HTTP method for custom methods must be GET or POST.', path: ['paths', '/b:method'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-be-GET-or-POST', - message: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109', + message: 'The HTTP method for custom methods must be GET or POST.', path: ['paths', '/c/{exampleId}:method'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-be-GET-or-POST', - message: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109', + message: 'The HTTP method for custom methods must be GET or POST.', path: ['paths', '/c:method'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-be-GET-or-POST', - message: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109', + message: 'The HTTP method for custom methods must be GET or POST.', path: ['paths', '/d/{exampleId}:method'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-be-GET-or-POST', - message: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109', + message: 'The HTTP method for custom methods must be GET or POST.', path: ['paths', '/d:method'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/eachCustomMethodMustUseCamelCase.test.js b/tools/spectral/ipa/__tests__/eachCustomMethodMustUseCamelCase.test.js index a0b2f52dfa..70f4895936 100644 --- a/tools/spectral/ipa/__tests__/eachCustomMethodMustUseCamelCase.test.js +++ b/tools/spectral/ipa/__tests__/eachCustomMethodMustUseCamelCase.test.js @@ -45,37 +45,37 @@ testRule('xgen-IPA-109-custom-method-must-use-camel-case', [ errors: [ { code: 'xgen-IPA-109-custom-method-must-use-camel-case', - message: 'MethodName must use camelCase format. http://go/ipa/109', + message: 'MethodName must use camelCase format.', path: ['paths', '/a/{exampleId}:MethodName'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-use-camel-case', - message: 'MethodName must use camelCase format. http://go/ipa/109', + message: 'MethodName must use camelCase format.', path: ['paths', '/a:MethodName'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-use-camel-case', - message: 'method_name must use camelCase format. http://go/ipa/109', + message: 'method_name must use camelCase format.', path: ['paths', '/a/{exampleId}:method_name'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-use-camel-case', - message: 'method_name must use camelCase format. http://go/ipa/109', + message: 'method_name must use camelCase format.', path: ['paths', '/a:method_name'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-use-camel-case', - message: 'Custom method name cannot be empty or blank. http://go/ipa/109', + message: 'Custom method name cannot be empty or blank.', path: ['paths', '/a/{exampleId}:'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-109-custom-method-must-use-camel-case', - message: 'Custom method name cannot be empty or blank. http://go/ipa/109', + message: 'Custom method name cannot be empty or blank.', path: ['paths', '/a:'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/eachEnumValueMustBeUpperSnakeCase.test.js b/tools/spectral/ipa/__tests__/eachEnumValueMustBeUpperSnakeCase.test.js index 83043ba49a..5c84c65f84 100644 --- a/tools/spectral/ipa/__tests__/eachEnumValueMustBeUpperSnakeCase.test.js +++ b/tools/spectral/ipa/__tests__/eachEnumValueMustBeUpperSnakeCase.test.js @@ -96,25 +96,25 @@ testRule('xgen-IPA-123-enum-values-must-be-upper-snake-case', [ errors: [ { code: 'xgen-IPA-123-enum-values-must-be-upper-snake-case', - message: 'enum[0]:exampleA enum value must be UPPER_SNAKE_CASE. http://go/ipa/123', + message: 'enum[0]:exampleA enum value must be UPPER_SNAKE_CASE. ', path: ['components', 'schemas', 'SchemaName', 'properties', 'exampleProperty'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-123-enum-values-must-be-upper-snake-case', - message: 'enum[1]:exampleB enum value must be UPPER_SNAKE_CASE. http://go/ipa/123', + message: 'enum[1]:exampleB enum value must be UPPER_SNAKE_CASE. ', path: ['components', 'schemas', 'SchemaName', 'properties', 'exampleProperty'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-123-enum-values-must-be-upper-snake-case', - message: 'enum[0]:exampleA enum value must be UPPER_SNAKE_CASE. http://go/ipa/123', + message: 'enum[0]:exampleA enum value must be UPPER_SNAKE_CASE. ', path: ['components', 'schemas', 'SchemaName2', 'properties', 'exampleProperty'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-123-enum-values-must-be-upper-snake-case', - message: 'enum[1]:exampleB enum value must be UPPER_SNAKE_CASE. http://go/ipa/123', + message: 'enum[1]:exampleB enum value must be UPPER_SNAKE_CASE. ', path: ['components', 'schemas', 'SchemaName2', 'properties', 'exampleProperty'], severity: DiagnosticSeverity.Warning, }, @@ -166,13 +166,13 @@ testRule('xgen-IPA-123-enum-values-must-be-upper-snake-case', [ errors: [ { code: 'xgen-IPA-123-enum-values-must-be-upper-snake-case', - message: 'enum[0]:exampleA enum value must be UPPER_SNAKE_CASE. http://go/ipa/123', + message: 'enum[0]:exampleA enum value must be UPPER_SNAKE_CASE. ', path: ['components', 'schemas', 'SchemaName'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-123-enum-values-must-be-upper-snake-case', - message: 'enum[1]:exampleB enum value must be UPPER_SNAKE_CASE. http://go/ipa/123', + message: 'enum[1]:exampleB enum value must be UPPER_SNAKE_CASE. ', path: ['components', 'schemas', 'SchemaName'], severity: DiagnosticSeverity.Warning, }, @@ -242,13 +242,13 @@ testRule('xgen-IPA-123-enum-values-must-be-upper-snake-case', [ errors: [ { code: 'xgen-IPA-123-enum-values-must-be-upper-snake-case', - message: 'enum[0]:exampleA enum value must be UPPER_SNAKE_CASE. http://go/ipa/123', + message: 'enum[0]:exampleA enum value must be UPPER_SNAKE_CASE. ', path: ['paths', '/a/{exampleId}', 'get', 'parameters', '0', 'schema'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-123-enum-values-must-be-upper-snake-case', - message: 'enum[1]:exampleB enum value must be UPPER_SNAKE_CASE. http://go/ipa/123', + message: 'enum[1]:exampleB enum value must be UPPER_SNAKE_CASE. ', path: ['paths', '/a/{exampleId}', 'get', 'parameters', '0', 'schema'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/eachPathAlternatesBetweenResourceNameAndPathParam.test.js b/tools/spectral/ipa/__tests__/eachPathAlternatesBetweenResourceNameAndPathParam.test.js index d0bafeb416..8605ef0dc0 100644 --- a/tools/spectral/ipa/__tests__/eachPathAlternatesBetweenResourceNameAndPathParam.test.js +++ b/tools/spectral/ipa/__tests__/eachPathAlternatesBetweenResourceNameAndPathParam.test.js @@ -47,37 +47,37 @@ testRule('xgen-IPA-102-path-alternate-resource-name-path-param', [ errors: [ { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/resourceName1/resourceName2'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/resourceName/{pathParam1}/{pathParam2}'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/resourceName1/{pathParam1}/resourceName2/resourceName3'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/resourceName1/{pathParam1}/resourceName2/{pathParam2}/{pathParam3}'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/{pathParam}'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/{pathParam1}/{pathParam2}'], severity: DiagnosticSeverity.Warning, }, @@ -98,37 +98,37 @@ testRule('xgen-IPA-102-path-alternate-resource-name-path-param', [ errors: [ { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/unauth/resourceName1/resourceName2'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/unauth/resourceName/{pathParam1}/{pathParam2}'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/unauth/resourceName1/{pathParam1}/resourceName2/resourceName3'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/unauth/resourceName1/{pathParam1}/resourceName2/{pathParam2}/{pathParam3}'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/unauth/{pathParam}'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-102-path-alternate-resource-name-path-param', - message: 'API paths must alternate between resource name and path params. http://go/ipa/102', + message: 'API paths must alternate between resource name and path params.', path: ['paths', '/api/atlas/v2/unauth/{pathParam1}/{pathParam2}'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/eachResourceHasGetMethod.test.js b/tools/spectral/ipa/__tests__/eachResourceHasGetMethod.test.js index b3faefdca5..006ce8be41 100644 --- a/tools/spectral/ipa/__tests__/eachResourceHasGetMethod.test.js +++ b/tools/spectral/ipa/__tests__/eachResourceHasGetMethod.test.js @@ -92,31 +92,31 @@ testRule('xgen-IPA-104-resource-has-GET', [ errors: [ { code: 'xgen-IPA-104-resource-has-GET', - message: 'APIs must provide a get method for resources. http://go/ipa/104', + message: 'APIs must provide a get method for resources.', path: ['paths', '/standard'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-104-resource-has-GET', - message: 'APIs must provide a get method for resources. http://go/ipa/104', + message: 'APIs must provide a get method for resources.', path: ['paths', '/standard/{exampleId}/nested'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-104-resource-has-GET', - message: 'APIs must provide a get method for resources. http://go/ipa/104', + message: 'APIs must provide a get method for resources.', path: ['paths', '/standard/{exampleId}/nestedSingleton'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-104-resource-has-GET', - message: 'APIs must provide a get method for resources. http://go/ipa/104', + message: 'APIs must provide a get method for resources.', path: ['paths', '/custom'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-104-resource-has-GET', - message: 'APIs must provide a get method for resources. http://go/ipa/104', + message: 'APIs must provide a get method for resources.', path: ['paths', '/standardWithoutSubResource'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/eachResourceHasListMethod.test.js b/tools/spectral/ipa/__tests__/eachResourceHasListMethod.test.js index 59f09322e1..e76de33946 100644 --- a/tools/spectral/ipa/__tests__/eachResourceHasListMethod.test.js +++ b/tools/spectral/ipa/__tests__/eachResourceHasListMethod.test.js @@ -53,13 +53,13 @@ testRule('xgen-IPA-105-resource-has-list', [ errors: [ { code: 'xgen-IPA-105-resource-has-list', - message: 'APIs must provide a List method for resources. http://go/ipa/105', + message: 'APIs must provide a List method for resources.', path: ['paths', '/standard'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-105-resource-has-list', - message: 'APIs must provide a List method for resources. http://go/ipa/105', + message: 'APIs must provide a List method for resources.', path: ['paths', '/standard/{exampleId}/nested'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/getMethodHasNoRequestBody.test.js b/tools/spectral/ipa/__tests__/getMethodHasNoRequestBody.test.js index 63453fbc02..0cd78970b0 100644 --- a/tools/spectral/ipa/__tests__/getMethodHasNoRequestBody.test.js +++ b/tools/spectral/ipa/__tests__/getMethodHasNoRequestBody.test.js @@ -61,13 +61,13 @@ testRule('xgen-IPA-104-get-method-no-request-body', [ errors: [ { code: 'xgen-IPA-104-get-method-no-request-body', - message: 'The Get method must not include a request body. http://go/ipa/104', + message: 'The Get method must not include a request body.', path: ['paths', '/resource/{id}', 'get'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-104-get-method-no-request-body', - message: 'The Get method must not include a request body. http://go/ipa/104', + message: 'The Get method must not include a request body.', path: ['paths', '/resource/{id}/singleton', 'get'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/getMethodResponseHasNoInputFields.test.js b/tools/spectral/ipa/__tests__/getMethodResponseHasNoInputFields.test.js index 9cd8dc171f..19c6396da7 100644 --- a/tools/spectral/ipa/__tests__/getMethodResponseHasNoInputFields.test.js +++ b/tools/spectral/ipa/__tests__/getMethodResponseHasNoInputFields.test.js @@ -131,7 +131,7 @@ testRule('xgen-IPA-104-get-method-response-has-no-input-fields', [ { code: 'xgen-IPA-104-get-method-response-has-no-input-fields', message: - 'The get method response object must not include output fields (writeOnly properties). Found writeOnly property at: name. http://go/ipa/104', + 'The get method response object must not include output fields (writeOnly properties). Found writeOnly property at: name.', path: [ 'paths', '/resource/{id}', @@ -146,7 +146,7 @@ testRule('xgen-IPA-104-get-method-response-has-no-input-fields', [ { code: 'xgen-IPA-104-get-method-response-has-no-input-fields', message: - 'The get method response object must not include output fields (writeOnly properties). Found writeOnly property at: name. http://go/ipa/104', + 'The get method response object must not include output fields (writeOnly properties). Found writeOnly property at: name.', path: [ 'paths', '/resource/{id}/singleton', diff --git a/tools/spectral/ipa/__tests__/getMethodReturnsResponseSuffixedObject.test.js b/tools/spectral/ipa/__tests__/getMethodReturnsResponseSuffixedObject.test.js index e16cd261e8..fcb03eef76 100644 --- a/tools/spectral/ipa/__tests__/getMethodReturnsResponseSuffixedObject.test.js +++ b/tools/spectral/ipa/__tests__/getMethodReturnsResponseSuffixedObject.test.js @@ -152,7 +152,7 @@ testRule('xgen-IPA-104-get-method-returns-response-suffixed-object', [ errors: [ { code: 'xgen-IPA-104-get-method-returns-response-suffixed-object', - message: 'The response body schema must reference a schema with a Response suffix. http://go/ipa/104', + message: 'The response body schema must reference a schema with a Response suffix.', path: [ 'paths', '/resource/{id}', @@ -166,7 +166,7 @@ testRule('xgen-IPA-104-get-method-returns-response-suffixed-object', [ }, { code: 'xgen-IPA-104-get-method-returns-response-suffixed-object', - message: 'The response body schema must reference a schema with a Response suffix. http://go/ipa/104', + message: 'The response body schema must reference a schema with a Response suffix.', path: [ 'paths', '/resource/{id}', @@ -180,7 +180,7 @@ testRule('xgen-IPA-104-get-method-returns-response-suffixed-object', [ }, { code: 'xgen-IPA-104-get-method-returns-response-suffixed-object', - message: 'The response body schema must reference a schema with a Response suffix. http://go/ipa/104', + message: 'The response body schema must reference a schema with a Response suffix.', path: [ 'paths', '/resource/{id}', @@ -194,7 +194,7 @@ testRule('xgen-IPA-104-get-method-returns-response-suffixed-object', [ }, { code: 'xgen-IPA-104-get-method-returns-response-suffixed-object', - message: 'The response body schema must reference a schema with a Response suffix. http://go/ipa/104', + message: 'The response body schema must reference a schema with a Response suffix.', path: [ 'paths', '/resource/{id}/singleton', diff --git a/tools/spectral/ipa/__tests__/getMethodReturnsSingleResource.test.js b/tools/spectral/ipa/__tests__/getMethodReturnsSingleResource.test.js index 84e453fe85..d7792393a1 100644 --- a/tools/spectral/ipa/__tests__/getMethodReturnsSingleResource.test.js +++ b/tools/spectral/ipa/__tests__/getMethodReturnsSingleResource.test.js @@ -164,7 +164,7 @@ testRule('xgen-IPA-104-get-method-returns-single-resource', [ { code: 'xgen-IPA-104-get-method-returns-single-resource', message: - 'Get methods should return data for a single resource. This method returns an array or a paginated response. http://go/ipa/104', + 'Get methods should return data for a single resource. This method returns an array or a paginated response.', path: [ 'paths', '/arrayResource/{id}', @@ -179,7 +179,7 @@ testRule('xgen-IPA-104-get-method-returns-single-resource', [ { code: 'xgen-IPA-104-get-method-returns-single-resource', message: - 'Get methods should return data for a single resource. This method returns an array or a paginated response. http://go/ipa/104', + 'Get methods should return data for a single resource. This method returns an array or a paginated response.', path: [ 'paths', '/paginatedResource/{id}', @@ -194,7 +194,7 @@ testRule('xgen-IPA-104-get-method-returns-single-resource', [ { code: 'xgen-IPA-104-get-method-returns-single-resource', message: - 'Get methods for singleton resource should return data for a single resource. This method returns an array or a paginated response. If this is not a singleton resource, please implement all standard methods. http://go/ipa/104', + 'Get methods for singleton resource should return data for a single resource. This method returns an array or a paginated response. If this is not a singleton resource, please implement all standard methods.', path: [ 'paths', '/resource/{id}/arraySingleton', @@ -209,7 +209,7 @@ testRule('xgen-IPA-104-get-method-returns-single-resource', [ { code: 'xgen-IPA-104-get-method-returns-single-resource', message: - 'Get methods for singleton resource should return data for a single resource. This method returns an array or a paginated response. If this is not a singleton resource, please implement all standard methods. http://go/ipa/104', + 'Get methods for singleton resource should return data for a single resource. This method returns an array or a paginated response. If this is not a singleton resource, please implement all standard methods.', path: [ 'paths', '/resource/{id}/paginatedSingleton', diff --git a/tools/spectral/ipa/__tests__/getResponseCodeShouldBe200OK.test.js b/tools/spectral/ipa/__tests__/getResponseCodeShouldBe200OK.test.js index 32396024d6..fc13ddc95e 100644 --- a/tools/spectral/ipa/__tests__/getResponseCodeShouldBe200OK.test.js +++ b/tools/spectral/ipa/__tests__/getResponseCodeShouldBe200OK.test.js @@ -93,28 +93,28 @@ testRule('xgen-IPA-104-get-method-response-code-is-200', [ { code: 'xgen-IPA-104-get-method-response-code-is-200', message: - 'The Get method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code. http://go/ipa/104', + 'The Get method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code.', path: ['paths', '/resourceOne/{id}', 'get'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-104-get-method-response-code-is-200', message: - 'The Get method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code. http://go/ipa/104', + 'The Get method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code.', path: ['paths', '/resourceTwo/{id}', 'get'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-104-get-method-response-code-is-200', message: - 'The Get method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code. http://go/ipa/104', + 'The Get method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code.', path: ['paths', '/resourceThree/{id}', 'get'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-104-get-method-response-code-is-200', message: - 'The Get method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code. http://go/ipa/104', + 'The Get method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code.', path: ['paths', '/resource/{id}/singleton', 'get'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/listMethodHasNoRequestBody.test.js b/tools/spectral/ipa/__tests__/listMethodHasNoRequestBody.test.js index ba3e270294..1278173f25 100644 --- a/tools/spectral/ipa/__tests__/listMethodHasNoRequestBody.test.js +++ b/tools/spectral/ipa/__tests__/listMethodHasNoRequestBody.test.js @@ -83,7 +83,7 @@ testRule('xgen-IPA-105-list-method-no-request-body', [ errors: [ { code: 'xgen-IPA-105-list-method-no-request-body', - message: 'The List method must not include a request body. http://go/ipa/105', + message: 'The List method must not include a request body.', path: ['paths', '/resource', 'get'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/listMethodResponseIsGetMethodResponse.test.js b/tools/spectral/ipa/__tests__/listMethodResponseIsGetMethodResponse.test.js index c1e94ef5f0..be02af5db8 100644 --- a/tools/spectral/ipa/__tests__/listMethodResponseIsGetMethodResponse.test.js +++ b/tools/spectral/ipa/__tests__/listMethodResponseIsGetMethodResponse.test.js @@ -398,14 +398,14 @@ testRule('xgen-IPA-105-list-method-response-is-get-method-response', [ { code: 'xgen-IPA-105-list-method-response-is-get-method-response', message: - 'The schema of each result in the List method response must be the same schema as the response of the Get method. http://go/ipa-spectral#IPA-105', + 'The schema of each result in the List method response must be the same schema as the response of the Get method.', path: ['paths', '/resource', 'get', 'responses', '200', 'content', 'application/vnd.atlas.2024-08-05+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-105-list-method-response-is-get-method-response', message: - 'The schema of each result in the List method response must be the same schema as the response of the Get method. http://go/ipa-spectral#IPA-105', + 'The schema of each result in the List method response must be the same schema as the response of the Get method.', path: [ 'paths', '/arrayResource', @@ -420,14 +420,14 @@ testRule('xgen-IPA-105-list-method-response-is-get-method-response', [ { code: 'xgen-IPA-105-list-method-response-is-get-method-response', message: - 'Could not validate that the List method returns the same resource object as the Get method. The Get method does not have a schema. http://go/ipa-spectral#IPA-105', + 'Could not validate that the List method returns the same resource object as the Get method. The Get method does not have a schema.', path: ['paths', '/resourceTwo', 'get', 'responses', '200', 'content', 'application/vnd.atlas.2024-01-05+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-105-list-method-response-is-get-method-response', message: - 'Could not validate that the List method returns the same resource object as the Get method. The Get method does not have a schema reference. http://go/ipa-spectral#IPA-105', + 'Could not validate that the List method returns the same resource object as the Get method. The Get method does not have a schema reference.', path: [ 'paths', '/resourceThree', @@ -482,7 +482,7 @@ testRule('xgen-IPA-105-list-method-response-is-get-method-response', [ { code: 'xgen-IPA-105-list-method-response-is-get-method-response', message: - 'The schema of each result in the List method response must be the same schema as the response of the Get method. http://go/ipa-spectral#IPA-105', + 'The schema of each result in the List method response must be the same schema as the response of the Get method.', path: ['paths', '/resource', 'get', 'responses', '200', 'content', 'application/vnd.atlas.2024-08-05+json'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/listResponseCodeShouldBe200OK.test.js b/tools/spectral/ipa/__tests__/listResponseCodeShouldBe200OK.test.js index 87f50cd737..7a1342dae2 100644 --- a/tools/spectral/ipa/__tests__/listResponseCodeShouldBe200OK.test.js +++ b/tools/spectral/ipa/__tests__/listResponseCodeShouldBe200OK.test.js @@ -81,28 +81,28 @@ testRule('xgen-IPA-105-list-method-response-code-is-200', [ { code: 'xgen-IPA-105-list-method-response-code-is-200', message: - 'The List method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code. http://go/ipa/105', + 'The List method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code.', path: ['paths', '/resourceOne', 'get'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-105-list-method-response-code-is-200', message: - 'The List method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code. http://go/ipa/105', + 'The List method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code.', path: ['paths', '/resourceTwo', 'get'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-105-list-method-response-code-is-200', message: - 'The List method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code. http://go/ipa/105', + 'The List method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code.', path: ['paths', '/resourceThree', 'get'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-105-list-method-response-code-is-200', message: - 'The List method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code. http://go/ipa/105', + 'The List method must return a 200 OK response. This method either lacks a 200 OK response or defines a different 2xx status code.', path: ['paths', '/resourceFour', 'get'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/singletonHasNoId.test.js b/tools/spectral/ipa/__tests__/singletonHasNoId.test.js index f38759a0f3..4770abb358 100644 --- a/tools/spectral/ipa/__tests__/singletonHasNoId.test.js +++ b/tools/spectral/ipa/__tests__/singletonHasNoId.test.js @@ -163,19 +163,19 @@ testRule('xgen-IPA-113-singleton-must-not-have-id', [ errors: [ { code: 'xgen-IPA-113-singleton-must-not-have-id', - message: 'Singleton resources must not have a user-provided or system-generated ID. http://go/ipa/113', + message: 'Singleton resources must not have a user-provided or system-generated ID.', path: ['paths', '/resource/{exampleId}/singletonOne'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-113-singleton-must-not-have-id', - message: 'Singleton resources must not have a user-provided or system-generated ID. http://go/ipa/113', + message: 'Singleton resources must not have a user-provided or system-generated ID.', path: ['paths', '/resource/{exampleId}/singletonTwo'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-113-singleton-must-not-have-id', - message: 'Singleton resources must not have a user-provided or system-generated ID. http://go/ipa/113', + message: 'Singleton resources must not have a user-provided or system-generated ID.', path: ['paths', '/resource/{exampleId}/singletonThree'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/updateMethodMustNotHaveQueryParams.test.js b/tools/spectral/ipa/__tests__/updateMethodMustNotHaveQueryParams.test.js index 41e53d885f..d887a0d8aa 100644 --- a/tools/spectral/ipa/__tests__/updateMethodMustNotHaveQueryParams.test.js +++ b/tools/spectral/ipa/__tests__/updateMethodMustNotHaveQueryParams.test.js @@ -120,21 +120,19 @@ testRule('xgen-IPA-107-put-must-not-have-query-params', [ errors: [ { code: 'xgen-IPA-107-put-must-not-have-query-params', - message: 'Update operations must not have query parameters. Found [filter]. http://go/ipa-spectral#IPA-107', + message: 'Update operations must not have query parameters. Found [filter].', path: ['paths', '/resource/{id}', 'put'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-107-put-must-not-have-query-params', - message: - 'Update operations must not have query parameters. Found [query-param]. http://go/ipa-spectral#IPA-107', + message: 'Update operations must not have query parameters. Found [query-param].', path: ['paths', '/resource/{id}/singleton', 'put'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-107-put-must-not-have-query-params', - message: - 'Update operations must not have query parameters. Found [query-param-2]. http://go/ipa-spectral#IPA-107', + message: 'Update operations must not have query parameters. Found [query-param-2].', path: ['paths', '/resource/{id}/singleton', 'put'], severity: DiagnosticSeverity.Warning, }, @@ -257,21 +255,19 @@ testRule('xgen-IPA-107-patch-must-not-have-query-params', [ errors: [ { code: 'xgen-IPA-107-patch-must-not-have-query-params', - message: 'Update operations must not have query parameters. Found [filter]. http://go/ipa-spectral#IPA-107', + message: 'Update operations must not have query parameters. Found [filter].', path: ['paths', '/resource/{id}', 'patch'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-107-patch-must-not-have-query-params', - message: - 'Update operations must not have query parameters. Found [query-param]. http://go/ipa-spectral#IPA-107', + message: 'Update operations must not have query parameters. Found [query-param].', path: ['paths', '/resource/{id}/singleton', 'patch'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-107-patch-must-not-have-query-params', - message: - 'Update operations must not have query parameters. Found [query-param-2]. http://go/ipa-spectral#IPA-107', + message: 'Update operations must not have query parameters. Found [query-param-2].', path: ['paths', '/resource/{id}/singleton', 'patch'], severity: DiagnosticSeverity.Warning, }, From a8cd82e36f271fb15843524bd35f8944d6255c5c Mon Sep 17 00:00:00 2001 From: wtrocki Date: Fri, 14 Mar 2025 18:24:40 +0100 Subject: [PATCH 3/3] fix: readme --- ...eateMethodRequestBodyIsGetResponse.test.js | 27 +++++-------- ...RequestBodyIsRequestSuffixedObject.test.js | 15 +++----- ...MethodShouldNotHaveQueryParameters.test.js | 6 +-- tools/spectral/ipa/rulesets/README.md | 38 +++++++++---------- 4 files changed, 35 insertions(+), 51 deletions(-) diff --git a/tools/spectral/ipa/__tests__/createMethodRequestBodyIsGetResponse.test.js b/tools/spectral/ipa/__tests__/createMethodRequestBodyIsGetResponse.test.js index f02a5f90d9..81245236ab 100644 --- a/tools/spectral/ipa/__tests__/createMethodRequestBodyIsGetResponse.test.js +++ b/tools/spectral/ipa/__tests__/createMethodRequestBodyIsGetResponse.test.js @@ -392,36 +392,31 @@ testRule('xgen-IPA-106-create-method-request-body-is-get-method-response', [ errors: [ { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', - message: - 'The request body schema properties must match the response body schema properties of the Get method.', + message: 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', - message: - 'The request body schema properties must match the response body schema properties of the Get method.', + message: 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', - message: - 'The request body schema properties must match the response body schema properties of the Get method.', + message: 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', - message: - 'The request body schema properties must match the response body schema properties of the Get method.', + message: 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', - message: - 'The request body schema properties must match the response body schema properties of the Get method.', + message: 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceThree', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, @@ -434,15 +429,13 @@ testRule('xgen-IPA-106-create-method-request-body-is-get-method-response', [ }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', - message: - 'The request body schema properties must match the response body schema properties of the Get method.', + message: 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceCircular', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', - message: - 'The request body schema properties must match the response body schema properties of the Get method.', + message: 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/resourceCircular', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, @@ -491,15 +484,13 @@ testRule('xgen-IPA-106-create-method-request-body-is-get-method-response', [ errors: [ { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', - message: - 'The request body schema properties must match the response body schema properties of the Get method.', + message: 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/animalResource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-get-method-response', - message: - 'The request body schema properties must match the response body schema properties of the Get method.', + message: 'The request body schema properties must match the response body schema properties of the Get method.', path: ['paths', '/animalResource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/createMethodRequestBodyIsRequestSuffixedObject.test.js b/tools/spectral/ipa/__tests__/createMethodRequestBodyIsRequestSuffixedObject.test.js index 2d3cefe9c7..3bdd45c897 100644 --- a/tools/spectral/ipa/__tests__/createMethodRequestBodyIsRequestSuffixedObject.test.js +++ b/tools/spectral/ipa/__tests__/createMethodRequestBodyIsRequestSuffixedObject.test.js @@ -154,36 +154,31 @@ testRule('xgen-IPA-106-create-method-request-body-is-request-suffixed-object', [ errors: [ { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', - message: - 'The response body schema must reference a schema with a Request suffix. ', + message: 'The response body schema must reference a schema with a Request suffix. ', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', - message: - 'The response body schema must reference a schema with a Request suffix. ', + message: 'The response body schema must reference a schema with a Request suffix. ', path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', - message: - 'The response body schema must reference a schema with a Request suffix. ', + message: 'The response body schema must reference a schema with a Request suffix. ', path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', - message: - 'The response body schema must reference a schema with a Request suffix. ', + message: 'The response body schema must reference a schema with a Request suffix. ', path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object', - message: - 'The response body schema is defined inline and must reference a predefined schema. ', + message: 'The response body schema is defined inline and must reference a predefined schema. ', path: ['paths', '/resourceThree', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/__tests__/createMethodShouldNotHaveQueryParameters.test.js b/tools/spectral/ipa/__tests__/createMethodShouldNotHaveQueryParameters.test.js index 694e47ee0d..f49dffe0d4 100644 --- a/tools/spectral/ipa/__tests__/createMethodShouldNotHaveQueryParameters.test.js +++ b/tools/spectral/ipa/__tests__/createMethodShouldNotHaveQueryParameters.test.js @@ -126,15 +126,13 @@ testRule('xgen-IPA-106-create-method-should-not-have-query-parameters', [ }, { code: 'xgen-IPA-106-create-method-should-not-have-query-parameters', - message: - 'Create operations should not have query parameters. Found [query-param]. ', + message: 'Create operations should not have query parameters. Found [query-param]. ', path: ['paths', '/resourceTwo', 'post'], severity: DiagnosticSeverity.Warning, }, { code: 'xgen-IPA-106-create-method-should-not-have-query-parameters', - message: - 'Create operations should not have query parameters. Found [query-param-2]. ', + message: 'Create operations should not have query parameters. Found [query-param-2]. ', path: ['paths', '/resourceTwo', 'post'], severity: DiagnosticSeverity.Warning, }, diff --git a/tools/spectral/ipa/rulesets/README.md b/tools/spectral/ipa/rulesets/README.md index 2f778cd003..41c008c0b2 100644 --- a/tools/spectral/ipa/rulesets/README.md +++ b/tools/spectral/ipa/rulesets/README.md @@ -32,7 +32,7 @@ Rule is based on [http://go/ipa/IPA-102](http://go/ipa/IPA-102). #### xgen-IPA-102-path-alternate-resource-name-path-param ![error](https://img.shields.io/badge/error-red) -Paths should alternate between resource names and path params. http://go/ipa/102 +Paths should alternate between resource names and path params. #### xgen-IPA-102-collection-identifier-camelCase ![warn](https://img.shields.io/badge/warning-yellow) @@ -52,7 +52,7 @@ Collection identifiers must be in camelCase. #### xgen-IPA-102-collection-identifier-pattern ![warn](https://img.shields.io/badge/warning-yellow) -Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers. http://go/ipa/102 +Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers. ### IPA-104 @@ -62,27 +62,27 @@ Rule is based on [http://go/ipa/IPA-104](http://go/ipa/IPA-104). #### xgen-IPA-104-resource-has-GET ![warn](https://img.shields.io/badge/warning-yellow) -APIs must provide a Get method for resources. http://go/ipa/104 +APIs must provide a Get method for resources. #### xgen-IPA-104-get-method-returns-single-resource ![warn](https://img.shields.io/badge/warning-yellow) -The purpose of the Get method is to return data from a single resource. http://go/ipa/104 +The purpose of the Get method is to return data from a single resource. #### xgen-IPA-104-get-method-response-code-is-200 ![warn](https://img.shields.io/badge/warning-yellow) -The Get method must return a 200 OK response. http://go/ipa/104 +The Get method must return a 200 OK response. #### xgen-IPA-104-get-method-returns-response-suffixed-object ![warn](https://img.shields.io/badge/warning-yellow) -The Get method of a resource should return a "Response" suffixed object. http://go/ipa/104 +The Get method of a resource should return a "Response" suffixed object. #### xgen-IPA-104-get-method-response-has-no-input-fields ![warn](https://img.shields.io/badge/warning-yellow) -The Get method response object must not include writeOnly properties (fields that should be used only on creation or update, ie output fields). http://go/ipa/104 +The Get method response object must not include writeOnly properties (fields that should be used only on creation or update, ie output fields). #### xgen-IPA-104-get-method-no-request-body ![warn](https://img.shields.io/badge/warning-yellow) -The Get method request must not include a body. http://go/ipa/104 +The Get method request must not include a body. ### IPA-105 @@ -92,15 +92,15 @@ Rule is based on [http://go/ipa/IPA-105](http://go/ipa/IPA-105). #### xgen-IPA-105-list-method-response-code-is-200 ![warn](https://img.shields.io/badge/warning-yellow) -The List method must return a 200 OK response. http://go/ipa/105 +The List method must return a 200 OK response. #### xgen-IPA-105-list-method-no-request-body ![warn](https://img.shields.io/badge/warning-yellow) -The List method request must not include a body. http://go/ipa/105 +The List method request must not include a body. #### xgen-IPA-105-resource-has-list ![warn](https://img.shields.io/badge/warning-yellow) -APIs must provide a List method for resources. http://go/ipa/105 +APIs must provide a List method for resources. #### xgen-IPA-105-list-method-response-is-get-method-response ![warn](https://img.shields.io/badge/warning-yellow) @@ -185,19 +185,19 @@ Rule is based on [http://go/ipa/IPA-108](http://go/ipa/IPA-108). #### xgen-IPA-108-delete-response-should-be-empty ![warn](https://img.shields.io/badge/warning-yellow) -Delete method response should not have schema reference to object. http://go/ipa/108 +Delete method response should not have schema reference to object. #### xgen-IPA-108-delete-method-return-204-response ![warn](https://img.shields.io/badge/warning-yellow) -DELETE method must return 204 No Content. http://go/ipa/108 +DELETE method must return 204 No Content. #### xgen-IPA-108-delete-include-404-response ![warn](https://img.shields.io/badge/warning-yellow) -DELETE method must include 404 response and return it when resource not found. http://go/ipa/108 +DELETE method must include 404 response and return it when resource not found. #### xgen-IPA-108-delete-request-no-body ![warn](https://img.shields.io/badge/warning-yellow) -DELETE method must not have request body. http://go/ipa/108 +DELETE method must not have request body. ### IPA-109 @@ -207,11 +207,11 @@ Rule is based on [http://go/ipa/IPA-109](http://go/ipa/IPA-109). #### xgen-IPA-109-custom-method-must-be-GET-or-POST ![error](https://img.shields.io/badge/error-red) -The HTTP method for custom methods must be GET or POST. http://go/ipa/109 +The HTTP method for custom methods must be GET or POST. #### xgen-IPA-109-custom-method-must-use-camel-case ![error](https://img.shields.io/badge/error-red) -The custom method must use camelCase format. http://go/ipa/109 +The custom method must use camelCase format. ### IPA-113 @@ -221,7 +221,7 @@ Rule is based on [http://go/ipa/IPA-113](http://go/ipa/IPA-113). #### xgen-IPA-113-singleton-must-not-have-id ![warn](https://img.shields.io/badge/warning-yellow) -Singleton resources must not have a user-provided or system-generated ID. http://go/ipa/113 +Singleton resources must not have a user-provided or system-generated ID. ### IPA-123 @@ -231,7 +231,7 @@ Rule is based on [http://go/ipa/IPA-123](http://go/ipa/IPA-123). #### xgen-IPA-123-enum-values-must-be-upper-snake-case ![error](https://img.shields.io/badge/error-red) -Enum values must be UPPER_SNAKE_CASE. http://go/ipa/123 +Enum values must be UPPER_SNAKE_CASE.