Skip to content

Commit ed59c19

Browse files
ipa docs fix
1 parent f97156f commit ed59c19

7 files changed

+36
-36
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -393,56 +393,56 @@ testRule('xgen-IPA-106-create-method-request-body-is-get-method-response', [
393393
{
394394
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
395395
message:
396-
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa/106',
396+
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106',
397397
path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
398398
severity: DiagnosticSeverity.Warning,
399399
},
400400
{
401401
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
402402
message:
403-
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa/106',
403+
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106',
404404
path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'],
405405
severity: DiagnosticSeverity.Warning,
406406
},
407407
{
408408
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
409409
message:
410-
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa/106',
410+
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106',
411411
path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
412412
severity: DiagnosticSeverity.Warning,
413413
},
414414
{
415415
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
416416
message:
417-
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa/106',
417+
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106',
418418
path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'],
419419
severity: DiagnosticSeverity.Warning,
420420
},
421421
{
422422
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
423423
message:
424-
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa/106',
424+
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106',
425425
path: ['paths', '/resourceThree', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
426426
severity: DiagnosticSeverity.Warning,
427427
},
428428
{
429429
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
430430
message:
431-
'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/106',
431+
'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',
432432
path: ['paths', '/resourceFour', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
433433
severity: DiagnosticSeverity.Warning,
434434
},
435435
{
436436
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
437437
message:
438-
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa/106',
438+
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106',
439439
path: ['paths', '/resourceCircular', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
440440
severity: DiagnosticSeverity.Warning,
441441
},
442442
{
443443
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
444444
message:
445-
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa/106',
445+
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106',
446446
path: ['paths', '/resourceCircular', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'],
447447
severity: DiagnosticSeverity.Warning,
448448
},
@@ -492,14 +492,14 @@ testRule('xgen-IPA-106-create-method-request-body-is-get-method-response', [
492492
{
493493
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
494494
message:
495-
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa/106',
495+
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106',
496496
path: ['paths', '/animalResource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
497497
severity: DiagnosticSeverity.Warning,
498498
},
499499
{
500500
code: 'xgen-IPA-106-create-method-request-body-is-get-method-response',
501501
message:
502-
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa/106',
502+
'The request body schema properties must match the response body schema properties of the Get method. http://go/ipa-spectral#IPA-106',
503503
path: ['paths', '/animalResource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'],
504504
severity: DiagnosticSeverity.Warning,
505505
},

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,31 +154,31 @@ testRule('xgen-IPA-106-create-method-request-body-is-request-suffixed-object', [
154154
errors: [
155155
{
156156
code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object',
157-
message: 'The response body schema must reference a schema with a Request suffix. http://go/ipa/106',
157+
message: 'The response body schema must reference a schema with a Request suffix. http://go/ipa-spectral#IPA-106',
158158
path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
159159
severity: DiagnosticSeverity.Warning,
160160
},
161161
{
162162
code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object',
163-
message: 'The response body schema must reference a schema with a Request suffix. http://go/ipa/106',
163+
message: 'The response body schema must reference a schema with a Request suffix. http://go/ipa-spectral#IPA-106',
164164
path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'],
165165
severity: DiagnosticSeverity.Warning,
166166
},
167167
{
168168
code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object',
169-
message: 'The response body schema must reference a schema with a Request suffix. http://go/ipa/106',
169+
message: 'The response body schema must reference a schema with a Request suffix. http://go/ipa-spectral#IPA-106',
170170
path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
171171
severity: DiagnosticSeverity.Warning,
172172
},
173173
{
174174
code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object',
175-
message: 'The response body schema must reference a schema with a Request suffix. http://go/ipa/106',
175+
message: 'The response body schema must reference a schema with a Request suffix. http://go/ipa-spectral#IPA-106',
176176
path: ['paths', '/resourceTwo', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'],
177177
severity: DiagnosticSeverity.Warning,
178178
},
179179
{
180180
code: 'xgen-IPA-106-create-method-request-body-is-request-suffixed-object',
181-
message: 'The response body schema is defined inline and must reference a predefined schema. http://go/ipa/106',
181+
message: 'The response body schema is defined inline and must reference a predefined schema. http://go/ipa-spectral#IPA-106',
182182
path: ['paths', '/resourceThree', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
183183
severity: DiagnosticSeverity.Warning,
184184
},

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ testRule('xgen-IPA-106-create-method-request-has-no-readonly-fields', [
152152
{
153153
code: 'xgen-IPA-106-create-method-request-has-no-readonly-fields',
154154
message:
155-
'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: id. http://go/ipa/106',
155+
'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: id. http://go/ipa-spectral#IPA-106',
156156
path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
157157
severity: DiagnosticSeverity.Warning,
158158
},
159159
{
160160
code: 'xgen-IPA-106-create-method-request-has-no-readonly-fields',
161161
message:
162-
'The Create method request object must not include input fields (readOnly properties). Found readOnly property at one of the inline schemas. http://go/ipa/106',
162+
'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',
163163
path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2024-01-01+json'],
164164
severity: DiagnosticSeverity.Warning,
165165
},
@@ -192,7 +192,7 @@ testRule('xgen-IPA-106-create-method-request-has-no-readonly-fields', [
192192
{
193193
code: 'xgen-IPA-106-create-method-request-has-no-readonly-fields',
194194
message:
195-
'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: user.userId. http://go/ipa/106',
195+
'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: user.userId. http://go/ipa-spectral#IPA-106',
196196
path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
197197
severity: DiagnosticSeverity.Warning,
198198
},
@@ -225,7 +225,7 @@ testRule('xgen-IPA-106-create-method-request-has-no-readonly-fields', [
225225
{
226226
code: 'xgen-IPA-106-create-method-request-has-no-readonly-fields',
227227
message:
228-
'The Create method request object must not include input fields (readOnly properties). Found readOnly property at: items.items.itemId. http://go/ipa/106',
228+
'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',
229229
path: ['paths', '/resource', 'post', 'requestBody', 'content', 'application/vnd.atlas.2023-01-01+json'],
230230
severity: DiagnosticSeverity.Warning,
231231
},

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,21 @@ testRule('xgen-IPA-106-create-method-response-code-is-201', [
7474
{
7575
code: 'xgen-IPA-106-create-method-response-code-is-201',
7676
message:
77-
'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/106',
77+
'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',
7878
path: ['paths', '/resourceOne', 'post'],
7979
severity: DiagnosticSeverity.Warning,
8080
},
8181
{
8282
code: 'xgen-IPA-106-create-method-response-code-is-201',
8383
message:
84-
'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/106',
84+
'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',
8585
path: ['paths', '/resourceTwo', 'post'],
8686
severity: DiagnosticSeverity.Warning,
8787
},
8888
{
8989
code: 'xgen-IPA-106-create-method-response-code-is-201',
9090
message:
91-
'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/106',
91+
'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',
9292
path: ['paths', '/resourceThree', 'post'],
9393
severity: DiagnosticSeverity.Warning,
9494
},

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,20 @@ testRule('xgen-IPA-106-create-method-should-not-have-query-parameters', [
120120
errors: [
121121
{
122122
code: 'xgen-IPA-106-create-method-should-not-have-query-parameters',
123-
message: 'Input parameter [filter]: Create operations should not have query parameters. http://go/ipa/106',
123+
message: 'Input parameter [filter]: Create operations should not have query parameters. http://go/ipa-spectral#IPA-106',
124124
path: ['paths', '/resource', 'post'],
125125
severity: DiagnosticSeverity.Warning,
126126
},
127127
{
128128
code: 'xgen-IPA-106-create-method-should-not-have-query-parameters',
129-
message: 'Input parameter [query-param]: Create operations should not have query parameters. http://go/ipa/106',
129+
message: 'Input parameter [query-param]: Create operations should not have query parameters. http://go/ipa-spectral#IPA-106',
130130
path: ['paths', '/resourceTwo', 'post'],
131131
severity: DiagnosticSeverity.Warning,
132132
},
133133
{
134134
code: 'xgen-IPA-106-create-method-should-not-have-query-parameters',
135135
message:
136-
'Input parameter [query-param-2]: Create operations should not have query parameters. http://go/ipa/106',
136+
'Input parameter [query-param-2]: Create operations should not have query parameters. http://go/ipa-spectral#IPA-106',
137137
path: ['paths', '/resourceTwo', 'post'],
138138
severity: DiagnosticSeverity.Warning,
139139
},

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# IPA-106: Create
2-
# http://go/ipa/106
2+
# http://go/ipa-spectral#IPA-106
33

44
functions:
55
- createMethodRequestBodyIsRequestSuffixedObject
@@ -11,7 +11,7 @@ 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
1616
##### Implementation details
1717
@@ -24,7 +24,7 @@ rules:
2424
function: 'createMethodRequestBodyIsRequestSuffixedObject'
2525
xgen-IPA-106-create-method-should-not-have-query-parameters:
2626
description: >-
27-
Create operations should not use query parameters. http://go/ipa/106
27+
Create operations should not use query parameters.
2828
2929
##### Implementation details
3030
@@ -36,7 +36,7 @@ rules:
3636
function: 'createMethodShouldNotHaveQueryParameters'
3737
xgen-IPA-106-create-method-request-body-is-get-method-response:
3838
description: >-
39-
Request body content of the Create method and response content of the Get method should refer to the same resource. http://go/ipa/106
39+
Request body content of the Create method and response content of the Get method should refer to the same resource.
4040
4141
##### Implementation details
4242
@@ -51,7 +51,7 @@ rules:
5151
function: 'createMethodRequestBodyIsGetResponse'
5252
xgen-IPA-106-create-method-request-has-no-readonly-fields:
5353
description: >-
54-
Create method Request object must not include fields with readOnly:true. http://go/ipa/106
54+
Create method Request object must not include fields with readOnly:true.
5555
5656
##### Implementation details
5757
@@ -64,7 +64,7 @@ rules:
6464
function: 'createMethodRequestHasNoReadonlyFields'
6565
xgen-IPA-106-create-method-response-code-is-201:
6666
description: >-
67-
Create methods must return a 201 Created response code. http://go/ipa/106
67+
Create methods must return a 201 Created response code.
6868
6969
##### Implementation details
7070

tools/spectral/ipa/rulesets/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,33 +123,33 @@ Rule is based on [http://go/ipa/IPA-106](http://go/ipa/IPA-106).
123123
#### xgen-IPA-106-create-method-request-body-is-request-suffixed-object
124124

125125
![warn](https://img.shields.io/badge/warning-yellow)
126-
The Create method request should be a Request suffixed object. http://go/ipa/106
126+
The Create method request should be a Request suffixed object.
127127
##### Implementation details
128128
Validation checks the POST method for resource collection paths.
129129
#### xgen-IPA-106-create-method-should-not-have-query-parameters
130130

131131
![warn](https://img.shields.io/badge/warning-yellow)
132-
Create operations should not use query parameters. http://go/ipa/106
132+
Create operations should not use query parameters.
133133
##### Implementation details
134134
Validation checks the POST method for resource collection paths.
135135
#### xgen-IPA-106-create-method-request-body-is-get-method-response
136136

137137
![warn](https://img.shields.io/badge/warning-yellow)
138-
Request body content of the Create method and response content of the Get method should refer to the same resource. http://go/ipa/106
138+
Request body content of the Create method and response content of the Get method should refer to the same resource.
139139
##### Implementation details
140140
Validation checks the POST method for resource collection paths.
141141
- `readOnly:true` properties of Get method response will be ignored.
142142
- `writeOnly:true` properties of Create method request will be ignored.
143143
#### xgen-IPA-106-create-method-request-has-no-readonly-fields
144144

145145
![warn](https://img.shields.io/badge/warning-yellow)
146-
Create method Request object must not include fields with readOnly:true. http://go/ipa/106
146+
Create method Request object must not include fields with readOnly:true.
147147
##### Implementation details
148148
Validation checks the POST method for resource collection paths.
149149
#### xgen-IPA-106-create-method-response-code-is-201
150150

151151
![warn](https://img.shields.io/badge/warning-yellow)
152-
Create methods must return a 201 Created response code. http://go/ipa/106
152+
Create methods must return a 201 Created response code.
153153
##### Implementation details
154154
Validation checks the POST method for resource collection paths.
155155

0 commit comments

Comments
 (0)