What it is#
apidef's output is not cleaned-up OpenAPI. It is a different data structure, designed around one question: what does a client SDK need to know?
A spec describes paths. An SDK author thinks in resources. /pets and /pets/{id} are one resource scattered across two entries, and no part of the spec says so. apidef inverts that: the entity is the primary unit, and the paths that produced it are folded inside it.
Getting there means inferring what OpenAPI leaves implicit: which paths form one resource, which methods are create, read, update or delete, how parameters map to identifiers, which responses wrap the entity in an envelope. Those are heuristics, and heuristics are wrong sometimes, so every decision is recorded with a why_ trace you can read.
The model lives at apimodel.main.kit and has three top-level collections: info, entity and flow. It is rendered to jsonic files on disk, and that on-disk form is the contract with sdkgen.
Those files are editable, and the next run merges into your edits rather than clobbering them. Hold the distinction all the same: the model is a document you own and the toolchain refreshes around, while the generated targets are output that a resync of a vendored target can revert. Edit the model; read the targets.