com.reprezen.genflow.api.normal.openapi.NormalizerDebug Maven / Gradle / Ivy
package com.reprezen.genflow.api.normal.openapi;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import io.swagger.models.Swagger;
import io.swagger.util.Yaml;
import io.swagger.v3.oas.models.OpenAPI;
/**
* Print debugging output depending on options named in
* REPREZEN_DEBUG_NORMALIZER environment variable.
*
* The env var can be set to a comma-separated list of names of enums in the
* Option enum. Debug output tagged to the corresponding options - and output
* not tagged to any output - is thereby enabled.
*
* Alternatively the env var can be set to a non-empty value that does not
* actually name any options (e.g. "true" or "on" or "all") to enable all
* options.
*/
public class NormalizerDebug {
private final static String DEBUG_VAR = "REPREZEN_DEBUG_NORMALIZER";
private static ObjectMapper mapper = Yaml.mapper();
static {
mapper.setSerializationInclusion(Include.NON_NULL);
mapper.setSerializationInclusion(Include.NON_EMPTY);
}
private static Set
© 2015 - 2025 Weber Informatics LLC | Privacy Policy