Serializes a OpenAPI object to a formatted JSON string.
static String toJsonString(OpenAPI spec) { return json.encode(spec.toJson()); }