Skip to content

[confcom] Add a programmatic schema for acipolicygen input #9201

Description

@DomAyre

We currently have a great markdown document explaining the format, but a programmatic JSON schema would support docs creation, and in code validation from a single source of truth.

We could implement this by defining the json input as data classes in the code, and then generating json schemas and docs from it

Activity

  1. yonzhan commented on Sep 22, 2025

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  2. DomAyre commented on Sep 22, 2025

    @DomAyre
    ContributorAuthor

    The plan is to define data classes which outline the schema, which we can use in code but also generate JSON schemas/docs from.

    I will also update the code that parses other types of input to first parse it into this format before all going to a single policygen function.

    In order to have confidence this doesn't break acipolicygen, the first step to to add tests for this function which don't currently exist: #9199

  3. DomAyre commented on Sep 22, 2025

    @DomAyre
    ContributorAuthor

    Adding these tests uncovered this bug:

  4. DomAyre commented on Sep 22, 2025

    @DomAyre
    ContributorAuthor

    Changing how the ARM template is parsed can lead to variations in the template which aren't functional, for example environment variables can be defined in a different order. Since some tests rely on this order, we should standardise it to avoid breaking tests:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Service AttentionThis issue is responsible by Azure service team.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions