{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-ninjas-com/json-schema/api-ninjas-com-baseball-standing-schema.json",
  "title": "BaseballStanding",
  "description": "Fields that do not apply to a league are omitted.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-ninjas-com-baseball-api-openapi.yml#/components/schemas/BaseballStanding",
  "type": "object",
  "properties": {
    "league": {
      "type": "string",
      "enum": [
        "mlb"
      ]
    },
    "sport": {
      "type": "string",
      "enum": [
        "baseball"
      ]
    },
    "season": {
      "type": "integer"
    },
    "season_label": {
      "type": "string"
    },
    "team": {
      "$ref": "#/$defs/BaseballTeamRef"
    },
    "conference": {
      "type": [
        "string",
        "null"
      ],
      "description": "AL or NL."
    },
    "division": {
      "type": [
        "string",
        "null"
      ]
    },
    "games_played": {
      "type": "integer"
    },
    "wins": {
      "type": "integer"
    },
    "losses": {
      "type": "integer"
    },
    "win_pct": {
      "type": "number"
    },
    "games_behind": {
      "type": "number"
    },
    "points_for": {
      "type": "integer"
    },
    "points_against": {
      "type": "integer"
    },
    "point_differential": {
      "type": "integer"
    },
    "streak": {
      "type": "string"
    },
    "home_record": {
      "type": "string"
    },
    "away_record": {
      "type": "string"
    },
    "last_10": {
      "type": "string"
    },
    "league_rank": {
      "type": "integer"
    },
    "conference_rank": {
      "type": "integer"
    },
    "division_rank": {
      "type": "integer"
    },
    "final": {
      "type": "boolean"
    }
  },
  "$defs": {
    "BaseballTeamRef": {
      "type": "object",
      "properties": {
        "team_id": {
          "type": "string",
          "description": "Team id, e.g. mlb-nyy."
        },
        "name": {
          "type": "string"
        },
        "abbreviation": {
          "type": "string"
        }
      }
    }
  }
}