Skip to content

Commit

Permalink
feat: Generated YAML should not contain quotes unless necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed May 14, 2020
1 parent 11a94a6 commit 536f882
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/io/dekorate/utils/Serialization.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.dekorate.deps.jackson.databind.SerializationFeature;
import io.dekorate.deps.jackson.dataformat.javaprop.JavaPropsMapper;
import io.dekorate.deps.jackson.dataformat.yaml.YAMLFactory;
import io.dekorate.deps.jackson.dataformat.yaml.YAMLGenerator.Feature;
import io.dekorate.DekorateException;
import io.dekorate.deps.kubernetes.api.model.HasMetadata;
import io.dekorate.deps.kubernetes.api.model.KubernetesList;
Expand Down Expand Up @@ -54,7 +55,7 @@ public class Serialization {
configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, false);
}};
private static final ObjectMapper YAML_MAPPER = new ObjectMapper(new YAMLFactory()) {{
private static final ObjectMapper YAML_MAPPER = new ObjectMapper(new YAMLFactory().enable(Feature.MINIMIZE_QUOTES)) {{
configure(SerializationFeature.INDENT_OUTPUT, true);
configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, false);
Expand Down

0 comments on commit 536f882

Please sign in to comment.