完整响应 JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"code": {
"type": "number",
"const": 200
},
"request_id": {
"type": "string"
},
"message": {
"type": "string",
"const": "success"
},
"data": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"author": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"subreddit": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"title"
],
"additionalProperties": false
},
"metrics": {
"type": "object",
"properties": {
"score": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"comment_count": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"upvote_ratio": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 1
},
{
"type": "null"
}
]
}
},
"required": [
"score",
"comment_count",
"upvote_ratio"
],
"additionalProperties": false
},
"permalink": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reddit_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"is_nsfw": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"title",
"body",
"created_at",
"author",
"subreddit",
"metrics",
"permalink",
"reddit_url",
"is_nsfw"
],
"additionalProperties": false
}
}
},
"required": [
"items"
],
"additionalProperties": false
},
"page": {
"type": "object",
"properties": {
"next_cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"next_cursor"
],
"additionalProperties": false
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"meta": {
"type": "object",
"properties": {
"listing_id": {
"type": "string",
"const": "reddit.posts.search"
},
"version": {
"type": "string",
"const": "v1"
},
"catalog_release_id": {
"type": "string",
"minLength": 1
},
"price_book_version": {
"type": "string",
"minLength": 1
},
"result_status": {
"type": "string",
"enum": [
"complete",
"empty",
"partial"
]
},
"charged_amount": {
"type": "string"
},
"balance_after": {
"type": "string"
},
"currency": {
"type": "string",
"const": "CNY"
}
},
"required": [
"listing_id",
"version",
"catalog_release_id",
"price_book_version",
"result_status",
"charged_amount",
"balance_after",
"currency"
],
"additionalProperties": false
}
},
"required": [
"code",
"request_id",
"message",
"data",
"page",
"warnings",
"meta"
],
"additionalProperties": false
}