in geronimo-openapi-impl/src/main/java/org/apache/geronimo/microprofile/openapi/impl/processor/AnnotationProcessor.java [876:890]
private MediaType mapContent(final Supplier<org.eclipse.microprofile.openapi.models.Components> components, final Content content) {
final MediaTypeImpl impl = new MediaTypeImpl();
if (content.encoding().length > 0) {
Stream.of(content.encoding()).forEach(e -> impl.addEncoding(e.name(), mapEncoding(components, e)));
}
impl.setSchema(schemaProcessor.mapSchema(components, content.schema(), null));
if (content.examples().length > 0) {
impl.examples(Stream.of(content.examples()).collect(toMap(
it -> of(it.name()).filter(n -> !n.isEmpty()).orElseGet(() -> it.ref()), this::mapExample)));
}
if (!content.example().isEmpty()) {
impl.example(content.example());
}
return impl;
}