API Docs
ES
Referencia

Modelos de datos

Definiciones reutilizadas por solicitudes, respuestas, métricas y errores.

ApiProblemApiProblem
{
  "properties": {
    "code": {
      "description": "Stable machine-readable arText error code.",
      "title": "Code",
      "type": "string"
    },
    "detail": {
      "description": "Human-readable explanation for this occurrence.",
      "title": "Detail",
      "type": "string"
    },
    "errors": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Errors"
    },
    "instance": {
      "description": "Request path for this occurrence.",
      "title": "Instance",
      "type": "string"
    },
    "request_id": {
      "description": "Identifier to retain for support and tracing.",
      "title": "Request Id",
      "type": "string"
    },
    "retry_after_seconds": {
      "anyOf": [
        {
          "minimum": 1.0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Retry After Seconds"
    },
    "status": {
      "description": "HTTP status code.",
      "title": "Status",
      "type": "integer"
    },
    "title": {
      "description": "Short, stable problem title.",
      "title": "Title",
      "type": "string"
    },
    "type": {
      "description": "URI reference identifying the problem type.",
      "title": "Type",
      "type": "string"
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "detail",
    "instance",
    "code",
    "request_id"
  ],
  "title": "ApiProblem",
  "type": "object"
}
GenreGenre the report was analyzed with. It names both coordinates because a text type slug is only unique inside its domain, and the pair is what determined the rules, the thresholds and the glossaries used. Resubmitting these two slugs reproduces the analysis.
{
  "description": "Genre the report was analyzed with.\n\nIt names both coordinates because a text type slug is only unique inside\nits domain, and the pair is what determined the rules, the thresholds and\nthe glossaries used. Resubmitting these two slugs reproduces the analysis.",
  "properties": {
    "domain": {
      "$ref": "#/components/schemas/TextDomain"
    },
    "text_type": {
      "$ref": "#/components/schemas/TextType"
    }
  },
  "required": [
    "domain",
    "text_type"
  ],
  "title": "Genre",
  "type": "object"
}
GenreGlossariesGenreGlossaries
{
  "properties": {
    "domain_slug": {
      "title": "Domain Slug",
      "type": "string"
    },
    "glossaries": {
      "items": {
        "$ref": "#/components/schemas/Glossary"
      },
      "title": "Glossaries",
      "type": "array"
    },
    "language": {
      "title": "Language",
      "type": "string"
    },
    "text_type_slug": {
      "title": "Text Type Slug",
      "type": "string"
    }
  },
  "required": [
    "language",
    "domain_slug",
    "text_type_slug",
    "glossaries"
  ],
  "title": "GenreGlossaries",
  "type": "object"
}
GlossaryDisponibilidad de un glosario para un género. Sin contenido.
{
  "description": "Disponibilidad de un glosario para un g\u00e9nero. Sin contenido.",
  "properties": {
    "active_entry_count": {
      "description": "Entries actually applied; the rest are deliberately disabled.",
      "title": "Active Entry Count",
      "type": "integer"
    },
    "entry_count": {
      "description": "Entries resolved for this genre, active or not.",
      "title": "Entry Count",
      "type": "integer"
    },
    "inherited": {
      "description": "True when source_level is less specific than the requested genre.",
      "title": "Inherited",
      "type": "boolean"
    },
    "key": {
      "description": "Stable glossary identifier.",
      "title": "Key",
      "type": "string"
    },
    "source_level": {
      "description": "Cascade level the entries come from. The most specific level holding rows wins: the genre\u0027s own list, the domain\u0027s, or the language-wide one.",
      "enum": [
        "text_type",
        "domain",
        "global"
      ],
      "title": "Source Level",
      "type": "string"
    },
    "title": {
      "description": "Human-readable glossary name.",
      "title": "Title",
      "type": "string"
    },
    "used_by_metrics": {
      "description": "metric_id values enabled for this genre that read this glossary.",
      "items": {
        "type": "string"
      },
      "title": "Used By Metrics",
      "type": "array"
    }
  },
  "required": [
    "key",
    "title",
    "entry_count",
    "active_entry_count",
    "source_level",
    "inherited"
  ],
  "title": "Glossary",
  "type": "object"
}
HTTPValidationErrorHTTPValidationError
{
  "properties": {
    "detail": {
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      },
      "title": "Detail",
      "type": "array"
    }
  },
  "title": "HTTPValidationError",
  "type": "object"
}
MeasurementMeasurement
{
  "properties": {
    "implementation_version": {
      "description": "Calculator version used for this report.",
      "title": "Implementation Version",
      "type": "string"
    },
    "metric_id": {
      "description": "Stable metric identifier documented by GET /v1/metrics/{metric_id}.",
      "title": "Metric Id",
      "type": "string"
    },
    "unit": {
      "description": "Semantic unit defined by the metric catalog.",
      "title": "Unit",
      "type": "string"
    },
    "value": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "number"
        }
      ],
      "description": "Calculated numeric value.",
      "title": "Value"
    }
  },
  "required": [
    "metric_id",
    "value",
    "unit",
    "implementation_version"
  ],
  "title": "Measurement",
  "type": "object"
}
MetricMetric
{
  "properties": {
    "analysis_language": {
      "title": "Analysis Language",
      "type": "string"
    },
    "availability_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Localized explanation present only when available is false.",
      "title": "Availability Note"
    },
    "available": {
      "default": true,
      "description": "False when the variant can never produce output for analysis_language with the current linguistic runtime; see availability_note.",
      "title": "Available",
      "type": "boolean"
    },
    "category": {
      "title": "Category",
      "type": "string"
    },
    "documentation": {
      "$ref": "#/components/schemas/MetricDocumentation"
    },
    "documentation_language": {
      "description": "Language actually used by the returned documentation.",
      "title": "Documentation Language",
      "type": "string"
    },
    "enabled": {
      "description": "Whether reports for analysis_language currently evaluate this variant.",
      "title": "Enabled",
      "type": "boolean"
    },
    "example": {
      "additionalProperties": true,
      "description": "Example conforming to the public report contract.",
      "title": "Example",
      "type": "object"
    },
    "genre_scope": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/MetricGenreScope"
        },
        {
          "type": "null"
        }
      ],
      "description": "Genre-specific status, present only when the request selects a genre."
    },
    "id": {
      "title": "Id",
      "type": "string"
    },
    "implementation_version": {
      "title": "Implementation Version",
      "type": "string"
    },
    "kind": {
      "enum": [
        "measurement",
        "rule"
      ],
      "title": "Kind",
      "type": "string"
    },
    "references": {
      "items": {
        "type": "string"
      },
      "title": "References",
      "type": "array"
    },
    "unit": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Unit"
    }
  },
  "required": [
    "id",
    "kind",
    "analysis_language",
    "enabled",
    "implementation_version",
    "category",
    "documentation_language",
    "documentation"
  ],
  "title": "Metric",
  "type": "object"
}
MetricCatalogMetricCatalog
{
  "properties": {
    "genre": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/Genre"
        },
        {
          "type": "null"
        }
      ],
      "description": "Genre the genre_scope of every metric refers to, when one was requested."
    },
    "metrics": {
      "items": {
        "$ref": "#/components/schemas/Metric"
      },
      "title": "Metrics",
      "type": "array"
    }
  },
  "required": [
    "metrics"
  ],
  "title": "MetricCatalog",
  "type": "object"
}
MetricDocumentationMetricDocumentation
{
  "properties": {
    "interpretation": {
      "default": "",
      "title": "Interpretation",
      "type": "string"
    },
    "limitations": {
      "default": "",
      "title": "Limitations",
      "type": "string"
    },
    "methodology": {
      "default": "",
      "title": "Methodology",
      "type": "string"
    },
    "summary": {
      "default": "",
      "title": "Summary",
      "type": "string"
    },
    "title": {
      "default": "",
      "title": "Title",
      "type": "string"
    }
  },
  "title": "MetricDocumentation",
  "type": "object"
}
MetricGenreScopeHow a metric behaves for one genre. Present only when the request narrows the catalog with domain_slug and text_type_slug. `enabled` is the intersection of the language variant and the genre configuration: a variant enabled for the language still does not run unless the genre opts into it.
{
  "description": "How a metric behaves for one genre.\n\nPresent only when the request narrows the catalog with domain_slug and\ntext_type_slug. `enabled` is the intersection of the language variant and\nthe genre configuration: a variant enabled for the language still does not\nrun unless the genre opts into it.",
  "properties": {
    "enabled": {
      "description": "Whether reports for this genre evaluate the metric.",
      "title": "Enabled",
      "type": "boolean"
    },
    "params": {
      "additionalProperties": true,
      "description": "Thresholds this genre configures for the metric; empty means the defaults.",
      "title": "Params",
      "type": "object"
    }
  },
  "required": [
    "enabled"
  ],
  "title": "MetricGenreScope",
  "type": "object"
}
OccurrenceOccurrence
{
  "properties": {
    "alternatives": {
      "description": "Additional reviewed replacement candidates, excluding replacement.",
      "items": {
        "type": "string"
      },
      "title": "Alternatives",
      "type": "array"
    },
    "connectors": {
      "description": "Discourse connectors found inside this occurrence, in reading order, with the alternatives that would fit if the sentence were split there. Only long sentences fill this; every other metric leaves it empty.",
      "items": {
        "$ref": "#/components/schemas/SentenceConnectorBase"
      },
      "title": "Connectors",
      "type": "array"
    },
    "edits": {
      "description": "Validated edits for the preferred deterministic change, ordered from the highest offset to the lowest.",
      "items": {
        "$ref": "#/components/schemas/TextEdit"
      },
      "title": "Edits",
      "type": "array"
    },
    "end": {
      "anyOf": [
        {
          "minimum": 0.0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Exclusive offset in the original input text.",
      "title": "End"
    },
    "id": {
      "description": "Identifier unique within its parent recommendation.",
      "title": "Id",
      "type": "string"
    },
    "paragraph_index": {
      "anyOf": [
        {
          "minimum": 0.0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Zero-based paragraph index when available.",
      "title": "Paragraph Index"
    },
    "replacement": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Preferred direct replacement, or null when none is available.",
      "title": "Replacement"
    },
    "sentence_index": {
      "anyOf": [
        {
          "minimum": 0.0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Zero-based sentence index when available.",
      "title": "Sentence Index"
    },
    "spans": {
      "description": "Every appearance of this occurrence in the text, in reading order, when the metric identifies a unit rather than a single fragment: a repeated word or connector, or a glossary entry found in several places. The first entry is the one published in start/end. Empty when the occurrence appears only once.",
      "items": {
        "$ref": "#/components/schemas/TextSpanBase"
      },
      "title": "Spans",
      "type": "array"
    },
    "start": {
      "anyOf": [
        {
          "minimum": 0.0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Inclusive offset in the original input text.",
      "title": "Start"
    },
    "text": {
      "description": "Fragment identified by the metric.",
      "title": "Text",
      "type": "string"
    }
  },
  "required": [
    "id",
    "text"
  ],
  "title": "Occurrence",
  "type": "object"
}
PublicPhraseologyPublicPhraseology
{
  "properties": {
    "value": {
      "description": "Suggested wording for the content it belongs to.",
      "title": "Value",
      "type": "string"
    }
  },
  "required": [
    "value"
  ],
  "title": "PublicPhraseology",
  "type": "object"
}
PublicTextContentPublicTextContent
{
  "properties": {
    "name": {
      "description": "Content the section is expected to cover.",
      "title": "Name",
      "type": "string"
    },
    "occurrence": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "How many times the content usually appears in the section, when the catalog states it.",
      "title": "Occurrence"
    },
    "phraseology": {
      "description": "Wordings the editorial team proposes for this content.",
      "items": {
        "$ref": "#/components/schemas/PublicPhraseology"
      },
      "title": "Phraseology",
      "type": "array"
    }
  },
  "required": [
    "name"
  ],
  "title": "PublicTextContent",
  "type": "object"
}
PublicTextDomainPublicTextDomain
{
  "properties": {
    "clear_language": {
      "default": false,
      "description": "True when the whole domain is plain-language.",
      "title": "Clear Language",
      "type": "boolean"
    },
    "name": {
      "description": "Domain name in the requested language.",
      "title": "Name",
      "type": "string"
    },
    "slug": {
      "description": "Domain identifier. Send it as domain_slug in POST /v1/reports.",
      "title": "Slug",
      "type": "string"
    },
    "text_types": {
      "description": "Genres available inside this domain.",
      "items": {
        "$ref": "#/components/schemas/PublicTextType"
      },
      "title": "Text Types",
      "type": "array"
    }
  },
  "required": [
    "slug",
    "name"
  ],
  "title": "PublicTextDomain",
  "type": "object"
}
PublicTextSectionPublicTextSection
{
  "properties": {
    "contents": {
      "items": {
        "$ref": "#/components/schemas/PublicTextContent"
      },
      "title": "Contents",
      "type": "array"
    },
    "name": {
      "description": "Section of the document, in reading order.",
      "title": "Name",
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "title": "PublicTextSection",
  "type": "object"
}
PublicTextTypePublicTextType
{
  "properties": {
    "clear_language": {
      "default": false,
      "description": "True when the genre is written in plain language for the general public.",
      "title": "Clear Language",
      "type": "boolean"
    },
    "name": {
      "description": "Genre name in the requested language.",
      "title": "Name",
      "type": "string"
    },
    "slug": {
      "description": "Genre identifier. Send it as text_type_slug in POST /v1/reports.",
      "title": "Slug",
      "type": "string"
    }
  },
  "required": [
    "slug",
    "name"
  ],
  "title": "PublicTextType",
  "type": "object"
}
PublicTextTypeCatalogPublicTextTypeCatalog
{
  "properties": {
    "domains": {
      "items": {
        "$ref": "#/components/schemas/PublicTextDomain"
      },
      "title": "Domains",
      "type": "array"
    },
    "language": {
      "description": "Language the catalog is returned in.",
      "title": "Language",
      "type": "string"
    }
  },
  "required": [
    "language",
    "domains"
  ],
  "title": "PublicTextTypeCatalog",
  "type": "object"
}
PublicTextTypeDetailPublicTextTypeDetail
{
  "properties": {
    "domain": {
      "$ref": "#/components/schemas/PublicTextDomain",
      "description": "Domain the genre belongs to, without its sibling genres."
    },
    "language": {
      "title": "Language",
      "type": "string"
    },
    "report_defaults": {
      "$ref": "#/components/schemas/ReportDefaults",
      "description": "Exact payload fragment to forward to POST /v1/reports."
    },
    "structure": {
      "description": "Sections and contents the editorial team recommends for this genre.",
      "items": {
        "$ref": "#/components/schemas/PublicTextSection"
      },
      "title": "Structure",
      "type": "array"
    },
    "text_type": {
      "$ref": "#/components/schemas/PublicTextType"
    }
  },
  "required": [
    "language",
    "domain",
    "text_type",
    "report_defaults"
  ],
  "title": "PublicTextTypeDetail",
  "type": "object"
}
RecommendationUn problema encontrado por una regla, con todas sus apariciones. El contrato público la llama `Recommendation` y no `Suggestion` porque es el término que usa el producto de cara a quien lo lee. El modelo interno (`app.domain.models.Suggestion`) conserva su nombre: el renombrado es de la proyección pública, no de la nomenclatura del motor.
{
  "description": "Un problema encontrado por una regla, con todas sus apariciones.\n\nEl contrato p\u00fablico la llama `Recommendation` y no `Suggestion` porque es\nel t\u00e9rmino que usa el producto de cara a quien lo lee. El modelo interno\n(`app.domain.models.Suggestion`) conserva su nombre: el renombrado es de la\nproyecci\u00f3n p\u00fablica, no de la nomenclatura del motor.",
  "properties": {
    "category": {
      "description": "Stable linguistic category used by the metric catalog.",
      "title": "Category",
      "type": "string"
    },
    "examples": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional worked examples illustrating the recommendation, as plain text with meaningful line breaks. Editorial copy attached to the metric: it never quotes the analysed text and does not vary between reports. Null when the metric\u0027s copy has no examples.",
      "title": "Examples"
    },
    "explanation": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional extended contextual explanation.",
      "title": "Explanation"
    },
    "guidance": {
      "description": "Human-readable review guidance written by the editorial team.",
      "items": {
        "type": "string"
      },
      "title": "Guidance",
      "type": "array"
    },
    "id": {
      "description": "Identifier unique within this report.",
      "title": "Id",
      "type": "string"
    },
    "implementation_version": {
      "description": "Detector version used for this report.",
      "title": "Implementation Version",
      "type": "string"
    },
    "metric_id": {
      "description": "Stable metric identifier documented by GET /v1/metrics/{metric_id}.",
      "title": "Metric Id",
      "type": "string"
    },
    "metric_title": {
      "description": "Localized human-readable metric title captured for this report.",
      "title": "Metric Title",
      "type": "string"
    },
    "occurrences": {
      "description": "Concrete appearances of this issue in the submitted text, in reading order: sorted by `start`, with occurrences that could not be located last. The order of the recommendations themselves is linguistic, not positional.",
      "items": {
        "$ref": "#/components/schemas/Occurrence"
      },
      "title": "Occurrences",
      "type": "array"
    },
    "summary": {
      "description": "Explanation of the issue found in this report.",
      "title": "Summary",
      "type": "string"
    }
  },
  "required": [
    "id",
    "metric_id",
    "implementation_version",
    "metric_title",
    "category",
    "summary"
  ],
  "title": "Recommendation",
  "type": "object"
}
ReportReport
{
  "properties": {
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "UTC acceptance timestamp.",
      "title": "Created At"
    },
    "error": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/ReportFailure"
        },
        {
          "type": "null"
        }
      ],
      "description": "Safe failure information, present only when failed."
    },
    "estimated_seconds": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Rough estimate of the analysis duration, derived from the text length when the report was accepted. Indicative only: it excludes queue wait and does not react to server load.",
      "title": "Estimated Seconds"
    },
    "external_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "External Id"
    },
    "finished_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "UTC terminal timestamp.",
      "title": "Finished At"
    },
    "phase": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/ReportPhase"
        },
        {
          "type": "null"
        }
      ],
      "description": "Pipeline stage while the report is running: `analyzing` (linguistic analysis, by far the longest part) or `building` (applying rules). Not a percentage: it marks what the server is doing, not how far along it is."
    },
    "position_in_queue": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Approximate queue position while waiting.",
      "title": "Position In Queue"
    },
    "report_id": {
      "title": "Report Id",
      "type": "string"
    },
    "result": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/ReportResult"
        },
        {
          "type": "null"
        }
      ],
      "description": "Analysis result, present only when completed."
    },
    "started_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "UTC processing start timestamp.",
      "title": "Started At"
    },
    "status": {
      "$ref": "#/components/schemas/ReportStatus"
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "UTC last-transition timestamp.",
      "title": "Updated At"
    }
  },
  "required": [
    "report_id",
    "status"
  ],
  "title": "Report",
  "type": "object"
}
ReportAcceptedReportAccepted
{
  "properties": {
    "estimated_seconds": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Rough estimate of how long the analysis will take, derived from the length of the submitted text. Indicative only: it excludes queue wait and does not react to server load.",
      "title": "Estimated Seconds"
    },
    "events_url": {
      "description": "Relative URL of the optional SSE status stream.",
      "title": "Events Url",
      "type": "string"
    },
    "external_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Caller-provided correlation identifier.",
      "title": "External Id"
    },
    "report_id": {
      "description": "Unique arText report identifier.",
      "title": "Report Id",
      "type": "string"
    },
    "status": {
      "$ref": "#/components/schemas/ReportStatus",
      "description": "Initial queue status; always queued for a newly accepted report."
    },
    "status_url": {
      "description": "Relative URL of the report status resource.",
      "title": "Status Url",
      "type": "string"
    }
  },
  "required": [
    "report_id",
    "status",
    "status_url",
    "events_url"
  ],
  "title": "ReportAccepted",
  "type": "object"
}
ReportDefaultsExact fields to forward to POST /v1/reports for this genre.
{
  "description": "Exact fields to forward to POST /v1/reports for this genre.",
  "properties": {
    "domain_slug": {
      "description": "Value for the domain_slug field of a report request.",
      "title": "Domain Slug",
      "type": "string"
    },
    "language": {
      "description": "Analysis language the slugs below belong to.",
      "title": "Language",
      "type": "string"
    },
    "text_type_slug": {
      "description": "Value for the text_type_slug field of a report request.",
      "title": "Text Type Slug",
      "type": "string"
    }
  },
  "required": [
    "language",
    "domain_slug",
    "text_type_slug"
  ],
  "title": "ReportDefaults",
  "type": "object"
}
ReportFailureReportFailure
{
  "properties": {
    "code": {
      "const": "analysis_failed",
      "default": "analysis_failed",
      "title": "Code",
      "type": "string"
    },
    "message": {
      "description": "Safe failure description suitable for API clients.",
      "title": "Message",
      "type": "string"
    }
  },
  "required": [
    "message"
  ],
  "title": "ReportFailure",
  "type": "object"
}
ReportPhasePunto de la tubería mientras el estado es `running`. No es un porcentaje y no debe presentarse como tal: `analyzing` se lleva el 94 % del tiempo (una única llamada a FreeLing, que no informa de su avance), así que una barra basada en esto se quedaría clavada casi todo el rato. Sirve para decir qué está pasando y que sigue vivo; para «cuánto queda» está `estimated_seconds`.
{
  "description": "Punto de la tuber\u00eda mientras el estado es `running`.\n\nNo es un porcentaje y no debe presentarse como tal: `analyzing` se lleva el\n94 % del tiempo (una \u00fanica llamada a FreeLing, que no informa de su avance),\nas\u00ed que una barra basada en esto se quedar\u00eda clavada casi todo el rato. Sirve\npara decir qu\u00e9 est\u00e1 pasando y que sigue vivo; para \u00abcu\u00e1nto queda\u00bb est\u00e1\n`estimated_seconds`.",
  "enum": [
    "analyzing",
    "building"
  ],
  "title": "ReportPhase",
  "type": "string"
}
ReportRequestStable input accepted from API integrations.
{
  "additionalProperties": false,
  "description": "Stable input accepted from API integrations.",
  "properties": {
    "domain_slug": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional text domain (\u00e1mbito) the genre belongs to, as listed by GET /v1/text-types. Omit it to name the genre by text_type_slug alone; send it only to disambiguate after a 422 with code ambiguous-genre.",
      "examples": [
        "lenguaje-claro"
      ],
      "title": "Domain Slug"
    },
    "external_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional caller-owned correlation identifier returned unchanged.",
      "title": "External Id"
    },
    "language": {
      "default": "es",
      "description": "Language used for analysis: es, ca or en.",
      "title": "Language",
      "type": "string"
    },
    "text": {
      "description": "Plain text to analyze.",
      "minLength": 1,
      "title": "Text",
      "type": "string"
    },
    "text_type_slug": {
      "description": "Text type (genre) inside domain_slug, as listed by GET /v1/text-types. The pair selects the rules, thresholds and glossaries applied to the text.",
      "examples": [
        "texto-juridico-administrativo-dirigido-a-la-ciudadania"
      ],
      "minLength": 1,
      "title": "Text Type Slug",
      "type": "string"
    }
  },
  "required": [
    "text_type_slug",
    "text"
  ],
  "title": "ReportRequest",
  "type": "object"
}
ReportResultReportResult
{
  "properties": {
    "applied_thresholds": {
      "additionalProperties": {
        "additionalProperties": true,
        "type": "object"
      },
      "description": "Thresholds each rule actually read while evaluating this report, keyed by metric_id. Rules disabled for the genre never run and are absent. Values are the effective ones, whether configured for the genre or inherited from the language defaults.",
      "title": "Applied Thresholds",
      "type": "object"
    },
    "genre": {
      "$ref": "#/components/schemas/Genre"
    },
    "language": {
      "description": "Language actually used for analysis.",
      "title": "Language",
      "type": "string"
    },
    "measurements": {
      "items": {
        "$ref": "#/components/schemas/Measurement"
      },
      "title": "Measurements",
      "type": "array"
    },
    "offset_unit": {
      "const": "unicode_code_points",
      "default": "unicode_code_points",
      "description": "Unit used by every start and end offset in the result.",
      "title": "Offset Unit",
      "type": "string"
    },
    "recommendations": {
      "description": "Issues found by the suggestion rules, one item per rule that matched.",
      "items": {
        "$ref": "#/components/schemas/Recommendation"
      },
      "title": "Recommendations",
      "type": "array"
    },
    "schema_version": {
      "const": "2.0",
      "default": "2.0",
      "description": "Version of this public result contract.",
      "title": "Schema Version",
      "type": "string"
    }
  },
  "required": [
    "language",
    "genre"
  ],
  "title": "ReportResult",
  "type": "object"
}
ReportStatusReportStatus
{
  "enum": [
    "queued",
    "running",
    "completed",
    "failed"
  ],
  "title": "ReportStatus",
  "type": "string"
}
SentenceConnectorBaseA discourse connector found inside a long sentence, with its position. It is not another appearance of the occurrence —that is what `spans` is for— but something that lives inside it: the connector joining two clauses of a sentence the report proposes to split. Splitting turns those clauses into separate sentences, so the connector would have to change with them, and that is why it travels with its own alternatives.
{
  "description": "A discourse connector found inside a long sentence, with its position.\n\nIt is not another appearance of the occurrence \u2014that is what `spans` is for\u2014\nbut something that lives inside it: the connector joining two clauses of a\nsentence the report proposes to split. Splitting turns those clauses into\nseparate sentences, so the connector would have to change with them, and\nthat is why it travels with its own alternatives.",
  "properties": {
    "alternatives": {
      "description": "Inter-sentence connectors of the same relation, capitalised and in alphabetical order: what to write instead if the sentence is split at this point.",
      "items": {
        "type": "string"
      },
      "title": "Alternatives",
      "type": "array"
    },
    "end": {
      "description": "Exclusive offset in the original input text.",
      "minimum": 0.0,
      "title": "End",
      "type": "integer"
    },
    "relation": {
      "description": "Semantic relation the connector expresses (cause, antithesis, concession\u2026), as named by the discourse connector model.",
      "title": "Relation",
      "type": "string"
    },
    "scope": {
      "description": "Whether the connector joins clauses inside one sentence (intra) or links separate sentences (inter). The ones found inside a long sentence are intra; their alternatives are inter, because splitting turns the parts into sentences.",
      "pattern": "^(intra|inter)$",
      "title": "Scope",
      "type": "string"
    },
    "start": {
      "description": "Inclusive offset in the original input text.",
      "minimum": 0.0,
      "title": "Start",
      "type": "integer"
    },
    "text": {
      "description": "Fragment found in this range.",
      "title": "Text",
      "type": "string"
    }
  },
  "required": [
    "start",
    "end",
    "text",
    "relation",
    "scope"
  ],
  "title": "SentenceConnectorBase",
  "type": "object"
}
TextDomainTextDomain
{
  "properties": {
    "name": {
      "description": "Localized text domain name.",
      "title": "Name",
      "type": "string"
    },
    "slug": {
      "description": "Stable text domain identifier accepted by POST /v1/reports.",
      "title": "Slug",
      "type": "string"
    }
  },
  "required": [
    "slug",
    "name"
  ],
  "title": "TextDomain",
  "type": "object"
}
TextEditTextEdit
{
  "properties": {
    "end": {
      "description": "Exclusive offset in the original input text.",
      "minimum": 0.0,
      "title": "End",
      "type": "integer"
    },
    "start": {
      "description": "Inclusive offset in the original input text.",
      "minimum": 0.0,
      "title": "Start",
      "type": "integer"
    },
    "text": {
      "description": "Text to splice into the range. Empty text deletes it; start == end inserts text.",
      "title": "Text",
      "type": "string"
    }
  },
  "required": [
    "start",
    "end",
    "text"
  ],
  "title": "TextEdit",
  "type": "object"
}
TextSpanBaseUn tramo del texto original, con lo que hay escrito en él.
{
  "description": "Un tramo del texto original, con lo que hay escrito en \u00e9l.",
  "properties": {
    "end": {
      "description": "Exclusive offset in the original input text.",
      "minimum": 0.0,
      "title": "End",
      "type": "integer"
    },
    "start": {
      "description": "Inclusive offset in the original input text.",
      "minimum": 0.0,
      "title": "Start",
      "type": "integer"
    },
    "text": {
      "description": "Fragment found in this range.",
      "title": "Text",
      "type": "string"
    }
  },
  "required": [
    "start",
    "end",
    "text"
  ],
  "title": "TextSpanBase",
  "type": "object"
}
TextTypeTextType
{
  "properties": {
    "name": {
      "description": "Localized text type name.",
      "title": "Name",
      "type": "string"
    },
    "slug": {
      "description": "Stable text type identifier accepted by POST /v1/reports.",
      "title": "Slug",
      "type": "string"
    }
  },
  "required": [
    "slug",
    "name"
  ],
  "title": "TextType",
  "type": "object"
}
ValidationErrorValidationError
{
  "properties": {
    "loc": {
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          }
        ]
      },
      "title": "Location",
      "type": "array"
    },
    "msg": {
      "title": "Message",
      "type": "string"
    },
    "type": {
      "title": "Error Type",
      "type": "string"
    }
  },
  "required": [
    "loc",
    "msg",
    "type"
  ],
  "title": "ValidationError",
  "type": "object"
}