// ParseDocument reads an OpenAPI v3 description from a YAML/JSON representation. func ParseDocument(b []byte) (*Document, error) { … } // YAMLValue produces a serialized YAML representation of the document. func (d *Document) YAMLValue(comment string) ([]byte, error) { … }