You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Links: [Index](#index) | [Error vs. Warning](#error-vs-warning) | [Automated Rules](#automated-rules) | [RPC](#rpc-violations): [Errors](#rpc-errors) or [Warnings](#rpc-warnings) | [SDK](#sdk-violations): [Errors](#sdk-errors) or [Warnings](#sdk-warnings)
588
587
589
588
### <aname="R2004" />R2004 NonApplicationJsonType
590
-
**Output Message**: Please make sure that media types other than 'application/json' are supported by your service.
589
+
**Output Message**: Only content-type 'application/json' is supported by ARM..
591
590
592
591
**Description**: Verifies whether operation supports "application/json" as consumes or produces section.
593
592
594
-
**Why the rule is important**: Per the ARM SDK guidelines, the AutoRest is used to generated the language SDKs. All the supported language generator currently handles "application/json" but some SDKs may support other content-types. This rule is in place to warn the swagger writter that not all the SDKs would work with other content-types.
593
+
**Why the rule is important**: Per [ARM SDK guidelines](https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-details.md#client-request-headers) only content-type 'application/json' is supported.
595
594
596
-
**How to fix the violation**: Please consult with AutoRest to ensure that the content type desired can be supported.
597
-
598
-
**Impact on generated code**: If the other than `application/json` type is provided, not all SDKs would support that content-type.
595
+
**How to fix the violation**: Make sure to include only 'application/json' in the spec consumes/produces. Make sure your service supports 'application/json'.
Links: [Index](#index) | [Error vs. Warning](#error-vs-warning) | [Automated Rules](#automated-rules) | [RPC](#rpc-violations): [Errors](#rpc-errors) or [Warnings](#rpc-warnings) | [SDK](#sdk-violations): [Errors](#sdk-errors) or [Warnings](#sdk-warnings)
1268
1265
1269
-
### <aname="R2061" />R2061 ParameterizeProperties
1270
-
**Output Message**: Type values \"{0}\" have default value(s), please consider parameterizing them
1271
-
1272
-
**Description**: Path URLs must be of the form `/subscriptions/{subscriptionId}/providers/<ProviderName>/typename/{typevalue}`, i.e., typevalues must be parameterized.
1273
-
1274
-
**Why the rule is important**: Path URLs should follow a consistent pattern across RPs. Consistent URL patterns also ensure determination of a resource from the URL and in turn trigger other resource related rules.
1275
-
1276
-
**How to fix the violation**: Parameterize all type values as path parameters.
"description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.",
1298
-
"maxLength": 24,
1299
-
"minLength": 3
1300
-
},
1301
-
...
1302
-
1303
-
}
1304
-
}
1305
-
```
1306
-
1307
-
Links: [Index](#index) | [Error vs. Warning](#error-vs-warning) | [Automated Rules](#automated-rules) | [RPC](#rpc-violations): [Errors](#rpc-errors) or [Warnings](#rpc-warnings) | [SDK](#sdk-violations): [Errors](#sdk-errors) or [Warnings](#sdk-warnings)
**Output Message**: OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to '{0}Model'. Consider using the plural form of '{1}' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
0 commit comments