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
suggestion: `Find this TypeSpec statement @@clientName(${definitionName}.${propertyName}, "${value}") in file back-compatible.tsp or client.tsp. Delete this statement.`,
suggestion: `Find a model called "${definitionName}". Add \`@${decoratorName}(${value})\` onto its property "${propertyName}". If the property cannot access directly, add \`@@${decoratorName}(${definitionName}.${propertyName}, ${value});\` right after the model.`,
73
+
path: constructJsonPath(path,key)
74
+
};
75
+
}
76
+
}
77
+
elseif(originalKey==='x-nullable'){
78
+
if((valueasany)===true&&property){
79
+
const[definitionName,propertyName]=property;
80
+
return{
81
+
suggestion: `Find a model called "${definitionName}". Change its property "${propertyName}" by adding \` | null\` to its property type.`,
82
+
path: constructJsonPath(path,key)
83
+
};
84
+
}
85
+
}
86
+
elseif(originalKey==="readOnly"){
87
+
if((valueasany)===true&&property){
88
+
const[definitionName,propertyName]=property;
89
+
return{
90
+
suggestion: `Find a model called "${definitionName}". Add \`@visibility(Lifecycle.Read)\` onto its property "${propertyName}". If the property cannot access directly, add \`@@visibility(${definitionName}.${propertyName}, Lifecycle.Read);\` RIGHT AFTER the end bracket of the model.`,
91
+
path: constructJsonPath(path,key)
92
+
};
93
+
}
94
+
}
95
+
elseif(originalKey==="x-ms-secret"){
96
+
if((valueasany)===true&&property){
97
+
const[definitionName,propertyName]=property;
98
+
return{
99
+
suggestion: `Find a model called "${definitionName}". Add \`@secret\` onto its property "${propertyName}". If the property cannot access directly, add \`@@secret(${definitionName}.${propertyName});\` right after the model.`,
100
+
path: constructJsonPath(path,key)
101
+
};
102
+
}
103
+
}
104
+
elseif(originalKey==="default"){
105
+
if(property){
106
+
const[definitionName,propertyName]=property;
107
+
return{
108
+
suggestion: `Find a model called "${definitionName}". Change its property "${propertyName}" by adding \` = ${typeofvalue==="string" ? `"${value}"` : value}\`.`,
suggestion: `Find this TypeSpec statement @@clientName(${definitionName}.${propertyName}, "${newValue}") in file back-compatible.tsp or client.tsp. Change it to @@clientName(${definitionName}.${propertyName}, "${oldValue}")`,
0 commit comments