pub fn build_openapi(data: &Data, public_only: bool) -> Result<Value>
Builds the document. Separated from writing so tests can assert on the value without touching a filesystem.