code: public Optional<Object> getExample(boolean generateMissingExamples, MarkupDocBuilder markupDocBuilder) {
          if (property.getExample() != null) {
              return Optional.ofNullable(property.getExample());
          } else if (property instanceof MapProperty) {
              Property additionalProperty = ((MapProperty) property).getAdditionalProperties();
              if (additionalProperty.getExample() != null) {
                  return Optional.ofNullable(additionalProperty.getExample());
              } else if (generateMissingExamples) {
                  Map<String, Object> exampleMap = new HashMap<>();
                  exampleMap.put("string", generateExample(additionalProperty, markupDocBuilder));
                  return Optional.of(exampleMap);
              }
          } else if (property instanceof ArrayProperty) {
              if (generateMissingExamples) {
                  Property itemProperty = ((ArrayProperty) property).getItems();
                  List<Object> exampleArray = new ArrayList<>();
                  exampleArray.add(generateExample(itemProperty, markupDocBuilder));
                  return Optional.of(exampleArray);
              }
          } else if (generateMissingExamples) {
              return Optional.of(generateExample(property, markupDocBuilder));
          }
  
          return Optional.empty();
      }
docs: Return example display string for the given {@code property}.
  
  @param generateMissingExamples specifies if missing examples should be generated
  @param markupDocBuilder        doc builder
  @return property example display string