All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.openapiprocessor.jsonschema.converter.PropertiesConverter Maven / Gradle / Ivy

There is a newer version: 2024.4
Show newest version
/*
 * Copyright 2021 https://github.com/openapi-processor/openapi-parser
 * PDX-License-Identifier: Apache-2.0
 */

package io.openapiprocessor.jsonschema.converter;

import org.checkerframework.checker.nullness.qual.Nullable;

import java.util.Map;

/**
 * convert a {@code Map} value to {@code T}. Primary use is to pass the all properties of the
 * current object to the converter.
 *
 * @param  target type.
 */
public interface PropertiesConverter {
    /**
     * converts the map {@code value} to a {@code T} object or null. May throw if conversion fails.
     *
     * @param value property value
     * @param location property location, json pointer
     * @return T converted value
     */
    @Nullable T convert (Map value, String location);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy