98 lines
3.4 KiB
JSON
98 lines
3.4 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://schemas.aftech.internal/article-consolidation/v1/article-input.schema.json",
|
|
"x-contract-version": "1.0.0",
|
|
"title": "ArticleInputUnit",
|
|
"type": "object",
|
|
"required": [
|
|
"selected_extractor"
|
|
],
|
|
"properties": {
|
|
"articles": false,
|
|
"selected_extractor": {
|
|
"type": "string",
|
|
"enum": ["trafilatura", "newspaper4k", "readability"]
|
|
},
|
|
"crawled_url": {
|
|
"type": ["string", "null"]
|
|
},
|
|
"error_message": {
|
|
"type": ["string", "null"]
|
|
},
|
|
"extraction_status": {
|
|
"type": ["string", "null"]
|
|
},
|
|
"http_status": {
|
|
"type": ["integer", "null"]
|
|
},
|
|
"input_meta": {
|
|
"type": ["object", "null"],
|
|
"properties": {
|
|
"url": { "type": ["string", "null"] },
|
|
"titulo": { "type": ["string", "null"] },
|
|
"subtitulo": { "type": ["string", "null"] },
|
|
"quando_publicado": { "type": ["string", "null"] }
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"page_title": {
|
|
"type": ["string", "null"]
|
|
},
|
|
"trafilatura": {
|
|
"type": ["object", "null"],
|
|
"properties": {
|
|
"title": { "type": ["string", "null"] },
|
|
"author": { "type": ["string", "null"] },
|
|
"date": { "type": ["string", "null"] },
|
|
"description": { "type": ["string", "null"] },
|
|
"text": { "type": ["string", "null"] },
|
|
"markdown": { "type": ["string", "null"] },
|
|
"canonical_url": { "type": ["string", "null"] },
|
|
"image": { "type": ["string", "null"] },
|
|
"language": { "type": ["string", "null"] },
|
|
"sitename": { "type": ["string", "null"] },
|
|
"categories": { "type": "array", "items": { "type": "string" } },
|
|
"tags": { "type": "array", "items": { "type": "string" } },
|
|
"raw_json": { "type": ["object", "string", "null"] },
|
|
"pagetype": { "type": ["string", "null"] },
|
|
"error": { "type": ["string", "null"] }
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"newspaper4k": {
|
|
"type": ["object", "null"],
|
|
"properties": {
|
|
"title": { "type": ["string", "null"] },
|
|
"authors": { "type": "array", "items": { "type": "string" } },
|
|
"publish_date": { "type": ["string", "null"] },
|
|
"meta_description": { "type": ["string", "null"] },
|
|
"text": { "type": ["string", "null"] },
|
|
"article_html": { "type": ["string", "null"] },
|
|
"canonical_link": { "type": ["string", "null"] },
|
|
"top_image": { "type": ["string", "null"] },
|
|
"images": { "type": "array", "items": { "type": "string" } },
|
|
"meta_data": { "type": "object" },
|
|
"meta_lang": { "type": ["string", "null"] },
|
|
"meta_site_name": { "type": ["string", "null"] },
|
|
"tags": { "type": "array", "items": { "type": "string" } },
|
|
"keywords": { "type": "array", "items": { "type": "string" } },
|
|
"error": { "type": ["string", "null"] }
|
|
},
|
|
"additionalProperties": true
|
|
},
|
|
"readability": {
|
|
"type": ["object", "null"],
|
|
"properties": {
|
|
"title": { "type": ["string", "null"] },
|
|
"short_title": { "type": ["string", "null"] },
|
|
"author": { "type": ["string", "null"] },
|
|
"cleaned_text": { "type": ["string", "null"] },
|
|
"cleaned_html": { "type": ["string", "null"] },
|
|
"error": { "type": ["string", "null"] }
|
|
},
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"additionalProperties": true
|
|
}
|