Skip to content

ARM API Reviewer agent: block new handwritten OpenAPI API version directories that are missing TypeSpec (TSP-REQUIRED-V1) #43652

Closed

Description

@ravimeda

Background

New API versions should be authored in TypeSpec; handwritten OpenAPI for a brand-new version directory is a regression on the TypeSpec migration. Until a deterministic CI check ships (PR #42823), the ARM API Reviewer agent is the primary enforcement point.

Proposal

Introduce rule TSP-REQUIRED-V1 (PR #43494): when a PR introduces a new API version directory under specification/**/{resource-manager,data-plane}/**/{stable|preview}/<version>/ that does not exist on the base branch and contains handwritten OpenAPI, the Reviewer records a Blocking finding unless one of these compliance signals is present:

  • A sibling TypeSpec project (a directory containing main.tsp and tspconfig.yaml) exists in the same service folder.
  • The new swagger file contains the x-typespec-generated extension at the top level.
  • The PR also adds or updates .tsp source files under the same service folder.

A hard short-circuit checklist prevents false positives on PRs that only modify pre-existing API version directories, only touch examples / readme / tspconfig / .tsp, or whose swagger has x-typespec-generated set.

When the deterministic CI check ships, deprecate this agent rule and transfer enforcement to CI.

References

Acceptance criteria

  • The rule fires only on new API version directories, never on edits to existing ones.
  • All four pass-conditions in the short-circuit checklist are honored (no false positive when x-typespec-generated is present, when sibling .tsp exists, etc.).
  • Issue closes when PR [TypeSpec Requirement] Block all PRs adding swagger in a new API version #42823 ships and the agent rule is replaced by the CI check.

Activity

  1. ravimeda commented on Jun 4, 2026

    @ravimeda
    MemberAuthor

    Addressed by PR #43494 (merged). The relevant changes are now in main. Closing as completed.

  2. changed the title [-]ARM API Reviewer agent: block new handwritten OpenAPI API version directories that are missing TypeSpec (TSP-REQUIRED-V1)[/-] [+]ARM API Reviewer agent block new handwritten OpenAPI API version directories that are missing TypeSpec (TSP-REQUIRED-V1)[/+] on Aug 25, 2026
  3. changed the title [-]ARM API Reviewer agent block new handwritten OpenAPI API version directories that are missing TypeSpec (TSP-REQUIRED-V1)[/-] [+]ARM API Reviewer agent: block new handwritten OpenAPI API version directories that are missing TypeSpec (TSP-REQUIRED-V1)[/+] on Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions