Skip to main content

How an export is checked

A converter can have bugs. So Apiome never trusts that an exported file is legal in its format: every export is checked before you can download it, and you can also have the exported file linted, to see whether it is good of its kind. Both run on the exported file, not on the item you exported. The checks are part of every export job, whichever surface starts it.

Apiome reads the exported file back with the same importer it uses for that format — a Protobuf export is read by the Protobuf importer, a GraphQL export by the GraphQL importer — and, where the server has it, checks it with the format's own tool too (buf build, tsp compile, smithy validate, AMF, drafter, flatc, capnp compile and others; the full list is in Exports checked with the format's own tool). Each format's section of Export a spec says exactly what its check rejects.

The check ends in one of four verdicts:

VerdictWhat it meansWhat happens
ValidThe file read back cleanly.The export is delivered.
InvalidA check ran and rejected the file.The export is blocked: the job fails with EMITTED_ARTIFACT_INVALID and nothing is delivered.
SkippedThe format has a check, but its tool is not installed on this server.The export is delivered with a warning that it was not re-validated.
Not validatedApiome has no check for the format. Today that is only the curl script the .http file target can write.The export is delivered, and every surface says it was not validated — never that it passed.

In the REST API the last verdict is not_applicable; its headline reads Not validated.

Formats checked against their specification​

Every other format has a check. Most are read back by Apiome's importer and, where there is one, the format's own tool. These formats are also checked against the rules of their specification:

ExportWhat the check rejects
CloudEventsA specversion other than 1.0 (or 0.3, for an event imported at that version); a missing or empty id, source or type; a time that is not an RFC 3339 timestamp; an empty subject, datacontenttype or dataschema; both data and data_base64; an extension whose name is not lower-case letters and digits, or whose value is an object, an array or a fraction. Each event of a batch is checked, then read back.
XML-RPCA root other than methodCall or methodResponse; a methodCall without exactly one methodName, or a name with characters other than A–Z a–z 0–9 _ . : /; a value Python's own XML-RPC reader (xmlrpc.client) refuses, such as an <int> that is not a number or an unknown value type.
Connect RPCAnything buf build refuses, as for Protobuf. Without buf the export says it was not re-validated.
Kafka ConnectA schema Apiome's Kafka Connect reader refuses. The schemas and connector.json are read back together, as a pipeline is. Connect publishes no schema for its own format, so its reader is the check.
A2A Agent CardA card that breaks the A2A AgentCard schema.
MCP Tool DefinitionsAn mcpVersion Apiome does not know, or a tool that breaks the MCP Tool schema of that version.

Each finding names its rule: cloudevents.required, xmlrpc.method-name, mcp.tool-schema and so on.

An invalid verdict lists each problem on its own: the message, the file it is in, its place (a JSON pointer such as /components/schemas/Pet, or a line and column), the rule or tool that found it, and which check ran. A completed job carries the verdict next to its fidelity report; a blocked one carries it in the job's error.

An invalid export means the converter wrote something wrong, not that your item is wrong — please report it with the problems listed.

2. Lint: is the file good of its kind?​

Lint answers a different question from validation: not does it parse? but is it good? Apiome reads the exported file back and runs the same lint rules an import of that format runs, so a GraphQL export is checked by the GraphQL rules and a Protobuf export by the Protobuf rules. You get a score and a grade like a catalog item's, the findings grouped by severity, and the rules that fired.

Lint is advice: it never blocks an export or changes the verification verdict. A format Apiome cannot read back (a Postman collection, a gateway configuration) is reported as not linted, with the reason, rather than as a clean score.

Where you see the checks​

SurfaceValidationLint
Export studio — Verify stepThe Validation tab, and an Invalid — export blocked verdictThe Lint tab: score, grade and findings
Export dialogA blocked export stops at the validation stage, with its error; open it in the Export studio to see each problem—
CLI (apiome export …)A blocked export exits non-zero and prints the error and the job's error log lines—
REST APIThe job's result.validation (completed) or error.context (EMITTED_ARTIFACT_INVALID); POST /v1/export/{tenant_slug}/verify runs it without exportingPOST /v1/export/{tenant_slug}/verify

Fidelity — what the conversion keeps and loses — is a third, separate question, answered before the export runs: see Understand export fidelity.