{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/comingup-today/json-schema/comingup-today-ok-envelope-public-dev-diary-post-schema.json",
  "title": "OkEnvelopePublicDevDiaryPost",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/comingup-today-dev-diary-api-openapi.yml#/components/schemas/OkEnvelopePublicDevDiaryPost",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/PublicDevDiaryPost"
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "PublicDevDiaryAuthor": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "url": {
          "type": "string"
        },
        "sameAs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "PublicDevDiaryPost": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "slug": {
          "type": "string",
          "minLength": 1
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "excerpt": {
          "type": [
            "string",
            "null"
          ]
        },
        "contentMd": {
          "type": "string"
        },
        "contentHtml": {
          "type": "string"
        },
        "coverImageUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "coverImage": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "assetId": {
              "type": "string",
              "format": "uuid"
            },
            "mediaVersionId": {
              "type": "string",
              "format": "uuid"
            },
            "altText": {
              "type": [
                "string",
                "null"
              ],
              "minLength": 1,
              "maxLength": 500
            },
            "crop": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 48,
                  "pattern": "^[a-z0-9][a-z0-9_-]*$"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "natural",
                    "fixed"
                  ]
                },
                "aspectRatio": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "width": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "height": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "width",
                    "height"
                  ],
                  "additionalProperties": false
                },
                "focalPoint": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "x": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "y": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "x",
                    "y"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "key",
                "mode",
                "aspectRatio",
                "focalPoint"
              ],
              "additionalProperties": false
            },
            "fallback": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "maxLength": 2000,
                  "format": "uri"
                },
                "width": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "height": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "mimeType": {
                  "type": "string",
                  "pattern": "^image\\/(?:avif|jpeg|png|webp)$"
                }
              },
              "required": [
                "url",
                "width",
                "height",
                "mimeType"
              ],
              "additionalProperties": false
            },
            "variants": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "width": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "height": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "mimeType": {
                    "type": "string",
                    "pattern": "^image\\/(?:avif|jpeg|png|webp)$"
                  }
                },
                "required": [
                  "url",
                  "width",
                  "height",
                  "mimeType"
                ],
                "additionalProperties": false
              },
              "minItems": 1,
              "maxItems": 20
            }
          },
          "required": [
            "assetId",
            "mediaVersionId",
            "altText",
            "crop",
            "fallback",
            "variants"
          ],
          "additionalProperties": false
        },
        "canonicalUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "publishedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "updatedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "metaTitle": {
          "type": [
            "string",
            "null"
          ]
        },
        "metaDescription": {
          "type": [
            "string",
            "null"
          ]
        },
        "metaRobots": {
          "type": [
            "string",
            "null"
          ]
        },
        "ogTitle": {
          "type": [
            "string",
            "null"
          ]
        },
        "ogDescription": {
          "type": [
            "string",
            "null"
          ]
        },
        "ogImageUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "ogImage": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "assetId": {
              "type": "string",
              "format": "uuid"
            },
            "mediaVersionId": {
              "type": "string",
              "format": "uuid"
            },
            "altText": {
              "type": [
                "string",
                "null"
              ],
              "minLength": 1,
              "maxLength": 500
            },
            "crop": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 48,
                  "pattern": "^[a-z0-9][a-z0-9_-]*$"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "natural",
                    "fixed"
                  ]
                },
                "aspectRatio": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "width": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "height": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "width",
                    "height"
                  ],
                  "additionalProperties": false
                },
                "focalPoint": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "x": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "y": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "x",
                    "y"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "key",
                "mode",
                "aspectRatio",
                "focalPoint"
              ],
              "additionalProperties": false
            },
            "fallback": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "maxLength": 2000,
                  "format": "uri"
                },
                "width": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "height": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "mimeType": {
                  "type": "string",
                  "pattern": "^image\\/(?:avif|jpeg|png|webp)$"
                }
              },
              "required": [
                "url",
                "width",
                "height",
                "mimeType"
              ],
              "additionalProperties": false
            },
            "variants": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "width": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "height": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "mimeType": {
                    "type": "string",
                    "pattern": "^image\\/(?:avif|jpeg|png|webp)$"
                  }
                },
                "required": [
                  "url",
                  "width",
                  "height",
                  "mimeType"
                ],
                "additionalProperties": false
              },
              "minItems": 1,
              "maxItems": 20
            }
          },
          "required": [
            "assetId",
            "mediaVersionId",
            "altText",
            "crop",
            "fallback",
            "variants"
          ],
          "additionalProperties": false
        },
        "twitterCard": {
          "type": [
            "string",
            "null"
          ]
        },
        "jsonldOverride": {},
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "readingTimeMinutes": {
          "type": [
            "number",
            "null"
          ]
        },
        "authors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PublicDevDiaryAuthor"
          }
        }
      },
      "required": [
        "id",
        "slug",
        "title",
        "contentMd",
        "contentHtml"
      ],
      "additionalProperties": false
    }
  }
}