Skip to content

Commit 20adf76

Browse files
committed
CLOUDP-305862: replace urls
1 parent 3cd6df5 commit 20adf76

File tree

10 files changed

+53
-53
lines changed

10 files changed

+53
-53
lines changed

tools/spectral/ipa/rulesets/IPA-005.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rules:
1414
- Exception rule names must start with 'xgen-IPA-' prefix
1515
- Each exception must include a non-empty reason as a string
1616
- This rule itself does not allow exceptions
17-
message: '{{error}} http://go/ipa-spectral#IPA-102'
17+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-005-exception-extension-format'
1818
severity: error
1919
given: '$..x-xgen-IPA-exception'
2020
then:

tools/spectral/ipa/rulesets/IPA-102.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rules:
1717
- Paths with `x-xgen-IPA-exception` for this rule are excluded from validation
1818
- Double slashes (//) are not allowed in paths
1919
20-
message: '{{error}} http://go/ipa-spectral#IPA-102'
20+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-102-collection-identifier-camelCase'
2121
severity: warn
2222
given: $.paths
2323
then:
@@ -28,17 +28,17 @@ rules:
2828
ignoredValues: ['v2', 'v1']
2929

3030
xgen-IPA-102-path-alternate-resource-name-path-param:
31-
description: 'Paths should alternate between resource names and path params. http://go/ipa/102'
32-
message: '{{error}} http://go/ipa/102'
31+
description: 'Paths should alternate between resource names and path params.'
32+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-102-path-alternate-resource-name-path-param'
3333
severity: error
3434
given: '$.paths'
3535
then:
3636
field: '@key'
3737
function: 'eachPathAlternatesBetweenResourceNameAndPathParam'
3838

3939
xgen-IPA-102-collection-identifier-pattern:
40-
description: Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers. http://go/ipa/102
41-
message: '{{error}} http://go/ipa/102'
40+
description: Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers.
41+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-102-collection-identifier-pattern'
4242
severity: warn
4343
given: $.paths
4444
then:

tools/spectral/ipa/rulesets/IPA-104.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,47 @@ functions:
1111

1212
rules:
1313
xgen-IPA-104-resource-has-GET:
14-
description: 'APIs must provide a Get method for resources. http://go/ipa/104'
15-
message: '{{error}} http://go/ipa/104'
14+
description: 'APIs must provide a Get method for resources.'
15+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-resource-has-GET'
1616
severity: warn
1717
given: '$.paths'
1818
then:
1919
field: '@key'
2020
function: 'eachResourceHasGetMethod'
2121
xgen-IPA-104-get-method-returns-single-resource:
22-
description: 'The purpose of the Get method is to return data from a single resource. http://go/ipa/104'
23-
message: '{{error}} http://go/ipa/104'
22+
description: 'The purpose of the Get method is to return data from a single resource.'
23+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-returns-single-resource'
2424
severity: warn
2525
given: '$.paths[*].get.responses[*].content'
2626
then:
2727
field: '@key'
2828
function: 'getMethodReturnsSingleResource'
2929
xgen-IPA-104-get-method-response-code-is-200:
30-
description: 'The Get method must return a 200 OK response. http://go/ipa/104'
31-
message: '{{error}} http://go/ipa/104'
30+
description: 'The Get method must return a 200 OK response.'
31+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-response-code-is-200'
3232
severity: warn
3333
given: '$.paths[*].get'
3434
then:
3535
function: 'getResponseCodeShouldBe200OK'
3636
xgen-IPA-104-get-method-returns-response-suffixed-object:
37-
description: 'The Get method of a resource should return a "Response" suffixed object. http://go/ipa/104'
38-
message: '{{error}} http://go/ipa/104'
37+
description: 'The Get method of a resource should return a "Response" suffixed object.'
38+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-returns-response-suffixed-object'
3939
severity: warn
4040
given: '$.paths[*].get.responses[*].content'
4141
then:
4242
field: '@key'
4343
function: 'getMethodReturnsResponseSuffixedObject'
4444
xgen-IPA-104-get-method-response-has-no-input-fields:
45-
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'
46-
message: '{{error}} http://go/ipa/104'
45+
description: 'The Get method response object must not include writeOnly properties (fields that should be used only on creation or update, ie output fields).'
46+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-response-has-no-input-fields'
4747
severity: warn
4848
given: '$.paths[*].get.responses[*].content'
4949
then:
5050
field: '@key'
5151
function: 'getMethodResponseHasNoInputFields'
5252
xgen-IPA-104-get-method-no-request-body:
53-
description: 'The Get method request must not include a body. http://go/ipa/104'
54-
message: '{{error}} http://go/ipa/104'
53+
description: 'The Get method request must not include a body.'
54+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-get-method-no-request-body'
5555
severity: warn
5656
given: '$.paths[*].get'
5757
then:

tools/spectral/ipa/rulesets/IPA-105.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ functions:
99

1010
rules:
1111
xgen-IPA-105-list-method-response-code-is-200:
12-
description: 'The List method must return a 200 OK response. http://go/ipa/105'
13-
message: '{{error}} http://go/ipa/105'
12+
description: 'The List method must return a 200 OK response.'
13+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-105-list-method-response-code-is-200'
1414
severity: warn
1515
given: '$.paths[*].get'
1616
then:
1717
function: 'listResponseCodeShouldBe200OK'
1818
xgen-IPA-105-list-method-no-request-body:
19-
description: 'The List method request must not include a body. http://go/ipa/105'
20-
message: '{{error}} http://go/ipa/105'
19+
description: 'The List method request must not include a body.'
20+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-105-list-method-no-request-body'
2121
severity: warn
2222
given: '$.paths[*].get'
2323
then:
2424
function: 'listMethodHasNoRequestBody'
2525
xgen-IPA-105-resource-has-list:
26-
description: 'APIs must provide a List method for resources. http://go/ipa/105'
27-
message: '{{error}} http://go/ipa/105'
26+
description: 'APIs must provide a List method for resources.'
27+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-105-resource-has-list'
2828
severity: warn
2929
given: '$.paths'
3030
then:
@@ -44,7 +44,7 @@ rules:
4444
- A response is considered paginated if it contains an array property named `results`
4545
- Validation ignores resources without a Get method
4646
- Paths with `x-xgen-IPA-exception` for this rule are excluded from validation
47-
message: '{{error}} http://go/ipa-spectral#IPA-105'
47+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-105-list-method-response-is-get-method-response'
4848
severity: warn
4949
given: '$.paths[*].get.responses[*].content'
5050
then:

tools/spectral/ipa/rulesets/IPA-106.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ functions:
1111
rules:
1212
xgen-IPA-106-create-method-request-body-is-request-suffixed-object:
1313
description: >-
14-
The Create method request should be a Request suffixed object. http://go/ipa/106
14+
The Create method request should be a Request suffixed object.
1515
This rule applies only to POST requests targeting resource collection URIs.
16-
message: '{{error}} http://go/ipa/106'
16+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-request-body-is-request-suffixed-object'
1717
severity: warn
1818
given: '$.paths[*].post.requestBody.content'
1919
then:
2020
field: '@key'
2121
function: 'createMethodRequestBodyIsRequestSuffixedObject'
2222
xgen-IPA-106-create-method-should-not-have-query-parameters:
2323
description: >-
24-
Create operations should not use query parameters. http://go/ipa/106
24+
Create operations should not use query parameters.
2525
This rule applies only to POST requests targeting resource collection URIs.
26-
message: '{{error}} http://go/ipa/106'
26+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-should-not-have-query-parameters'
2727
severity: warn
2828
given: '$.paths[*].post'
2929
then:
@@ -32,10 +32,10 @@ rules:
3232
ignoredValues: ['pretty', 'envelope']
3333
xgen-IPA-106-create-method-request-body-is-get-method-response:
3434
description: >-
35-
Request body content of the Create method and response content of the Get method should refer to the same resource. http://go/ipa/106
35+
Request body content of the Create method and response content of the Get method should refer to the same resource.
3636
readOnly/writeOnly properties will be ignored.
3737
This rule applies only to POST requests targeting resource collection URIs.
38-
message: '{{error}} http://go/ipa/106'
38+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-request-body-is-get-method-response'
3939
severity: warn
4040
given: '$.paths[*].post.requestBody.content'
4141
then:
@@ -45,19 +45,19 @@ rules:
4545
ignoredValues: ['readOnly', 'writeOnly']
4646
xgen-IPA-106-create-method-request-has-no-readonly-fields:
4747
description: >-
48-
Create method Request object must not include fields with readOnly:true. http://go/ipa/106
48+
Create method Request object must not include fields with readOnly:true.
4949
This rule applies only to POST requests targeting resource collection URIs.
50-
message: '{{error}} http://go/ipa/106'
50+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-request-has-no-readonly-fields'
5151
severity: warn
5252
given: '$.paths[*].post.requestBody.content'
5353
then:
5454
field: '@key'
5555
function: 'createMethodRequestHasNoReadonlyFields'
5656
xgen-IPA-106-create-method-response-code-is-201:
5757
description: >-
58-
Create methods must return a 201 Created response code. http://go/ipa/106
58+
Create methods must return a 201 Created response code.
5959
This rule applies only to POST requests targeting resource collection URIs.
60-
message: '{{error}} http://go/ipa/106'
60+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-response-code-is-201'
6161
severity: warn
6262
given: '$.paths[*].post'
6363
then:

tools/spectral/ipa/rulesets/IPA-107.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rules:
1515
1616
- Query parameters `envelope` and `pretty` are exempt from this rule
1717
- Operation objects with `x-xgen-IPA-exception` for this rule are excluded from validation
18-
message: '{{error}} http://go/ipa-spectral#IPA-107'
18+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-107-put-must-not-have-query-params'
1919
severity: warn
2020
given: '$.paths[*].put'
2121
then:
@@ -32,7 +32,7 @@ rules:
3232
3333
- Query parameters `envelope` and `pretty` are exempt from this rule
3434
- Operation objects with `x-xgen-IPA-exception` for this rule are excluded from validation
35-
message: '{{error}} http://go/ipa-spectral#IPA-107'
35+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-107-patch-must-not-have-query-params'
3636
severity: warn
3737
given: '$.paths[*].patch'
3838
then:

tools/spectral/ipa/rulesets/IPA-108.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@
33

44
rules:
55
xgen-IPA-108-delete-response-should-be-empty:
6-
description: Delete method response should not have schema reference to object. http://go/ipa/108
7-
message: '{{error}} http://go/ipa/108'
6+
description: Delete method response should not have schema reference to object.
7+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-108-delete-response-should-be-empty'
88
severity: warn
99
given: $.paths[*].delete.responses[204]
1010
then:
1111
function: deleteMethodResponseShouldNotHaveSchema
1212

1313
xgen-IPA-108-delete-method-return-204-response:
14-
description: DELETE method must return 204 No Content. http://go/ipa/108
15-
message: '{{error}} http://go/ipa/108'
14+
description: DELETE method must return 204 No Content.
15+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-108-delete-method-return-204-response'
1616
severity: warn
1717
given: $.paths[*].delete
1818
then:
1919
function: deleteMethod204Response
2020

2121
xgen-IPA-108-delete-include-404-response:
22-
description: DELETE method must include 404 response and return it when resource not found. http://go/ipa/108
23-
message: '{{error}} http://go/ipa/108'
22+
description: DELETE method must include 404 response and return it when resource not found.
23+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-108-delete-include-404-response'
2424
severity: warn
2525
given: $.paths[*].delete
2626
then:
2727
function: deleteMethod404Response
2828

2929
xgen-IPA-108-delete-request-no-body:
30-
description: DELETE method must not have request body. http://go/ipa/108
31-
message: '{{error}} http://go/ipa/108'
30+
description: DELETE method must not have request body.
31+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-108-delete-request-no-body'
3232
severity: warn
3333
given: $.paths[*].delete
3434
then:

tools/spectral/ipa/rulesets/IPA-109.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ functions:
77

88
rules:
99
xgen-IPA-109-custom-method-must-be-GET-or-POST:
10-
description: 'The HTTP method for custom methods must be GET or POST. http://go/ipa/109'
11-
message: '{{error}} http://go/ipa/109'
10+
description: 'The HTTP method for custom methods must be GET or POST.'
11+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-109-custom-method-must-be-GET-or-POST'
1212
severity: error
1313
given: '$.paths[*]'
1414
then:
1515
function: 'eachCustomMethodMustBeGetOrPost'
1616

1717
xgen-IPA-109-custom-method-must-use-camel-case:
18-
description: 'The custom method must use camelCase format. http://go/ipa/109'
19-
message: '{{error}} http://go/ipa/109'
18+
description: 'The custom method must use camelCase format.'
19+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-109-custom-method-must-use-camel-case'
2020
severity: error
2121
given: '$.paths[*]'
2222
then:

tools/spectral/ipa/rulesets/IPA-113.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ functions:
66

77
rules:
88
xgen-IPA-113-singleton-must-not-have-id:
9-
description: 'Singleton resources must not have a user-provided or system-generated ID. http://go/ipa/113'
10-
message: '{{error}} http://go/ipa/113'
9+
description: 'Singleton resources must not have a user-provided or system-generated ID.'
10+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-113-singleton-must-not-have-id'
1111
severity: warn
1212
given: '$.paths[*]'
1313
then:

tools/spectral/ipa/rulesets/IPA-123.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ functions:
66

77
rules:
88
xgen-IPA-123-enum-values-must-be-upper-snake-case:
9-
description: 'Enum values must be UPPER_SNAKE_CASE. http://go/ipa/123'
10-
message: '{{error}} http://go/ipa/123'
9+
description: 'Enum values must be UPPER_SNAKE_CASE.'
10+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-123-enum-values-must-be-upper-snake-case'
1111
severity: error
1212
given: '$..enum'
1313
then:

0 commit comments

Comments
 (0)