{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getmattered/json-schema/getmattered-related-posts-response-schema.json",
  "title": "RelatedPostsResponse",
  "description": "Successful API response",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getmattered-blog-api-openapi.yml#/components/schemas/RelatedPostsResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicBlogPostWithRelevance"
      }
    },
    "meta": {
      "$ref": "#/$defs/ResponseMetadata"
    },
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    }
  },
  "required": [
    "data",
    "success"
  ],
  "additionalProperties": false,
  "$defs": {
    "BlogAuthor": {
      "type": "object",
      "properties": {
        "avatarUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "bio": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": [
            "string",
            "null"
          ]
        },
        "socialLinks": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "type": "string"
          }
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "title"
      ],
      "additionalProperties": false
    },
    "BlogPostSummary": {
      "type": "object",
      "properties": {
        "_status": {
          "type": "string",
          "enum": [
            "draft",
            "published",
            "archived"
          ],
          "description": "Publication status of a blog post"
        },
        "author": {
          "$ref": "#/$defs/BlogAuthor"
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "slug"
            ],
            "additionalProperties": false
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "description": {
          "type": "string"
        },
        "excerpt": {
          "type": "string"
        },
        "featured": {
          "type": "boolean"
        },
        "featuredImage": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "alt": {
              "type": "string"
            },
            "caption": {
              "type": [
                "string",
                "null"
              ]
            },
            "height": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "id": {
              "type": "string"
            },
            "sizes": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "card": {
                  "type": "object",
                  "properties": {
                    "filesize": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "width": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "height",
                    "url",
                    "width"
                  ],
                  "additionalProperties": false
                },
                "hero": {
                  "type": "object",
                  "properties": {
                    "filesize": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "width": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "height",
                    "url",
                    "width"
                  ],
                  "additionalProperties": false
                },
                "thumbnail": {
                  "type": "object",
                  "properties": {
                    "filesize": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "width": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "height",
                    "url",
                    "width"
                  ],
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "width": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          },
          "required": [
            "alt",
            "id",
            "url"
          ],
          "additionalProperties": false
        },
        "id": {
          "type": "string"
        },
        "meta": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "canonicalUrl": {
              "type": "string",
              "format": "uri"
            },
            "metaDescription": {
              "type": "string"
            },
            "metaImage": {
              "type": "string"
            },
            "metaTitle": {
              "type": "string"
            },
            "noIndex": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "publishedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "readingTime": {
          "type": "integer",
          "minimum": 0
        },
        "scheduledPublishAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "slug": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "_status",
        "author",
        "createdAt",
        "description",
        "excerpt",
        "featured",
        "id",
        "readingTime",
        "slug",
        "title",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "BlogPostWithRelevance": {
      "allOf": [
        {
          "$ref": "#/$defs/BlogPostSummary"
        },
        {
          "type": "object",
          "properties": {
            "relevance": {
              "type": "number"
            }
          },
          "required": [
            "relevance"
          ],
          "additionalProperties": false
        }
      ]
    },
    "PublicBlogPostWithRelevance": {
      "allOf": [
        {
          "$ref": "#/$defs/BlogPostWithRelevance"
        },
        {
          "type": "object",
          "properties": {
            "createdAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
                }
              ]
            },
            "featuredImage": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "alt": {
                  "type": "string"
                },
                "caption": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "height": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "id": {
                  "type": "string"
                },
                "sizes": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "card": {
                      "type": "object",
                      "properties": {
                        "filesize": {
                          "type": "integer"
                        },
                        "height": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "width": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "height",
                        "url",
                        "width"
                      ],
                      "additionalProperties": false
                    },
                    "hero": {
                      "type": "object",
                      "properties": {
                        "filesize": {
                          "type": "integer"
                        },
                        "height": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "width": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "height",
                        "url",
                        "width"
                      ],
                      "additionalProperties": false
                    },
                    "thumbnail": {
                      "type": "object",
                      "properties": {
                        "filesize": {
                          "type": "integer"
                        },
                        "height": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "width": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "height",
                        "url",
                        "width"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                },
                "url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "string",
                      "pattern": "^\\/(?!\\/)[^\\s\\\\\\u0000-\\u001F\\u007F]+$/u"
                    }
                  ]
                },
                "width": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                }
              },
              "required": [
                "alt",
                "id",
                "url"
              ],
              "additionalProperties": false
            },
            "updatedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
                }
              ]
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "ResponseMetadata": {
      "type": "object",
      "properties": {
        "duration": {
          "type": "number",
          "minimum": 0,
          "description": "Request duration in milliseconds"
        },
        "performance": {
          "type": "object",
          "properties": {
            "dbQueries": {
              "type": "integer",
              "minimum": 0
            },
            "totalDbTime": {
              "type": "number",
              "minimum": 0
            }
          },
          "description": "Performance metrics (preview/local only)"
        },
        "requestId": {
          "type": "string",
          "description": "Unique request identifier"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp"
        },
        "version": {
          "type": "string",
          "description": "API version"
        }
      }
    }
  }
}