Skip to content

Commit

Permalink
Fix #23 : Swith to PropertyNamingStrategies
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomYdn committed Mar 4, 2024
1 parent c274640 commit 4145417
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -17,7 +17,7 @@
* Abstract data class to store common information for packages and their versions
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@JsonIgnoreProperties
@ToString(onlyExplicitlyIncluded = true, callSuper = false)
public abstract class AbstractArtifactInfo extends AbstractInfo{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.net.MalformedURLException;
import java.net.URL;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -12,7 +12,7 @@
* Data class to store package distribution information
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class DistributionInfo extends AbstractInfo {

private String integrity;
Expand Down
4 changes: 2 additions & 2 deletions jnpm/src/main/java/org/orienteer/jnpm/dm/HumanInfo.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.orienteer.jnpm.dm;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -9,7 +9,7 @@
* Data class to store contract information
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class HumanInfo extends AbstractInfo {

private String name;
Expand Down
4 changes: 2 additions & 2 deletions jnpm/src/main/java/org/orienteer/jnpm/dm/PackageInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -13,7 +13,7 @@
* Data class to store package information
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class PackageInfo extends AbstractArtifactInfo {

@JsonProperty("_rev")
Expand Down
4 changes: 2 additions & 2 deletions jnpm/src/main/java/org/orienteer/jnpm/dm/RegistryInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Date;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -11,7 +11,7 @@
* Data class to store information about NPM registry
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class RegistryInfo extends AbstractInfo {

/*db_name: "registry"
Expand Down
4 changes: 2 additions & 2 deletions jnpm/src/main/java/org/orienteer/jnpm/dm/RepositoryInfo.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.orienteer.jnpm.dm;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -9,7 +9,7 @@
* Data class to store repository information
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class RepositoryInfo extends AbstractInfo {

private String type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.orienteer.jnpm.dm.AbstractInfo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -12,7 +12,7 @@
* Data class to store search result item
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class SearchResultItem extends AbstractInfo {

private float searchScore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.orienteer.jnpm.dm.RepositoryInfo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -17,7 +17,7 @@
* Data class to store search result
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class SearchResultPackage extends AbstractArtifactInfo {

private HumanInfo publisher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.orienteer.jnpm.dm.AbstractInfo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -15,7 +15,7 @@
* Data class to store search results
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class SearchResults extends AbstractInfo {
private int total;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "EEE MMM dd yyyy HH:mm:ss 'GMT'Z (z)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import lombok.Data;
Expand All @@ -12,7 +12,7 @@
* Data class to store score for search results
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class SearchScore {
@JsonProperty("final")
private double finalScore;
Expand Down

0 comments on commit 4145417

Please sign in to comment.