Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Azure Policy definition structure basics" JSON example doesn't validate #124854

Open
jpluscplusm opened this issue Nov 13, 2024 · 1 comment
Open

Comments

@jpluscplusm
Copy link

jpluscplusm commented Nov 13, 2024

I'm using the page https://learn.microsoft.com/en-gb/azure/governance/policy/concepts/definition-structure-basics to learn about Azure policy definitions.

The page contains an example of a JSON policy definition, directly under the text "For example, the following JSON shows a policy that limits where resources are deployed".

Directly underneath that example JSON, there's a sentence ("For more information, go to the policy definition schema") that links to a JSON Schema describing a "policy definition" (https://schema.management.azure.com/schemas/2020-10-01/policyDefinition.json)

Here's the problem: the example JSON presented on the page is invalid, according to the JSON Schema linked to by the page. I uploaded the schema and the example to an online validator (https://www.jsonschemavalidator.net/s/vKp4ApuY), which points out two high-level errors:

  • Property properties has not been defined and the schema does not allow additional properties.
  • Required properties are missing from object: if, then.

Requested fix: this page should be updated to link to an authoritative schema that can validate the example successfully.

@TPavanBalaji
Copy link
Contributor

@jpluscplusm
Thanks for your feedback! We will investigate and update as appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants