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

io.swagger.v3.oas.integration.FileOpenApiConfigurationLoader Maven / Gradle / Ivy

There is a newer version: 2.2.23
Show newest version
package io.swagger.v3.oas.integration;

import io.swagger.v3.oas.integration.api.OpenAPIConfiguration;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class FileOpenApiConfigurationLoader implements StringOpenApiConfigurationLoader {

    @Override
    public OpenAPIConfiguration load(String path) throws IOException {
        File file = new File(path);
        return deserializeConfig(path, readInputStreamToString(new FileInputStream(file)));
    }

    @Override
    public boolean exists(String path) {
        File file = new File(path);
        return file.exists();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy