Skip to content

Commit 94b80e1

Browse files
ipa docs fix
1 parent 53ba63d commit 94b80e1

File tree

2 files changed

+42
-17
lines changed

2 files changed

+42
-17
lines changed

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

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ rules:
1212
xgen-IPA-106-create-method-request-body-is-request-suffixed-object:
1313
description: >-
1414
The Create method request should be a Request suffixed object. http://go/ipa/106
15-
This rule applies only to POST requests targeting resource collection URIs.
16-
message: '{{error}} http://go/ipa/106'
15+
16+
##### Implementation details
17+
18+
Validation checks the POST method for resource collection paths.
19+
message: '{{error}} http://go/ipa-spectral#IPA-106'
1720
severity: warn
1821
given: '$.paths[*].post.requestBody.content'
1922
then:
@@ -22,19 +25,25 @@ rules:
2225
xgen-IPA-106-create-method-should-not-have-query-parameters:
2326
description: >-
2427
Create operations should not use query parameters. http://go/ipa/106
25-
This rule applies only to POST requests targeting resource collection URIs.
26-
message: '{{error}} http://go/ipa/106'
28+
29+
##### Implementation details
30+
31+
Validation checks the POST method for resource collection paths.
32+
message: '{{error}} http://go/ipa-spectral#IPA-106'
2733
severity: warn
2834
given: '$.paths[*].post'
2935
then:
3036
function: 'createMethodShouldNotHaveQueryParameters'
3137
xgen-IPA-106-create-method-request-body-is-get-method-response:
3238
description: >-
3339
Request body content of the Create method and response content of the Get method should refer to the same resource. http://go/ipa/106
34-
readOnly:true properties of Get method response will be ignored.
35-
writeOnly:true properties of Create method request will be ignored.
36-
This rule applies only to POST requests targeting resource collection URIs.
37-
message: '{{error}} http://go/ipa/106'
40+
41+
##### Implementation details
42+
43+
Validation checks the POST method for resource collection paths.
44+
- `readOnly:true` properties of Get method response will be ignored.
45+
- `writeOnly:true` properties of Create method request will be ignored.
46+
message: '{{error}} http://go/ipa-spectral#IPA-106'
3847
severity: warn
3948
given: '$.paths[*].post.requestBody.content'
4049
then:
@@ -43,8 +52,11 @@ rules:
4352
xgen-IPA-106-create-method-request-has-no-readonly-fields:
4453
description: >-
4554
Create method Request object must not include fields with readOnly:true. http://go/ipa/106
46-
This rule applies only to POST requests targeting resource collection URIs.
47-
message: '{{error}} http://go/ipa/106'
55+
56+
##### Implementation details
57+
58+
Validation checks the POST method for resource collection paths.
59+
message: '{{error}} http://go/ipa-spectral#IPA-106'
4860
severity: warn
4961
given: '$.paths[*].post.requestBody.content'
5062
then:
@@ -53,8 +65,11 @@ rules:
5365
xgen-IPA-106-create-method-response-code-is-201:
5466
description: >-
5567
Create methods must return a 201 Created response code. http://go/ipa/106
56-
This rule applies only to POST requests targeting resource collection URIs.
57-
message: '{{error}} http://go/ipa/106'
68+
69+
##### Implementation details
70+
71+
Validation checks the POST method for resource collection paths.
72+
message: '{{error}} http://go/ipa-spectral#IPA-106'
5873
severity: warn
5974
given: '$.paths[*].post'
6075
then:

tools/spectral/ipa/rulesets/README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,23 +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 This rule applies only to POST requests targeting resource collection URIs.
126+
The Create method request should be a Request suffixed object. http://go/ipa/106
127+
##### Implementation details
128+
Validation checks the POST method for resource collection paths.
127129
#### xgen-IPA-106-create-method-should-not-have-query-parameters
128130

129131
![warn](https://img.shields.io/badge/warning-yellow)
130-
Create operations should not use query parameters. http://go/ipa/106 This rule applies only to POST requests targeting resource collection URIs.
132+
Create operations should not use query parameters. http://go/ipa/106
133+
##### Implementation details
134+
Validation checks the POST method for resource collection paths.
131135
#### xgen-IPA-106-create-method-request-body-is-get-method-response
132136

133137
![warn](https://img.shields.io/badge/warning-yellow)
134-
Request body content of the Create method and response content of the Get method should refer to the same resource. http://go/ipa/106 readOnly:true properties of Get method response will be ignored. writeOnly:true properties of Create method request will be ignored. This rule applies only to POST requests targeting resource collection URIs.
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
139+
##### Implementation details
140+
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.
135141
#### xgen-IPA-106-create-method-request-has-no-readonly-fields
136142

137143
![warn](https://img.shields.io/badge/warning-yellow)
138-
Create method Request object must not include fields with readOnly:true. http://go/ipa/106 This rule applies only to POST requests targeting resource collection URIs.
144+
Create method Request object must not include fields with readOnly:true. http://go/ipa/106
145+
##### Implementation details
146+
Validation checks the POST method for resource collection paths.
139147
#### xgen-IPA-106-create-method-response-code-is-201
140148

141149
![warn](https://img.shields.io/badge/warning-yellow)
142-
Create methods must return a 201 Created response code. http://go/ipa/106 This rule applies only to POST requests targeting resource collection URIs.
150+
Create methods must return a 201 Created response code. http://go/ipa/106
151+
##### Implementation details
152+
Validation checks the POST method for resource collection paths.
143153

144154

145155
### IPA-108

0 commit comments

Comments
 (0)