@Override
	public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {
		JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType());
		if (javaType != null) {
			for (BeanPropertyBiDefinition propertyDef : introspectBeanProperties(javaType)) {
				if (propertyDef.isAnyAnnotated(JsonUnwrapped.class)) {
					if (!TypeNameResolver.std.getUseFqn())
						PARENT_TYPES_TO_IGNORE.add(javaType.getRawClass().getSimpleName());
					else
						PARENT_TYPES_TO_IGNORE.add(javaType.getRawClass().getName());
				}
				else {
					io.swagger.v3.oas.annotations.media.Schema declaredSchema = propertyDef.getAnyAnnotation(io.swagger.v3.oas.annotations.media.Schema.class);
					if (declaredSchema != null &&
							(ArrayUtils.isNotEmpty(declaredSchema.oneOf()) || ArrayUtils.isNotEmpty(declaredSchema.allOf())) &&
							propertyDef.getPrimaryType() != null &&
							propertyDef.getPrimaryType().getRawClass() != null) {
						TYPES_TO_SKIP.add(propertyDef.getPrimaryType().getRawClass().getSimpleName());
					}
				}
			}
			if (chain.hasNext()) {
				if (!type.isResolveAsRef() && type.getParent() != null
						&& PARENT_TYPES_TO_IGNORE.stream().noneMatch(ignore -> type.getParent().getName().startsWith(ignore)))
					type.resolveAsRef(true);
				Schema<?> resolvedSchema = chain.next().resolve(type, context, chain);
				resolvedSchema = getResolvedSchema(javaType, resolvedSchema);
				if (resolvedSchema == null || resolvedSchema.get$ref() == null) {
					return resolvedSchema;
				}
				if (resolvedSchema.get$ref().contains(Components.COMPONENTS_SCHEMAS_REF)) {
					String schemaName = resolvedSchema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length());
					Schema existingSchema = context.getDefinedModels().get(schemaName);
					if (existingSchema != null && (existingSchema.getOneOf() != null || existingSchema.getAllOf() != null)) {
						return resolvedSchema;
					}
				}
				return composePolymorphicSchema(type, resolvedSchema, context.getDefinedModels().values());
			}
		}
		return null;
	}
Gets resolved schema.

@param javaType       the java type
@param resolvedSchema the resolved schema
@return the resolved schema
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java