Skip to main content

verify-api-schema

Verify if an MMv1 YAML property matches the live GCP REST API JSON payload using the Discovery Documents.

Quellinformationen

Repository
GoogleCloudPlatform/magic-modules
Letzte Quellaktivität
14. Mai 2026 um 21:22
Erkannte Sprache von SKILL.md
Englisch
Sterne
975
Forks
2.573

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
verify-api-schema
description
Verify if an MMv1 YAML property matches the live GCP REST API JSON payload using the Discovery Documents.
# `verify-api-schema` > **Note to AI Agents:** You MUST read the YAML frontmatter above first. Only read the rest of this file if the `description` matches your current roadblock or required task. ## Prerequisites * You must be in the `magic-modules` root directory. * You must have `curl` and `jq` installed. ## Execution Steps ### 1. Verification Provide the exact bash commands the agent should run to verify the prerequisites. #### Verify jq installation ```bash jq --version ``` ### 2. The Core Commands Query the live GCP Discovery Documents directly. This is the ultimate source of truth for exact JSON payload names (including weird edge cases like double-plurals or typos in the API). #### Query exact schema in v1 or beta ```bash # For v1 Compute API schema curl -s https://www.googleapis.com/discovery/v1/apis/compute/v1/rest | jq '.schemas.SecurityPolicyRule' # For beta Compute API schema curl -s https://www.googleapis.com/discovery/v1/apis/compute/beta/rest | jq '.schemas.SecurityPolicyRule' ``` Replace `SecurityPolicyRule` with the specific schema name you are tracking (e.g., `UrlMap`, `BackendService`). ### 3. Verification & Handoff Instructions on how the agent should verify the command succeeded, and what workflow or rule it should return to next. * Compare the JSON payload attributes (types, names, pluralization) with the Magic Modules YAML properties. * If you find a discrepancy (e.g., `exclusions` in JSON vs `exclusion` in YAML), verify if `api_name` is being used to bridge the gap.
Auf GitHub ansehen