Skip to content

Commit 4c12229

Browse files
Apply suggestions from code review
Co-authored-by: Lovisa Berggren <[email protected]>
1 parent a5d9157 commit 4c12229

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ testRule('xgen-IPA-108-delete-response-should-be-empty', [
1818
errors: [],
1919
},
2020
{
21-
name: 'valid DELETE with void 204',
21+
name: 'valid DELETE with void 204 versioned',
2222
document: {
2323
paths: {
2424
'/resource/{id}': {
@@ -62,7 +62,7 @@ testRule('xgen-IPA-108-delete-response-should-be-empty', [
6262
{
6363
code: 'xgen-IPA-108-delete-response-should-be-empty',
6464
message:
65-
'DELETE method should return an empty response. The response should not have a schema property and reference to models http://go/ipa/108',
65+
'DELETE method should return an empty response. The response should not have a schema property and reference to models. http://go/ipa/108',
6666
path: ['paths', '/resource/{id}', 'delete'],
6767
severity: DiagnosticSeverity.Warning,
6868
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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
6+
description: Delete method response should not have schema reference to object. http://go/ipa/108
77
message: '{{error}} http://go/ipa/108'
88
severity: warn
99
given: $.paths[*].delete

tools/spectral/ipa/rulesets/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ For rule definitions, see [IPA-106.yaml](https://github.com/mongodb/openapi/blob
4646

4747
For rule definitions, see [IPA-108.yaml](https://github.com/mongodb/openapi/blob/main/tools/spectral/ipa/rulesets/IPA-108.yaml).
4848

49-
| Rule Name | Description | Severity |
50-
| -------------------------------------------- | ----------------------------------------------------------------------------------- | -------- |
51-
| xgen-IPA-108-delete-response-should-be-empty | Delete method response should not have schema reference to object http://go/ipa/108 | warn |
49+
| Rule Name | Description | Severity |
50+
| -------------------------------------------- | ------------------------------------------------------------------------------------ | -------- |
51+
| xgen-IPA-108-delete-response-should-be-empty | Delete method response should not have schema reference to object. http://go/ipa/108 | warn |
5252

5353
### IPA-109
5454

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { collectAdoption, collectAndReturnViolation, collectException } from './
33

44
const RULE_NAME = 'xgen-IPA-108-delete-response-should-be-empty';
55
const ERROR_MESSAGE =
6-
'DELETE method should return an empty response. The response should not have a schema property and reference to models';
6+
'DELETE method should return an empty response. The response should not have a schema property and reference to models.';
77

88
/**
99
* Delete method should return an empty response

0 commit comments

Comments
 (0)