{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nuget/json-schema/nuget-registration-page-schema.json",
  "title": "RegistrationPage",
  "description": "A registration page fetched separately from the index.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nuget-registration-api-openapi.yml#/components/schemas/RegistrationPage",
  "type": "object",
  "required": [
    "@id",
    "count",
    "items",
    "lower",
    "parent",
    "upper"
  ],
  "properties": {
    "@id": {
      "type": "string",
      "format": "uri",
      "description": "The URL to the registration page."
    },
    "count": {
      "type": "integer",
      "description": "The number of registration leaves in the page."
    },
    "items": {
      "type": "array",
      "description": "The array of registration leaves.",
      "items": {
        "$ref": "#/$defs/RegistrationLeaf"
      }
    },
    "lower": {
      "type": "string",
      "description": "The lowest SemVer 2.0.0 version in the page (inclusive)."
    },
    "parent": {
      "type": "string",
      "format": "uri",
      "description": "The URL to the registration index."
    },
    "upper": {
      "type": "string",
      "description": "The highest SemVer 2.0.0 version in the page (inclusive)."
    }
  },
  "$defs": {
    "AlternatePackage": {
      "type": "object",
      "description": "A recommended replacement for a deprecated package.",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the alternate package."
        },
        "range": {
          "type": "string",
          "description": "The allowed version range, or * if any version is accepted."
        }
      }
    },
    "CatalogEntry": {
      "type": "object",
      "description": "The catalog entry containing detailed package metadata for a specific version.",
      "required": [
        "@id",
        "id",
        "version"
      ],
      "properties": {
        "@id": {
          "type": "string",
          "format": "uri",
          "description": "The URL to the document used to produce this object."
        },
        "authors": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ],
          "description": "The author or authors of the package."
        },
        "dependencyGroups": {
          "type": "array",
          "description": "The dependencies of the package, grouped by target framework.",
          "items": {
            "$ref": "#/$defs/DependencyGroup"
          }
        },
        "deprecation": {
          "$ref": "#/$defs/Deprecation"
        },
        "description": {
          "type": "string",
          "description": "The package description."
        },
        "iconUrl": {
          "type": "string",
          "format": "uri",
          "description": "The URL to the package icon."
        },
        "id": {
          "type": "string",
          "description": "The ID of the package."
        },
        "language": {
          "type": "string",
          "description": "The language of the package."
        },
        "licenseUrl": {
          "type": "string",
          "format": "uri",
          "description": "The URL to the package license."
        },
        "licenseExpression": {
          "type": "string",
          "description": "A NuGet license expression string."
        },
        "listed": {
          "type": "boolean",
          "description": "Whether the package is listed. Considered listed if absent."
        },
        "minClientVersion": {
          "type": "string",
          "description": "The minimum NuGet client version required to use this package."
        },
        "packageContent": {
          "type": "string",
          "format": "uri",
          "description": "The URL to the package content (.nupkg). Included for legacy compatibility."
        },
        "projectUrl": {
          "type": "string",
          "format": "uri",
          "description": "The URL to the project page."
        },
        "published": {
          "type": "string",
          "format": "date-time",
          "description": "An ISO 8601 timestamp of when the package was published."
        },
        "readmeUrl": {
          "type": "string",
          "format": "uri",
          "description": "A URL for the rendered view of the package README."
        },
        "requireLicenseAcceptance": {
          "type": "boolean",
          "description": "Whether the package requires license acceptance before installation."
        },
        "summary": {
          "type": "string",
          "description": "A summary of the package."
        },
        "tags": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ],
          "description": "Tags associated with the package."
        },
        "title": {
          "type": "string",
          "description": "The title of the package."
        },
        "version": {
          "type": "string",
          "description": "The full version string after normalization, which may include SemVer 2.0.0 build metadata."
        },
        "vulnerabilities": {
          "type": "array",
          "description": "Security vulnerabilities associated with this package version.",
          "items": {
            "$ref": "#/$defs/Vulnerability"
          }
        }
      }
    },
    "Dependency": {
      "type": "object",
      "description": "A package dependency.",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the package dependency."
        },
        "range": {
          "type": "string",
          "description": "The allowed version range of the dependency. Defaults to any version if absent."
        },
        "registration": {
          "type": "string",
          "format": "uri",
          "description": "The URL to the registration index for this dependency."
        }
      }
    },
    "DependencyGroup": {
      "type": "object",
      "description": "A group of package dependencies applicable to a specific target framework.",
      "properties": {
        "targetFramework": {
          "type": "string",
          "description": "The target framework these dependencies are applicable to. If not specified, the group applies to all target frameworks."
        },
        "dependencies": {
          "type": "array",
          "description": "The list of package dependencies.",
          "items": {
            "$ref": "#/$defs/Dependency"
          }
        }
      }
    },
    "Deprecation": {
      "type": "object",
      "description": "Deprecation information for a package version.",
      "required": [
        "reasons"
      ],
      "properties": {
        "reasons": {
          "type": "array",
          "description": "The reasons why the package was deprecated. Values include Legacy, CriticalBugs, and Other.",
          "items": {
            "type": "string",
            "enum": [
              "Legacy",
              "CriticalBugs",
              "Other"
            ]
          }
        },
        "message": {
          "type": "string",
          "description": "Additional details about the deprecation."
        },
        "alternatePackage": {
          "$ref": "#/$defs/AlternatePackage"
        }
      }
    },
    "RegistrationLeaf": {
      "type": "object",
      "description": "A registration leaf representing data for a single package version within a page.",
      "required": [
        "@id",
        "catalogEntry",
        "packageContent"
      ],
      "properties": {
        "@id": {
          "type": "string",
          "format": "uri",
          "description": "The URL to the registration leaf."
        },
        "catalogEntry": {
          "$ref": "#/$defs/CatalogEntry"
        },
        "packageContent": {
          "type": "string",
          "format": "uri",
          "description": "The URL to the package content (.nupkg)."
        }
      }
    },
    "Vulnerability": {
      "type": "object",
      "description": "A security vulnerability associated with a package version.",
      "required": [
        "advisoryUrl",
        "severity"
      ],
      "properties": {
        "advisoryUrl": {
          "type": "string",
          "format": "uri",
          "description": "Location of the security advisory for the package."
        },
        "severity": {
          "type": "string",
          "description": "Severity of the advisory. 0 = Low, 1 = Moderate, 2 = High, 3 = Critical.",
          "enum": [
            "0",
            "1",
            "2",
            "3"
          ]
        }
      }
    }
  }
}