Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
fix: correct JSON attribute names and structure (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
kayman-mk committed May 12, 2022
1 parent e16f132 commit 562174f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
Expand Up @@ -20,24 +20,42 @@ public class CommunicationModel {
/**
* Identifier for the current project, e.g. gitlab project id
*/
@SerializedName(value="projectId")
@SerializedName(value="project_id")

private String projectId;

/**
* A name for the project. Just for information.
*/
@SerializedName(value="projectName")

@SerializedName(value="project_name")
private String projectName;

/**
* All sender and receiver endpoints found.
* All HTTP receiver endpoints.
*/
@SerializedName(value="http_consumers")
private Collection<ISenderReceiverCommunication> httpConsumers;

/**
* All HTTP producers.
*/
@SerializedName(value="endpoints")
private Collection<ISenderReceiverCommunication> endpoints;
@SerializedName(value="http_producers")
private Collection<ISenderReceiverCommunication> httpProducers;

/**
* All JMS receivers.
*/

@SerializedName(value="jms_consumers")
private Collection<ISenderReceiverCommunication> jmsConsumers;


public void visit(AbstractCommunicationModelVisitor visitor) {
visitor.visit(this);

endpoints.forEach(e -> e.visit(visitor));
httpConsumers.forEach(e -> e.visit(visitor));
httpProducers.forEach(e -> e.visit(visitor));
jmsConsumers.forEach(e -> e.visit(visitor));
}
}
Expand Up @@ -8,9 +8,9 @@
*/
@Value
public class HttpConsumer implements ISenderReceiverCommunication {
@SerializedName(value="className")
@SerializedName(value="class_name")
private final String className;
@SerializedName(value="methodName")
@SerializedName(value="method_name")
private final String methodName;

@SerializedName(value="type")
Expand Down
Expand Up @@ -11,13 +11,13 @@ public class HttpProducer implements ISenderReceiverCommunication {
/**
* The full qualified classname where the producer lives.
*/
@SerializedName(value="className")
@SerializedName(value="class_name")
private final String className;

/**
* The method name of the producer.
*/
@SerializedName(value="methodName")
@SerializedName(value="method_name")
private final String methodName;

/**
Expand All @@ -35,7 +35,7 @@ public class HttpProducer implements ISenderReceiverCommunication {
/**
* The project id of the referenced project.
*/
@SerializedName(value="destinationProjectId")
@SerializedName(value="destination_project_id")
private final String destinationProjectId;

@Override
Expand Down
Expand Up @@ -14,11 +14,11 @@
@ToString
@EqualsAndHashCode
public class JmsReceiver implements ISenderReceiverCommunication {
@SerializedName(value="className")
@SerializedName(value="class_name")
private String className;

// e.g. "javax.jms.Queue"
@SerializedName(value="destinationType")
@SerializedName(value="destination_type")
private String destinationType;

// e.g. "jms/catalogs/customer"
Expand Down

0 comments on commit 562174f

Please sign in to comment.