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
ArcturusZhang opened this issue
Nov 5, 2024
· 1 comment
Assignees
Labels
bugThis issue requires a change to an existing behavior in the product in order to be resolved.DPGMgmtThis issue is related to a management-plane library.
Here we have a parameter and its type is unknown, which accepts anything. In the example, its value is a json:
{
"free": "form",
"json": [1, 2, 3]
}
our rule of stringify-with-refs adds $id to everything which is an object, it does not care if the object is actually an object value in examples, therefore in the result json, you could see this json also has an $id.
As a result, this $id was deserialized into a dictionary as if the example value has it, and this leads to this: Azure/azure-sdk-for-net#46946 (comment)
This is a bug because we introduce values that do not exist in the example json, and we should fix it.
Even worse when the value has nested json object, it will become:
ArcturusZhang
added
Mgmt
This issue is related to a management-plane library.
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
DPG
labels
Nov 5, 2024
One possible solution of solving this might be overhauling all the functionalities from stringify-with-refs library into our own code, and this also contributes to this feature because we want to remove that dependency.
If we could control which model should be stringified with refs, this should be solved.
bugThis issue requires a change to an existing behavior in the product in order to be resolved.DPGMgmtThis issue is related to a management-plane library.
The examples might have raw values in them, and they might be json, for instance, in a case that the property takes
unknown
as its type.In this case, we will have:
Here we have a parameter and its type is
unknown
, which accepts anything. In the example, its value is a json:our rule of stringify-with-refs adds
$id
to everything which is an object, it does not care if the object is actually an object value in examples, therefore in the result json, you could see this json also has an$id
.As a result, this
$id
was deserialized into a dictionary as if the example value has it, and this leads to this: Azure/azure-sdk-for-net#46946 (comment)This is a bug because we introduce values that do not exist in the example json, and we should fix it.
Even worse when the value has nested json object, it will become:
therefore we have more
$id
properties in the value which is incorrect.The text was updated successfully, but these errors were encountered: