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. The spec lists /pets and /pets/{id} as two entries without saying they are one resource. 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, and which methods are create, read, update or delete. It also means inferring how parameters map to identifiers, and 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. The generated targets are output that a resync of a vendored target can revert. Edit the model; read the targets.