public JavaType getPrimaryType() {
			JavaType forSerializationType = null;
			if (forSerialization != null) {
				forSerializationType = forSerialization.getPrimaryType();
			}

			JavaType forDeserializationType = null;
			if (forDeserialization != null) {
				forDeserializationType = forDeserialization.getPrimaryType();
			}

			if (forSerializationType != null && forDeserializationType != null && forSerializationType != forDeserializationType) {
				throw new IllegalStateException("The property " + forSerialization.getName() + " has different types for serialization and deserialization: "
						+ forSerializationType + " and " + forDeserializationType);
			}

			return forSerializationType != null ? forSerializationType : forDeserializationType;
		}
Type determined from the primary member for the property being built.
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java