Azure / Azure/azure-rest-api-specs

[SecurityInsight][bug] body parameter shall be `required`

Open
#22,729 1 comment 0 reactions 0 assignees View on GitHub
bug SecurityInsights Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

When I call the following API without body: https://github.com/Azure/azure-rest-api-specs/blob/4d150f815b378ea4eb60128e0b0458210a46d2ab/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-12-01-preview/OnboardingStates.json#L81-L111

I get the error:
```
(BadRequest) A non-empty request body is required.
```
But according to swagger definition, `SentinelOnboardingStateParameter` is not required:
https://github.com/Azure/azure-rest-api-specs/blob/4d150f815b378ea4eb60128e0b0458210a46d2ab/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-12-01-preview/OnboardingStates.json#L273-L284

So I think the swagger definition is not right, it shall be:
```json
...
"required": true,
...
```

Contributor guide

Open the contributing guide

Research direction

Open specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-12-01-preview/OnboardingStates.json and inspect the operation around lines 81-111 and SentinelOnboardingStateParameter around lines 273-284. Confirm the API requires a non-empty body, then update the parameter definition so its required setting matches that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.