From ce58424d109bee186ad2ba8117d7df8a3bab3ac3 Mon Sep 17 00:00:00 2001 From: changlong-liu <59815250+changlong-liu@users.noreply.github.com> Date: Fri, 23 Oct 2020 17:11:11 +0800 Subject: [PATCH] check example title (#100) * check example title * indent Co-authored-by: Changlong Liu --- src/helper.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/helper.ts b/src/helper.ts index 38a0011..3477f8b 100644 --- a/src/helper.ts +++ b/src/helper.ts @@ -858,8 +858,10 @@ export class Helper { return false; } const props = Object.getOwnPropertyNames(o); - if (props.find((prop) => prop === 'parameters') && props.find((prop) => prop === 'responses') && props.length==2) { - return true; + if (props.find((prop) => prop === 'parameters') && props.find((prop) => prop === 'responses')) { + if (props.length==2 || + props.length==3 && props.find((prop) => prop === 'title')) + return true; } return false; }