Azure / Azure/azure-rest-api-specs

[Bicep] Microsoft.DevTestLab/schedules "properties" field is marked as required

Open
#12,173 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Devtestlab Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
6k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

Originally reported here: https://github.com/Azure/bicep/issues/784#issuecomment-748209810.

The "properties" field as marked as "required", even though none of the fields inside are technically required. Is there a reason for this, or can we relax the validation?

Here's the place in the swagger spec where it's being marked as "required":
https://github.com/Azure/azure-rest-api-specs/blob/5a6276c5d71420c445bd0951d2d5f3008a274821/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/DTL.json#L12192-L12194

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 the linked DTL.json Swagger specification at the Microsoft.DevTestLab schedules schema around lines 12192–12194. Check how the properties field is listed as required and compare that requirement with the optional fields inside it. Done means the specification no longer requires properties when none of its nested fields are required, and the API spec validation passes.

Written by the indexing model from the issue text.

Assessment

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