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.
apidef writes those files again on every run, so an edit to them is lost. You correct the model where the toolchain reads your changes and never writes: the guide, .sdk/model/guide/guide.aontu, for how paths become entities, and .sdk/model/project.aontu for the rest. The generated targets are output too, and every regeneration overwrites them. Edit the guide and the project file, and read everything else.