@Override
	public Schema<?> resolve(
			io.swagger.v3.core.converter.AnnotatedType type,
			ModelConverterContext context,
			Iterator<ModelConverter> chain
	) {
		JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType());
		if (javaType != null && RepresentationModel.class.isAssignableFrom(javaType.getRawClass())) {
			Schema<?> schema = chain.next().resolve(type, context, chain);
			if (schema != null) {
				String schemaName = Optional.ofNullable(schema.get$ref())
						.filter(ref -> ref.startsWith(Components.COMPONENTS_SCHEMAS_REF))
						.map(ref -> ref.substring(Components.COMPONENTS_SCHEMAS_REF.length()))
						.orElse(schema.getName());
				if (schemaName != null) {
					Schema original = context.getDefinedModels().get(schemaName);
					if (original == null || original.getProperties() == null) {
						return schema;
					}
					Object links = original.getProperties().get("_links");
					if (links instanceof JsonSchema jsonSchema) {
						jsonSchema.set$ref(AnnotationsUtils.COMPONENTS_REF + "Links");
						jsonSchema.setType(null);
						jsonSchema.setItems(null);
						jsonSchema.setTypes(null);
					}
					else if (links instanceof ArraySchema arraySchema) {
						arraySchema.set$ref(AnnotationsUtils.COMPONENTS_REF + "Links");
					}
				}
			}
			return schema;
		}
		return chain.hasNext() ? chain.next().resolve(type, context, chain) : null;
	}
Instantiates a new Hateoas links converter.

@param springDocObjectMapper the spring doc object mapper
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/HateoasLinksConverter.java