Azure / Azure/azure-rest-api-specs

[bug][network] swagger definition doesn't follow server behavior

Open
#32,836 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Network Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
6k
Avg merge
2d 21h
Merged PRs (30d)
432

Description

For REST API https://github.com/Azure/azure-rest-api-specs/blob/b34740ddec859f5a55ba176a3ccba39335b16ad4/specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/loadBalancer.json#L1464-L1536

Its real service response is:

{
  "up": 1,
  "down": 1,
  "loadBalancerBackendAddresses": [
    {
      "ipAddress": "<REDACTED>",
      "networkInterfaceIPConfigurationId": "/subscriptions/<REDACTED>/resourceGroups/<REDACTED>/providers/Microsoft.Network/networkInterfaces/<REDACTED>/ipConfigurations/sslvpn",
      "state": "Up",
      "reason": "Up_Probe_Success"
    },
    {
      "ipAddress": "<REDACTED>",
      "networkInterfaceIPConfigurationId": "/subscriptions/<REDACTED>/resourceGroups/<REDACTED>/providers/Microsoft.Network/networkInterfaces/<REDACTED>/ipConfigurations/failover",
      "state": "Down",
      "reason": "Down_Probe_TcpProbeTimeout"
    }
  ]
}

We can see that for networkInterfaceIPConfigurationId, its swagger definition is object however the real response is string which doesn't correspond.

Expected behavior

Swagger definition shall follow real service behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/loadBalancer.json and compare the response definition at lines 1464-1536 with the networkInterfaceIPConfigurationId definition at lines 2842-2844. Verify the service response shape shown in the issue, then update the specification so the schema matches it and confirm the API specification remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.