Skip to content

Commit

Permalink
Order Map entries when serializing registry artifacts
Browse files Browse the repository at this point in the history
- Based on quarkusio#37413
  • Loading branch information
gastaldi committed Dec 5, 2023
1 parent 2aeab7f commit 69ef6ae
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ private static ObjectMapper mapper(Path p) {
}

public static ObjectMapper initMapper(ObjectMapper mapper) {
mapper.addMixIn(ArtifactCoords.class, JsonArtifactCoordsMixin.class);
mapper.enable(SerializationFeature.INDENT_OUTPUT);
mapper.setPropertyNamingStrategy(PropertyNamingStrategies.KEBAB_CASE);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.addMixIn(ArtifactCoords.class, JsonArtifactCoordsMixin.class)
.enable(SerializationFeature.INDENT_OUTPUT)
.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS)
.setPropertyNamingStrategy(PropertyNamingStrategies.KEBAB_CASE)
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
return mapper;
}

Expand Down

0 comments on commit 69ef6ae

Please sign in to comment.