# Tests that exercise data-plane manifest loading and the data-plane
# normalization path (resource type contains ".Data/").
# This covers load_data_policy_manifest_json() and the data-plane
# normalization branch in normalizer.rs.

data_manifest_json: |
  {
    "dataNamespace": "Microsoft.KeyVault.Data",
    "aliases": [],
    "resourceTypeAliases": [
      {
        "resourceType": "vaults/certificates",
        "aliases": [
          {
            "name": "Microsoft.KeyVault.Data/vaults/certificates/keySize",
            "paths": [
              {
                "path": "keySize",
                "apiVersions": ["7.0"]
              }
            ]
          },
          {
            "name": "Microsoft.KeyVault.Data/vaults/certificates/attributes.expiresOn",
            "paths": [
              {
                "path": "attributes.expiresOn",
                "apiVersions": ["7.0"]
              }
            ]
          }
        ]
      }
    ]
  }

cases:
  - note: data-plane manifest normalize via registry API
    use_registry_api: true
    input:
      type: "Microsoft.KeyVault.Data/vaults/certificates"
      keySize: 2048
      attributes:
        expiresOn: "2025-01-01T00:00:00Z"
    expected_normalized:
      type: "Microsoft.KeyVault.Data/vaults/certificates"
      keysize: 2048
      attributes:
        expireson: "2025-01-01T00:00:00Z"
    round_trip: true

  - note: data-plane manifest round-trip via registry API
    use_registry_api: true
    input:
      type: "Microsoft.KeyVault.Data/vaults/certificates"
      keySize: 2048
      attributes:
        expiresOn: "2025-01-01T00:00:00Z"
    round_trip: true
    expected_round_trip:
      type: "Microsoft.KeyVault.Data/vaults/certificates"
      keySize: 2048
      attributes:
        expiresOn: "2025-01-01T00:00:00Z"
