Skip to content

Commit fc03158

Browse files
docs fix
1 parent d80ae56 commit fc03158

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

tools/spectral/ipa/__tests__/createMethodResponseIsGetMethodResponse.test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ testRule('xgen-IPA-106-create-method-response-is-get-method-response', [
227227
{
228228
code: 'xgen-IPA-106-create-method-response-is-get-method-response',
229229
message:
230-
'Could not validate that the Create method returns the same resource object as the Get method. The Get method does not have a schema. http://go/ipa-spectral#IPA-106',
230+
'Could not validate that the Create method returns the same resource object as the Get method. The Get method does not have a schema.',
231231
path: [
232232
'paths',
233233
'/resourcesOne',
@@ -242,7 +242,7 @@ testRule('xgen-IPA-106-create-method-response-is-get-method-response', [
242242
{
243243
code: 'xgen-IPA-106-create-method-response-is-get-method-response',
244244
message:
245-
'Could not validate that the Create method returns the same resource object as the Get method. The Get method does not have a schema reference. http://go/ipa-spectral#IPA-106',
245+
'Could not validate that the Create method returns the same resource object as the Get method. The Get method does not have a schema reference.',
246246
path: [
247247
'paths',
248248
'/resourcesTwo',
@@ -296,8 +296,7 @@ testRule('xgen-IPA-106-create-method-response-is-get-method-response', [
296296
errors: [
297297
{
298298
code: 'xgen-IPA-106-create-method-response-is-get-method-response',
299-
message:
300-
'The schema in the Create method response must be the same schema as the response of the Get method. http://go/ipa-spectral#IPA-106',
299+
message: 'The schema in the Create method response must be the same schema as the response of the Get method.',
301300
path: ['paths', '/resources', 'post', 'responses', '201', 'content', 'application/vnd.atlas.2024-08-05+json'],
302301
severity: DiagnosticSeverity.Warning,
303302
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ rules:
9090
- Validation ignores responses without schema
9191
- Validation ignores resources without a Get method
9292
- Paths with `x-xgen-IPA-exception` for this rule are excluded from validation
93-
message: '{{error}} http://go/ipa-spectral#IPA-106'
93+
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-106-create-method-response-is-get-method-response'
9494
severity: warn
9595
given: '$.paths[*].post.responses.201.content'
9696
then:

tools/spectral/ipa/rulesets/functions/createMethodResponseIsGetMethodResponse.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ function checkViolationsAndReturnErrors(path, createMethodResponseContent, getMe
6969
];
7070
}
7171

72-
console.log(getMethodResponseContent);
7372
const createMethodSchemaRef = getSchemaRef(createMethodResponseContent.schema);
7473
const getMethodSchemaRef = getSchemaRef(getMethodResponseContent.schema);
7574

0 commit comments

Comments
 (0)