Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 759 Bytes

name-property-definition-in-parameter.md

File metadata and controls

46 lines (30 loc) · 759 Bytes

NamePropertyDefinitionInParameter

Category

SDK Error

Applies to

ARM and Data plane OpenAPI(swagger) specs

Output Message

Parameter Must have the "name" property defined with non-empty string as its value.

Description

A parameter must have a name property for the SDK to be properly generated.

Why the rule is important

AutoRest fails to generate code if the name property is not provided for a parameter.

How to fix the violation

Add a non-empty name property to the parameter.

Good Example

"MyParam":{
  "name":"myParam",
  "type": "string",
  "in": "path",
  "description": "sample param"
}

Bad Example

"MyParam":{
  "type": "string",
  "in": "path",
  "description": "sample param"
}