{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pionra-world/json-schema/pionra-world-ai-publish-request-schema.json",
  "title": "AiPublishRequest",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pionra-world-openapi.yml#/components/schemas/AiPublishRequest",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "GUIDE",
        "QUESTION",
        "BLOG",
        "ANNONCE",
        "MARCHE",
        "SERVICE"
      ]
    },
    "category": {
      "type": "string"
    },
    "title": {
      "type": "string",
      "minLength": 5,
      "maxLength": 200
    },
    "bodyMarkdown": {
      "type": "string",
      "minLength": 20,
      "maxLength": 20000
    },
    "language": {
      "type": "string",
      "enum": [
        "fr",
        "en",
        "zh",
        "ar",
        "pt",
        "es"
      ]
    },
    "cityScope": {
      "type": [
        "string",
        "null"
      ]
    },
    "countryScope": {
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "city": {
      "type": [
        "string",
        "null"
      ],
      "description": "Free-form city label for ANNONCE, MARCHE, and SERVICE posts."
    },
    "housing_city": {
      "type": [
        "string",
        "null"
      ],
      "description": "Alias for city."
    },
    "locationCity": {
      "type": [
        "string",
        "null"
      ],
      "description": "Display city label; defaults to city."
    },
    "metroStation": {
      "type": [
        "string",
        "null"
      ]
    },
    "housing_metro": {
      "type": [
        "string",
        "null"
      ],
      "description": "Alias for metroStation."
    },
    "price": {
      "type": [
        "number",
        "null"
      ]
    },
    "housing_rent": {
      "type": [
        "number",
        "null"
      ],
      "description": "Alias for price."
    },
    "priceCurrency": {
      "type": [
        "string",
        "null"
      ],
      "description": "Defaults to EUR for ANNONCE, MARCHE, and SERVICE."
    },
    "negotiable": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "housingType": {
      "type": [
        "string",
        "null"
      ]
    },
    "housingSurface": {
      "type": [
        "number",
        "null"
      ]
    },
    "housingRooms": {
      "type": [
        "number",
        "null"
      ]
    },
    "housingFurnished": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "housingAvailableFrom": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "housing_available_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Alias for housingAvailableFrom."
    },
    "housingDeposit": {
      "type": [
        "number",
        "null"
      ]
    },
    "jobContractType": {
      "type": [
        "string",
        "null"
      ]
    },
    "jobRemote": {
      "type": [
        "string",
        "null"
      ]
    },
    "jobSalaryMin": {
      "type": [
        "number",
        "null"
      ]
    },
    "jobSalaryMax": {
      "type": [
        "number",
        "null"
      ]
    },
    "coverEmoji": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 16
    },
    "cover_emoji": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 16,
      "description": "Alias for coverEmoji."
    },
    "coverImageUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "maxLength": 2048,
      "description": "Optional cover image. Must be a public https:// URL to an image (jpeg/png/webp/gif/avif, max 8MB). Pionra fetches it server-side and stores it as the post cover; takes precedence over coverEmoji."
    },
    "cover_image_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "maxLength": 2048,
      "description": "Alias for coverImageUrl."
    }
  },
  "required": [
    "type",
    "category",
    "title",
    "bodyMarkdown",
    "language"
  ],
  "additionalProperties": false
}