Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#160 Fix creation problems for AnyOf, OneOf
Browse files Browse the repository at this point in the history
jemacineiras committed Jun 21, 2023
1 parent 718e67f commit eefb23e
Showing 18 changed files with 102 additions and 148 deletions.
Original file line number Diff line number Diff line change
@@ -4,29 +4,31 @@
* * file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package com.sngular.api.generator.plugin.asyncapi;
package com.sngular.api.generator.plugin.asyncapi.model;

import com.sngular.api.generator.plugin.asyncapi.model.SchemaObject;
import com.sngular.api.generator.plugin.asyncapi.util.BindingTypeEnum;
import lombok.Builder;
import lombok.Value;
import org.apache.commons.lang3.StringUtils;

@Value
public class MethodObject {

private String operationId;
String operationId;

private String classNamespace;
String classNamespace;

private String className;
String className;

private String type;
String type;

private String channelName;
String channelName;

private SchemaObject schemaObject;
SchemaObject schemaObject;

private String keyClassName;
String keyClassName;

private String bindingType;
String bindingType;

public MethodObject(final String operationId, final String classNamespace, final String type, final String keyClassName, final String bindingType) {
this(operationId, classNamespace, type, null, keyClassName, bindingType);
@@ -36,6 +38,7 @@ public MethodObject(final String operationId, final String classNamespace, final
this(operationId, classNamespace, type, channelName, null, keyClassName, bindingType);
}

@Builder(toBuilder = true)
public MethodObject(final String operationId, final String classNamespace, final String type, final String channelName, final SchemaObject schemaObject,
final String keyClassName, final String bindingType) {
this.operationId = operationId;
@@ -49,53 +52,4 @@ public MethodObject(final String operationId, final String classNamespace, final
this.bindingType = StringUtils.isEmpty(bindingType) ? BindingTypeEnum.NONBINDING.getValue() : bindingType;
}

protected final void setOperationId(final String operationId) {
this.operationId = operationId;
}

protected final void setClassNamespace(final String classNamespace) {
this.classNamespace = classNamespace;
}

protected final void setClassName(final String className) {
this.className = className;
}

protected final void setType(final String type) {
this.type = type;
}

protected final void setChannelName(final String channelName) {
this.channelName = channelName;
}

protected final void setSchemaObject(final SchemaObject schemaObject) {
this.schemaObject = schemaObject;
}

public final String getOperationId() {
return operationId;
}

public final String getClassNamespace() {
return classNamespace;
}

public final String getClassName() {
return className;
}

public final String getType() {
return type;
}

public final String getChannelName() {
return channelName;
}

public final SchemaObject getSchemaObject() {
return schemaObject;
}

public final String getBindingType() { return bindingType; }
}
Original file line number Diff line number Diff line change
@@ -20,9 +20,9 @@
import java.util.Objects;
import java.util.Set;

import com.sngular.api.generator.plugin.asyncapi.MethodObject;
import com.sngular.api.generator.plugin.asyncapi.exception.FileSystemException;
import com.sngular.api.generator.plugin.asyncapi.exception.NonSupportedBindingException;
import com.sngular.api.generator.plugin.asyncapi.model.MethodObject;
import com.sngular.api.generator.plugin.asyncapi.model.SchemaFieldObject;
import com.sngular.api.generator.plugin.asyncapi.model.SchemaObject;
import com.sngular.api.generator.plugin.asyncapi.util.BindingTypeEnum;
Original file line number Diff line number Diff line change
@@ -19,9 +19,9 @@ public class ${supplierClassName?cap_first} {
<#list publishMethods as method>
private final I${method.operationId?cap_first} ${method.operationId?uncap_first};

</#list>
private final ${method.keyClassName} key;

</#list>
protected ${supplierClassName?cap_first}(<#list publishMethods as method>final I${method.operationId?cap_first} ${method.operationId?uncap_first}<#sep>, </#list>) {
<#list publishMethods as method>
this.${method.operationId?uncap_first} = ${method.operationId?uncap_first};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.schemas;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas;

import java.util.Objects;

@@ -11,11 +11,11 @@
public class CreateOrderMapper {

@JsonProperty(value ="order")
private com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderMapper order;
private com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderMapper order;
@JsonProperty(value ="waiter")
private com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.WaiterMapper waiter;
private com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.WaiterMapper waiter;

private CreateOrderMapper(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderMapper order, com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.WaiterMapper waiter) {
private CreateOrderMapper(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderMapper order, com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.WaiterMapper waiter) {
this.order = order;
this.waiter = waiter;

@@ -34,15 +34,15 @@ public static CreateOrderMapper.CreateOrderMapperBuilder builder() {
@JsonPOJOBuilder(buildMethodName = "build", withPrefix = "")
public static class CreateOrderMapperBuilder {

private com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderMapper order;
private com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.WaiterMapper waiter;
private com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderMapper order;
private com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.WaiterMapper waiter;

public CreateOrderMapper.CreateOrderMapperBuilder order(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderMapper order) {
public CreateOrderMapper.CreateOrderMapperBuilder order(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderMapper order) {
this.order = order;
return this;
}

public CreateOrderMapper.CreateOrderMapperBuilder waiter(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.WaiterMapper waiter) {
public CreateOrderMapper.CreateOrderMapperBuilder waiter(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.WaiterMapper waiter) {
this.waiter = waiter;
return this;
}
@@ -58,10 +58,10 @@ public CreateOrderMapper build() {
* @return order
*/
@Schema(name = "order", required = false)
public com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderMapper getOrder() {
public com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderMapper getOrder() {
return order;
}
public void setOrder(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderMapper order) {
public void setOrder(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderMapper order) {
this.order = order;
}

@@ -70,10 +70,10 @@ public void setOrder(com.sngular.scsplugin.filegenerationwithkey.model.event.sch
* @return waiter
*/
@Schema(name = "waiter", required = false)
public com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.WaiterMapper getWaiter() {
public com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.WaiterMapper getWaiter() {
return waiter;
}
public void setWaiter(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.WaiterMapper waiter) {
public void setWaiter(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.WaiterMapper waiter) {
this.waiter = waiter;
}

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.consumer;
package com.sngular.scsplugin.filegenerationwithkafkabindings.model.event.consumer;

import com.sngular.scsplugin.filegenerationwithkey.model.event.messages.OrderCreatedDTO;
import com.sngular.scsplugin.filegenerationwithkafkabindings.model.event.messages.OrderCreatedDTO;

public interface IPublishOperationFileGenerationWithKey {
public interface IPublishOperationFileGenerationWithKafkaBindings {

void publishOperationFileGenerationWithKey(final OrderCreatedDTO value);
void publishOperationFileGenerationWithKafkaBindings(final OrderCreatedDTO value);
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.producer;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.producer;

import com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.CreateOrderMapper;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.CreateOrderMapper;

public interface ISubscribeOperationFileGenerationWithKey {
public interface ISubscribeOperationFileGenerationWithKafkaBindings {

CreateOrderMapper subscribeOperationFileGenerationWithKey(String key);
CreateOrderMapper subscribeOperationFileGenerationWithKafkaBindings(String key);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.messages;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.messages;

import java.util.Objects;

@@ -11,9 +11,9 @@
public class OrderCreatedDTO {

@JsonProperty(value ="payload")
private com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderDTO payload;
private com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderDTO payload;

private OrderCreatedDTO(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderDTO payload) {
private OrderCreatedDTO(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderDTO payload) {
this.payload = payload;

}
@@ -30,9 +30,9 @@ public static OrderCreatedDTO.OrderCreatedDTOBuilder builder() {
@JsonPOJOBuilder(buildMethodName = "build", withPrefix = "")
public static class OrderCreatedDTOBuilder {

private com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderDTO payload;
private com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderDTO payload;

public OrderCreatedDTO.OrderCreatedDTOBuilder payload(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderDTO payload) {
public OrderCreatedDTO.OrderCreatedDTOBuilder payload(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderDTO payload) {
this.payload = payload;
return this;
}
@@ -48,10 +48,10 @@ public OrderCreatedDTO build() {
* @return payload
*/
@Schema(name = "payload", required = false)
public com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderDTO getPayload() {
public com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderDTO getPayload() {
return payload;
}
public void setPayload(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderDTO payload) {
public void setPayload(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderDTO payload) {
this.payload = payload;
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.schemas;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas;

import java.util.Objects;

@@ -20,9 +20,9 @@ public class OrderDTO {
@JsonProperty(value ="amount")
private BigDecimal amount;
@JsonProperty(value ="lines")
private List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineDTO> lines = new ArrayList<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineDTO>();
private List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineDTO> lines = new ArrayList<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineDTO>();

private OrderDTO(String ref, String clientRef, BigDecimal amount, List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineDTO> lines) {
private OrderDTO(String ref, String clientRef, BigDecimal amount, List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineDTO> lines) {
this.ref = ref;
this.clientRef = clientRef;
this.amount = amount;
@@ -48,7 +48,7 @@ public static class OrderDTOBuilder {
private String ref;
private String clientRef;
private BigDecimal amount;
private List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineDTO> lines = new ArrayList<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineDTO>();
private List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineDTO> lines = new ArrayList<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineDTO>();

public OrderDTO.OrderDTOBuilder ref(String ref) {
this.ref = ref;
@@ -64,14 +64,14 @@ public OrderDTO.OrderDTOBuilder amount(BigDecimal amount) {
this.amount = amount;
return this;
}
public OrderDTO.OrderDTOBuilder lines(List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineDTO> lines) {
public OrderDTO.OrderDTOBuilder lines(List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineDTO> lines) {
if (!lines.isEmpty()) {
this.lines.addAll(lines);
}
return this;
}

public OrderDTO.OrderDTOBuilder line(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineDTO line) {
public OrderDTO.OrderDTOBuilder line(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineDTO line) {
if (line != null) {
this.lines.add(line);
}
@@ -125,10 +125,10 @@ public void setAmount(BigDecimal amount) {
* @return lines
*/
@Schema(name = "lines", required = false)
public List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineDTO> getLines() {
public List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineDTO> getLines() {
return lines;
}
public void setLines(List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineDTO> lines) {
public void setLines(List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineDTO> lines) {
this.lines = lines;
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.schemas;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas;

import java.util.Objects;

@@ -8,8 +8,8 @@
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
import java.util.ArrayList;
import com.sngular.scsplugin.filegenerationwithkey.model.event.exception.ModelClassException;
import com.sngular.scsplugin.filegenerationwithkey.model.event.customvalidator.NotNull;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.exception.ModelClassException;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.customvalidator.NotNull;

@JsonDeserialize(builder = OrderLineDTO.OrderLineDTOBuilder.class)
public class OrderLineDTO {
@@ -19,9 +19,9 @@ public class OrderLineDTO {
private final String ref;
@JsonProperty(value ="products")
@NotNull
private final List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductDTO> products;
private final List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductDTO> products;

private OrderLineDTO(String ref, List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductDTO> products) {
private OrderLineDTO(String ref, List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductDTO> products) {
this.ref = ref;
this.products = products;

@@ -43,20 +43,20 @@ public static OrderLineDTO.OrderLineDTOBuilder builder() {
public static class OrderLineDTOBuilder {

private String ref;
private List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductDTO> products = new ArrayList<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductDTO>();
private List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductDTO> products = new ArrayList<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductDTO>();

public OrderLineDTO.OrderLineDTOBuilder ref(String ref) {
this.ref = ref;
return this;
}
public OrderLineDTO.OrderLineDTOBuilder products(List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductDTO> products) {
public OrderLineDTO.OrderLineDTOBuilder products(List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductDTO> products) {
if (!products.isEmpty()) {
this.products.addAll(products);
}
return this;
}

public OrderLineDTO.OrderLineDTOBuilder product(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductDTO product) {
public OrderLineDTO.OrderLineDTOBuilder product(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductDTO product) {
if (product != null) {
this.products.add(product);
}
@@ -83,7 +83,7 @@ public String getRef() {
* @return products
*/
@Schema(name = "products", required = true)
public List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductDTO> getProducts() {
public List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductDTO> getProducts() {
return products;
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.schemas;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas;

import java.util.Objects;

@@ -8,8 +8,8 @@
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
import java.util.ArrayList;
import com.sngular.scsplugin.filegenerationwithkey.model.event.exception.ModelClassException;
import com.sngular.scsplugin.filegenerationwithkey.model.event.customvalidator.NotNull;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.exception.ModelClassException;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.customvalidator.NotNull;

@JsonDeserialize(builder = OrderLineMapper.OrderLineMapperBuilder.class)
public class OrderLineMapper {
@@ -19,9 +19,9 @@ public class OrderLineMapper {
private final String ref;
@JsonProperty(value ="products")
@NotNull
private final List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductMapper> products;
private final List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductMapper> products;

private OrderLineMapper(String ref, List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductMapper> products) {
private OrderLineMapper(String ref, List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductMapper> products) {
this.ref = ref;
this.products = products;

@@ -43,20 +43,20 @@ public static OrderLineMapper.OrderLineMapperBuilder builder() {
public static class OrderLineMapperBuilder {

private String ref;
private List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductMapper> products = new ArrayList<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductMapper>();
private List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductMapper> products = new ArrayList<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductMapper>();

public OrderLineMapper.OrderLineMapperBuilder ref(String ref) {
this.ref = ref;
return this;
}
public OrderLineMapper.OrderLineMapperBuilder products(List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductMapper> products) {
public OrderLineMapper.OrderLineMapperBuilder products(List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductMapper> products) {
if (!products.isEmpty()) {
this.products.addAll(products);
}
return this;
}

public OrderLineMapper.OrderLineMapperBuilder product(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductMapper product) {
public OrderLineMapper.OrderLineMapperBuilder product(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductMapper product) {
if (product != null) {
this.products.add(product);
}
@@ -83,7 +83,7 @@ public String getRef() {
* @return products
*/
@Schema(name = "products", required = true)
public List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderProductMapper> getProducts() {
public List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderProductMapper> getProducts() {
return products;
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.schemas;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas;

import java.util.Objects;

@@ -20,9 +20,9 @@ public class OrderMapper {
@JsonProperty(value ="amount")
private BigDecimal amount;
@JsonProperty(value ="lines")
private List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineMapper> lines = new ArrayList<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineMapper>();
private List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineMapper> lines = new ArrayList<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineMapper>();

private OrderMapper(String ref, String clientRef, BigDecimal amount, List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineMapper> lines) {
private OrderMapper(String ref, String clientRef, BigDecimal amount, List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineMapper> lines) {
this.ref = ref;
this.clientRef = clientRef;
this.amount = amount;
@@ -48,7 +48,7 @@ public static class OrderMapperBuilder {
private String ref;
private String clientRef;
private BigDecimal amount;
private List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineMapper> lines = new ArrayList<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineMapper>();
private List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineMapper> lines = new ArrayList<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineMapper>();

public OrderMapper.OrderMapperBuilder ref(String ref) {
this.ref = ref;
@@ -64,14 +64,14 @@ public OrderMapper.OrderMapperBuilder amount(BigDecimal amount) {
this.amount = amount;
return this;
}
public OrderMapper.OrderMapperBuilder lines(List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineMapper> lines) {
public OrderMapper.OrderMapperBuilder lines(List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineMapper> lines) {
if (!lines.isEmpty()) {
this.lines.addAll(lines);
}
return this;
}

public OrderMapper.OrderMapperBuilder line(com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineMapper line) {
public OrderMapper.OrderMapperBuilder line(com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineMapper line) {
if (line != null) {
this.lines.add(line);
}
@@ -125,10 +125,10 @@ public void setAmount(BigDecimal amount) {
* @return lines
*/
@Schema(name = "lines", required = false)
public List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineMapper> getLines() {
public List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineMapper> getLines() {
return lines;
}
public void setLines(List<com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.OrderLineMapper> lines) {
public void setLines(List<com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.OrderLineMapper> lines) {
this.lines = lines;
}

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.schemas;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas;

import java.util.Objects;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import com.sngular.scsplugin.filegenerationwithkey.model.event.exception.ModelClassException;
import com.sngular.scsplugin.filegenerationwithkey.model.event.customvalidator.NotNull;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.exception.ModelClassException;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.customvalidator.NotNull;

@JsonDeserialize(builder = OrderProductDTO.OrderProductDTOBuilder.class)
public class OrderProductDTO {
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.schemas;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas;

import java.util.Objects;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import com.sngular.scsplugin.filegenerationwithkey.model.event.exception.ModelClassException;
import com.sngular.scsplugin.filegenerationwithkey.model.event.customvalidator.NotNull;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.exception.ModelClassException;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.customvalidator.NotNull;

@JsonDeserialize(builder = OrderProductMapper.OrderProductMapperBuilder.class)
public class OrderProductMapper {
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.producer;
package com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.producer;

import java.util.function.Supplier;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.sngular.scsplugin.filegenerationwithkey.model.event.schemas.CreateOrderMapper;
import com.sngular.scsplugin.fileGenerationWithKafkaBindings.model.event.schemas.CreateOrderMapper;

@Configuration
public class Producer {

private final ISubscribeOperationFileGenerationWithKey subscribeOperationFileGenerationWithKey;
private final ISubscribeOperationFileGenerationWithKafkaBindings subscribeOperationFileGenerationWithKafkaBindings;

protected Producer(final ISubscribeOperationFileGenerationWithKey subscribeOperationFileGenerationWithKey) {
this.subscribeOperationFileGenerationWithKey = subscribeOperationFileGenerationWithKey;
protected Producer(final ISubscribeOperationFileGenerationWithKafkaBindings subscribeOperationFileGenerationWithKafkaBindings) {
this.subscribeOperationFileGenerationWithKafkaBindings = subscribeOperationFileGenerationWithKafkaBindings;
}

@Bean
public Supplier<CreateOrderMapper> subscribeOperationFileGenerationWithKey() {
return () -> subscribeOperationFileGenerationWithKey.subscribeOperationFileGenerationWithKey();
public Supplier<CreateOrderMapper> subscribeOperationFileGenerationWithKafkaBindings() {
return () -> subscribeOperationFileGenerationWithKafkaBindings.subscribeOperationFileGenerationWithKafkaBindings();
}


Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.consumer;
package com.sngular.scsplugin.filegenerationwithkafkabindings.model.event.consumer;

import java.util.function.Consumer;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.sngular.scsplugin.filegenerationwithkey.model.event.messages.OrderCreatedDTO;
import com.sngular.scsplugin.filegenerationwithkafkabindings.model.event.messages.OrderCreatedDTO;

@Configuration
public class TestClassName {

private final IPublishOperationFileGenerationWithKey publishOperationFileGenerationWithKey;
private final IPublishOperationFileGenerationWithKafkaBindings publishOperationFileGenerationWithKafkaBindings;

protected TestClassName(final IPublishOperationFileGenerationWithKey publishOperationFileGenerationWithKey) {
this.publishOperationFileGenerationWithKey = publishOperationFileGenerationWithKey;
protected TestClassName(final IPublishOperationFileGenerationWithKafkaBindings publishOperationFileGenerationWithKafkaBindings) {
this.publishOperationFileGenerationWithKafkaBindings = publishOperationFileGenerationWithKafkaBindings;
}

@Bean
public Consumer<Message<OrderCreatedDTO>> publishOperationFileGenerationWithKey() {
public Consumer<Message<OrderCreatedDTO>> publishOperationFileGenerationWithKafkaBindings() {
return value -> {
final var messageWrapper = MessageWrapper.builder().payload(value.getPayload()).key(value.getKey()).build();
publishOperationFileGenerationWithKey.publishOperationFileGenerationWithKey(messageWrapper);
publishOperationFileGenerationWithKafkaBindings.publishOperationFileGenerationWithKafkaBindings(messageWrapper);
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.schemas;
package com.sngular.scsplugin.filegenerationwithkafkabindings.model.event.schemas;

import java.util.Objects;

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.sngular.scsplugin.filegenerationwithkey.model.event.schemas;
package com.sngular.scsplugin.filegenerationwithkafkabindings.model.event.schemas;

import java.util.Objects;

Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@ components:
OrderCreated:
payload:
$ref: '#/components/schemas/Order'
# bindings:
# kafka:
# key:
# type: string
bindings:
kafka:
key:
type: string
schemas:
CreateOrder:
order:

0 comments on commit eefb23e

Please sign in to comment.