private static Object [ ] getExample ( Property property , Map < String , Model > definitions , DocumentResolver definitionDocumentResolver , MarkupDocBuilder markupDocBuilder , Map < String , Integer > refStack ) { if ( property . getExample ( ) != null ) { return new Object [ ] { property . getExample ( ) } ; } else if ( property instanceof ArrayProperty ) { return new Object [ ] { generateExampleForArrayProperty ( ( ArrayProperty ) property , definitions , definitionDocumentResolver , markupDocBuilder , refStack ) } ; } else if ( property instanceof RefProperty ) { return new Object [ ] { generateExampleForRefModel ( true , ( ( RefProperty ) property ) . getSimpleRef ( ) , definitions , definitionDocumentResolver , markupDocBuilder , refStack ) } ; } else { return new Object [ ] { PropertyAdapter . generateExample ( property , markupDocBuilder ) } ; } }
Get example from a property