{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-document-info-request-schema.json",
  "title": "DocumentInfoRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-indesign-openapi.yml#/components/schemas/DocumentInfoRequest",
  "allOf": [
    {
      "$ref": "#/$defs/BaseJobRequest"
    },
    {
      "description": "Inputs for the document information request.",
      "type": "object",
      "required": [
        "params"
      ],
      "properties": {
        "params": {
          "type": "object",
          "required": [
            "targetDocument"
          ],
          "properties": {
            "targetDocument": {
              "description": "The document to be used for data extraction.",
              "type": "string"
            },
            "pageInfo": {
              "description": "Settings for extracting page information.",
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "If true, return pages information.",
                  "default": true
                }
              }
            },
            "linkInfo": {
              "description": "Settings for extracting link information.",
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "If true, return links information.",
                  "default": false
                }
              }
            },
            "fontInfo": {
              "description": "Settings for extracting font information.",
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "If true, return fonts information.",
                  "default": false
                }
              }
            },
            "pageItemInfo": {
              "description": "Settings for extracting page item information.",
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "If true, return page items details.",
                  "default": false
                }
              }
            },
            "textStoryInfo": {
              "description": "Settings for extracting text story information.",
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "If true, return text stories information.",
                  "default": false
                }
              }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "BaseJobRequest": {
      "description": "The base job request for any job.",
      "required": [
        "assets"
      ],
      "properties": {
        "assets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InputAsset"
          },
          "description": "Information about the assets, which will be used to process the job."
        },
        "params": {
          "type": "object",
          "properties": {
            "generalSettings": {
              "description": "General settings.",
              "type": "object",
              "properties": {
                "fonts": {
                  "description": "Settings related to fonts. It is recommended to include fonts to avoid missing fonts warnings when processing the job.",
                  "type": "object",
                  "properties": {
                    "fontsDirectories": {
                      "description": "This lists the font directories for the input InDesign documents. \"Document Fonts\" in parallel to the document will continue to work even without specifying them.  <br></br> If none are specified, a temporary base directory (working directory) will be considered as a font directory.",
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "This provides a path to a directory relative to a temporary base directory (working directory) where the fonts can be found. It cannot go up using '..' or '/'. Should be a valid path. For specifying a working directory, mention '.'."
                      }
                    },
                    "missingFontStrategy": {
                      "description": "This specifies the strategy to be used when a font is missing. One of: `fallback`, `fail`. Defaults to `fallback`.",
                      "type": "string",
                      "enum": [
                        "fallback",
                        "fail"
                      ],
                      "default": "fallback"
                    }
                  }
                },
                "links": {
                  "description": "Settings related to links.",
                  "type": "object",
                  "properties": {
                    "replaceLinks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "targetDocument",
                          "mapping"
                        ],
                        "properties": {
                          "targetDocument": {
                            "description": "The document in which the relinking is to be done. Relinking of assets is required to ensure that there are no missing links in the output document.",
                            "type": "string"
                          },
                          "mapping": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "newAssetRelativePath"
                              ],
                              "properties": {
                                "newAssetRelativePath": {
                                  "type": "string",
                                  "description": "This provides a path relative to a temporary base directory (working directory) where the asset to be linked to can be found. It cannot go up using '..' or '/'. Should be a valid file name."
                                },
                                "currentURI": {
                                  "type": "string",
                                  "description": "The existing URI of the link that needs relinking. If multiple links with this URI are found, all will be relinked. If `linkID` is provided, this attribute will be ignored. Either `currentURI` or `linkID` should be present."
                                },
                                "linkID": {
                                  "type": "integer",
                                  "description": "The ID of the link which is to be relinked. If `currentURI` is also provided, it will be ignored. Either `currentURI` or `linkID` should be present."
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "appLogs": {
                  "description": "Describes parameters regarding application logs.",
                  "type": "object",
                  "properties": {
                    "logsRelativePath": {
                      "type": "string",
                      "description": "This provides a path to a file, relative to the temporary base directory (working directory). This file is where the application's logs are to be dumped."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "InputAsset": {
      "type": "object",
      "description": "The URL where the asset will be fetched.",
      "required": [
        "source"
      ],
      "properties": {
        "source": {
          "type": "object",
          "required": [
            "url"
          ],
          "properties": {
            "url": {
              "type": "string",
              "description": "The pre-signed URL of the input asset. This is the URL of the asset that will be downloaded and acted upon during the job."
            }
          }
        },
        "destination": {
          "type": "string",
          "description": "This provides a path relative to a temporary base directory (working directory) where the resource would be downloaded. This would be used to identify the assets within the parameters. It cannot go up using '..' or '/'. Should be a valid file name."
        }
      }
    }
  }
}