Skip to content

Commit 18fbb30

Browse files
committed
fix: remove redundant line breaks
1 parent 4dce501 commit 18fbb30

File tree

2 files changed

+17
-69
lines changed

2 files changed

+17
-69
lines changed

tools/spectral/ipa/rulesets/README.md

Lines changed: 16 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,14 @@ Rule checks for the following conditions:
2424
- This rule itself does not allow exceptions
2525

2626

27-
28-
2927
### IPA-102
3028

3129
Rule is based on [http://go/ipa/IPA-102](http://go/ipa/IPA-102).
3230

3331
#### xgen-IPA-102-path-alternate-resource-name-path-param
3432

3533
![error](https://img.shields.io/badge/error-red)
36-
Paths should alternate between resource names and path params. http://go/ipa/102
37-
38-
#### xgen-IPA-102-collection-identifier-camelCase
34+
Paths should alternate between resource names and path params. http://go/ipa/102#### xgen-IPA-102-collection-identifier-camelCase
3935

4036
![warn](https://img.shields.io/badge/warning-yellow)
4137
Collection identifiers must be in camelCase.
@@ -50,145 +46,101 @@ Collection identifiers must be in camelCase.
5046
argument to the rule
5147
- Paths with `x-xgen-IPA-exception` for this rule are excluded from validation
5248
- Double slashes (//) are not allowed in paths
53-
54-
5549
#### xgen-IPA-102-collection-identifier-pattern
5650

5751
![warn](https://img.shields.io/badge/warning-yellow)
5852
Collection identifiers must begin with a lowercase letter and contain only ASCII letters and numbers. http://go/ipa/102
5953

60-
61-
6254
### IPA-104
6355

6456
Rule is based on [http://go/ipa/IPA-104](http://go/ipa/IPA-104).
6557

6658
#### xgen-IPA-104-resource-has-GET
6759

6860
![warn](https://img.shields.io/badge/warning-yellow)
69-
APIs must provide a Get method for resources. http://go/ipa/104
70-
71-
#### xgen-IPA-104-get-method-returns-single-resource
61+
APIs must provide a Get method for resources. http://go/ipa/104#### xgen-IPA-104-get-method-returns-single-resource
7262

7363
![warn](https://img.shields.io/badge/warning-yellow)
74-
The purpose of the Get method is to return data from a single resource. http://go/ipa/104
75-
76-
#### xgen-IPA-104-get-method-response-code-is-200
64+
The purpose of the Get method is to return data from a single resource. http://go/ipa/104#### xgen-IPA-104-get-method-response-code-is-200
7765

7866
![warn](https://img.shields.io/badge/warning-yellow)
79-
The Get method must return a 200 OK response. http://go/ipa/104
80-
81-
#### xgen-IPA-104-get-method-returns-response-suffixed-object
67+
The Get method must return a 200 OK response. http://go/ipa/104#### xgen-IPA-104-get-method-returns-response-suffixed-object
8268

8369
![warn](https://img.shields.io/badge/warning-yellow)
84-
The Get method of a resource should return a "Response" suffixed object. http://go/ipa/104
85-
86-
#### xgen-IPA-104-get-method-response-has-no-input-fields
70+
The Get method of a resource should return a "Response" suffixed object. http://go/ipa/104#### xgen-IPA-104-get-method-response-has-no-input-fields
8771

8872
![warn](https://img.shields.io/badge/warning-yellow)
89-
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
90-
91-
#### xgen-IPA-104-get-method-no-request-body
73+
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#### xgen-IPA-104-get-method-no-request-body
9274

9375
![warn](https://img.shields.io/badge/warning-yellow)
9476
The Get method request must not include a body. http://go/ipa/104
9577

96-
97-
9878
### IPA-105
9979

10080
Rule is based on [http://go/ipa/IPA-105](http://go/ipa/IPA-105).
10181

10282
#### xgen-IPA-105-list-method-response-code-is-200
10383

10484
![warn](https://img.shields.io/badge/warning-yellow)
105-
The List method must return a 200 OK response. http://go/ipa/105
106-
107-
#### xgen-IPA-105-list-method-no-request-body
85+
The List method must return a 200 OK response. http://go/ipa/105#### xgen-IPA-105-list-method-no-request-body
10886

10987
![warn](https://img.shields.io/badge/warning-yellow)
110-
The List method request must not include a body. http://go/ipa/105
111-
112-
#### xgen-IPA-105-resource-has-list
88+
The List method request must not include a body. http://go/ipa/105#### xgen-IPA-105-resource-has-list
11389

11490
![warn](https://img.shields.io/badge/warning-yellow)
11591
APIs must provide a List method for resources. http://go/ipa/105
11692

117-
118-
11993
### IPA-106
12094

12195
Rule is based on [http://go/ipa/IPA-106](http://go/ipa/IPA-106).
12296

12397
#### xgen-IPA-106-create-method-request-body-is-request-suffixed-object
12498

12599
![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.
127-
128-
#### xgen-IPA-106-create-method-should-not-have-query-parameters
100+
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.#### xgen-IPA-106-create-method-should-not-have-query-parameters
129101

130102
![warn](https://img.shields.io/badge/warning-yellow)
131-
Create operations should not use query parameters. http://go/ipa/106 This rule applies only to POST requests targeting resource collection URIs.
132-
133-
#### xgen-IPA-106-create-method-request-body-is-get-method-response
103+
Create operations should not use query parameters. http://go/ipa/106 This rule applies only to POST requests targeting resource collection URIs.#### xgen-IPA-106-create-method-request-body-is-get-method-response
134104

135105
![warn](https://img.shields.io/badge/warning-yellow)
136-
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/writeOnly properties will be ignored. This rule applies only to POST requests targeting resource collection URIs.
137-
138-
#### xgen-IPA-106-create-method-request-has-no-readonly-fields
106+
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/writeOnly properties will be ignored. This rule applies only to POST requests targeting resource collection URIs.#### xgen-IPA-106-create-method-request-has-no-readonly-fields
139107

140108
![warn](https://img.shields.io/badge/warning-yellow)
141-
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.
142-
143-
#### xgen-IPA-106-create-method-response-code-is-201
109+
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.#### xgen-IPA-106-create-method-response-code-is-201
144110

145111
![warn](https://img.shields.io/badge/warning-yellow)
146112
Create methods must return a 201 Created response code. http://go/ipa/106 This rule applies only to POST requests targeting resource collection URIs.
147113

148-
149-
150114
### IPA-108
151115

152116
Rule is based on [http://go/ipa/IPA-108](http://go/ipa/IPA-108).
153117

154118
#### xgen-IPA-108-delete-response-should-be-empty
155119

156120
![warn](https://img.shields.io/badge/warning-yellow)
157-
Delete method response should not have schema reference to object. http://go/ipa/108
158-
159-
#### xgen-IPA-108-delete-method-return-204-response
121+
Delete method response should not have schema reference to object. http://go/ipa/108#### xgen-IPA-108-delete-method-return-204-response
160122

161123
![warn](https://img.shields.io/badge/warning-yellow)
162-
DELETE method must return 204 No Content. http://go/ipa/108
163-
164-
#### xgen-IPA-108-delete-include-404-response
124+
DELETE method must return 204 No Content. http://go/ipa/108#### xgen-IPA-108-delete-include-404-response
165125

166126
![warn](https://img.shields.io/badge/warning-yellow)
167-
DELETE method must include 404 response and return it when resource not found. http://go/ipa/108
168-
169-
#### xgen-IPA-108-delete-request-no-body
127+
DELETE method must include 404 response and return it when resource not found. http://go/ipa/108#### xgen-IPA-108-delete-request-no-body
170128

171129
![warn](https://img.shields.io/badge/warning-yellow)
172130
DELETE method must not have request body. http://go/ipa/108
173131

174-
175-
176132
### IPA-109
177133

178134
Rule is based on [http://go/ipa/IPA-109](http://go/ipa/IPA-109).
179135

180136
#### xgen-IPA-109-custom-method-must-be-GET-or-POST
181137

182138
![error](https://img.shields.io/badge/error-red)
183-
The HTTP method for custom methods must be GET or POST. http://go/ipa/109
184-
185-
#### xgen-IPA-109-custom-method-must-use-camel-case
139+
The HTTP method for custom methods must be GET or POST. http://go/ipa/109#### xgen-IPA-109-custom-method-must-use-camel-case
186140

187141
![error](https://img.shields.io/badge/error-red)
188142
The custom method must use camelCase format. http://go/ipa/109
189143

190-
191-
192144
### IPA-113
193145

194146
Rule is based on [http://go/ipa/IPA-113](http://go/ipa/IPA-113).
@@ -198,8 +150,6 @@ Rule is based on [http://go/ipa/IPA-113](http://go/ipa/IPA-113).
198150
![warn](https://img.shields.io/badge/warning-yellow)
199151
Singleton resources must not have a user-provided or system-generated ID. http://go/ipa/113
200152

201-
202-
203153
### IPA-123
204154

205155
Rule is based on [http://go/ipa/IPA-123](http://go/ipa/IPA-123).
@@ -210,5 +160,3 @@ Rule is based on [http://go/ipa/IPA-123](http://go/ipa/IPA-123).
210160
Enum values must be UPPER_SNAKE_CASE. http://go/ipa/123
211161

212162

213-
214-

tools/spectral/ipa/scripts/generateRulesetReadme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function generateRulesetSections(rules) {
6060

6161
sortedRuleEntries.forEach((rule) => {
6262
const severityFormatted = formatSeverity(rule.severity);
63-
sections += `#### ${rule.name}\n\n ${severityFormatted} \n${rule.description}\n\n`;
63+
sections += `#### ${rule.name}\n\n ${severityFormatted} \n${rule.description}`;
6464
});
6565

6666
return sections;

0 commit comments

Comments
 (0)