public String identifyKind(String jsonSnippet){
        if(jsonSnippet == null) {
            return null;
        }
        try {
            ObjectMapper objectMapper = ObjectMapperFactory.yamlMapper();
            JsonNode jsonNode  = objectMapper.readTree(jsonSnippet);
            return jsonNode.get("kind").asText();
        } catch (Exception e) {
            logger.error("Error while trying to identify kind in Snippet {}",jsonSnippet,e);
        }
        return null;
    }
This class is responsible for processing Custom K8s Snippets and related operations .

@author Nishanth Panthangi
manifest-generator/generator-services/src/main/java/io/hyscale/generator/services/processor/CustomSnippetsProcessor.java