{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carbonmark-com/json-schema/carbonmark-com-carbon-project-schema.json",
  "title": "CarbonProject",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carbonmark-com-openapi.json#/components/schemas/CarbonProject",
  "type": "object",
  "properties": {
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "block_long_description": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "_type": {
                "type": "string"
              },
              "_key": {
                "type": "string"
              },
              "children": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "_type": {
                      "type": "string"
                    },
                    "_key": {
                      "type": "string"
                    },
                    "marks": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "_type",
                    "text"
                  ]
                }
              },
              "markDefs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "_key": {
                      "type": "string"
                    },
                    "_type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "_key",
                    "_type"
                  ]
                }
              },
              "style": {
                "type": "string"
              },
              "listItem": {
                "type": "string"
              },
              "level": {
                "type": "number"
              }
            },
            "required": [
              "_type",
              "children"
            ]
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "long_description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "short_description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "key": {
      "type": "string"
    },
    "projectID": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "methodologies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Methodology"
      }
    },
    "location": {
      "description": "A GeoJSON Point feature.",
      "anyOf": [
        {
          "$ref": "#/$defs/GeoJSONPoint"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "vintages": {
      "description": "All available vintages for this project",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "registry": {
      "type": "string"
    },
    "updatedAt": {
      "type": "number"
    },
    "country": {
      "type": "string"
    },
    "region": {
      "type": "string"
    },
    "price": {
      "type": "string"
    },
    "stats": {
      "type": "object",
      "properties": {
        "totalBridged": {
          "type": "number"
        },
        "totalRetired": {
          "type": "number"
        },
        "totalSupply": {
          "type": "number"
        },
        "totalListingsSupply": {
          "type": "number"
        },
        "totalPoolsSupply": {
          "type": "number"
        }
      },
      "required": [
        "totalBridged",
        "totalRetired",
        "totalSupply",
        "totalListingsSupply",
        "totalPoolsSupply"
      ]
    },
    "images": {
      "description": "Various images representing a carbon project",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ImageModel"
      }
    },
    "coverImage": {
      "description": "Primary cover image to be shown for a carbon project",
      "$ref": "#/$defs/ImageModel"
    },
    "satelliteImage": {
      "description": "Satellite image to be shown for a carbon project",
      "$ref": "#/$defs/ImageModel"
    },
    "hasSupply": {
      "type": "boolean"
    },
    "sustainableDevelopmentGoals": {
      "description": "A list of numbers representing the United Nations Sustainable Development Goals addressed by the project",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "estAnnualMitigations": {
      "type": "number"
    },
    "developer": {
      "type": "string"
    },
    "assessor": {
      "type": "string"
    },
    "documents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "mimetype": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "filename",
          "category",
          "description",
          "size",
          "mimetype"
        ]
      }
    },
    "status": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "standards": {
      "type": "array",
      "items": {
        "description": "The standards of the project",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "link": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "link"
        ]
      }
    }
  },
  "required": [
    "key",
    "projectID",
    "name",
    "methodologies",
    "vintages",
    "registry",
    "updatedAt",
    "country",
    "region",
    "price",
    "stats",
    "hasSupply",
    "sustainableDevelopmentGoals"
  ],
  "$defs": {
    "GeoJSONPoint": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "Feature"
          ]
        },
        "geometry": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "Point"
              ]
            },
            "coordinates": {
              "minItems": 2,
              "maxItems": 2,
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          "required": [
            "type",
            "coordinates"
          ]
        }
      },
      "required": [
        "type",
        "geometry"
      ]
    },
    "ImageModel": {
      "type": "object",
      "properties": {
        "caption": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "Methodology": {
      "type": "object",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "sector": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}