Azure / Azure/azure-rest-api-specs

Security API Automations model, has location field incorrectly marked as readOnly

Open
#10,992 1 comment 0 reactions 0 assignees View on GitHub
Security Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

The location field of the Automations model
https://github.com/Azure/azure-rest-api-specs/blob/c1c45178f4a761b48f1778ac46cdd3304d7e33ef/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/automations.json#L319

Has a `Location` field which is referenced here
https://github.com/Azure/azure-rest-api-specs/blob/c1c45178f4a761b48f1778ac46cdd3304d7e33ef/specification/security/resource-manager/common/v1/types.json#L114

This is set to readOnly as true. This is a mistake, **this field is not read only** and is required by the API to be set when calling it on a create or update operation https://docs.microsoft.com/en-us/rest/api/securitycenter/automations/createorupdate

The downstream result of this is impacting the Go SDK for Azure making that package in the SDK non-functional, it always returns a 400 error `Code="LocationRequired" Message="The location property is required for this definition."`

See this issue https://github.com/Azure/azure-sdk-for-go/issues/12634

Contributor guide

Open the contributing guide

Research direction

Start with automations.json around line 319 and the referenced common/v1/types.json definition around line 114, then compare the location metadata with the Security Automations create-or-update API documentation. Update the specification metadata and run the repository's relevant validation; done means location is accepted for create and update operations without producing the reported LocationRequired error.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, security
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.