1// Minimal YAML emitter for the OpenAPI document we build. Sufficient for the2// shapes we produce (objects, arrays, strings, numbers, booleans, null) without3// pulling in a dep. Strings are conservatively quoted whenever they contain any4// character that would change YAML parsing.56// YAML 1.2 reserves certain characters as indicators that cannot start a plain7// scalar (they must be quoted): , [ ] { } # & * ! | > ' " % @ `8// plus ? and : when followed by whitespace, plus - when followed by whitespace.9// We're conservative: if any of those rules might trip, single-quote the string.10const FIRST_CHAR_DENY = /^[,\[\]{}#&*!|>'"%@`]/;11const