Skip to content

Commit

Permalink
Merge pull request #30 from st-yclee/main
Browse files Browse the repository at this point in the history
yaml generator --- 값 제거
  • Loading branch information
st-yclee authored Sep 13, 2024
2 parents 1152bf9 + a9e115a commit 5e8f261
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;
import kr.co.mcmp.api.manifest.k8s.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
Expand All @@ -14,7 +15,8 @@
@RequiredArgsConstructor
public class YamlManifestService {

private final ObjectMapper mapper = new ObjectMapper(new YAMLFactory())
private final ObjectMapper mapper = new ObjectMapper(new YAMLFactory()
.disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER))
.setSerializationInclusion(JsonInclude.Include.NON_NULL);

public String generateYamlDeployments(K8SDeploymentDto deployments) {
Expand Down

0 comments on commit 5e8f261

Please sign in to comment.