-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6359a71
commit 4d6f39f
Showing
17 changed files
with
609 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
...e/src/test/resources/asyncapigenerator/testRareCharsGeneration/assets/CreateOrderDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
package com.sngular.scsplugin.rarecharsgeneration.model.event; | ||
|
||
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; | ||
|
||
@JsonDeserialize(builder = CreateOrderDTO.CreateOrderDTOBuilder.class) | ||
public class CreateOrderDTO { | ||
|
||
@JsonProperty(value ="order") | ||
private OrderDTO order; | ||
@JsonProperty(value ="waiter") | ||
private WaiterDTO waiter; | ||
|
||
private CreateOrderDTO(CreateOrderDTOBuilder builder) { | ||
this.order = builder.order; | ||
this.waiter = builder.waiter; | ||
|
||
} | ||
|
||
public static CreateOrderDTO.CreateOrderDTOBuilder builder() { | ||
return new CreateOrderDTO.CreateOrderDTOBuilder(); | ||
} | ||
|
||
@JsonPOJOBuilder(buildMethodName = "build", withPrefix = "") | ||
public static class CreateOrderDTOBuilder { | ||
|
||
private OrderDTO order; | ||
|
||
private WaiterDTO waiter; | ||
|
||
public CreateOrderDTO.CreateOrderDTOBuilder order(OrderDTO order) { | ||
this.order = order; | ||
return this; | ||
} | ||
|
||
public CreateOrderDTO.CreateOrderDTOBuilder waiter(WaiterDTO waiter) { | ||
this.waiter = waiter; | ||
return this; | ||
} | ||
|
||
public CreateOrderDTO build() { | ||
CreateOrderDTO createOrderDTO = new CreateOrderDTO(this); | ||
return createOrderDTO; | ||
} | ||
} | ||
|
||
/** | ||
* Get order | ||
* @return order | ||
*/ | ||
@Schema(name = "order", required = false) | ||
public OrderDTO getOrder() { | ||
return order; | ||
} | ||
public void setOrder(OrderDTO order) { | ||
this.order = order; | ||
} | ||
|
||
/** | ||
* Get waiter | ||
* @return waiter | ||
*/ | ||
@Schema(name = "waiter", required = false) | ||
public WaiterDTO getWaiter() { | ||
return waiter; | ||
} | ||
public void setWaiter(WaiterDTO waiter) { | ||
this.waiter = waiter; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
CreateOrderDTO createOrderDTO = (CreateOrderDTO) o; | ||
return Objects.equals(this.order, createOrderDTO.order) && Objects.equals(this.waiter, createOrderDTO.waiter); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(order, waiter); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("CreateOrderDTO{"); | ||
sb.append(" order:").append(order).append(","); | ||
sb.append(" waiter:").append(waiter); | ||
sb.append("}"); | ||
return sb.toString(); | ||
} | ||
|
||
|
||
} |
8 changes: 8 additions & 0 deletions
8
...ces/asyncapigenerator/testRareCharsGeneration/assets/IPublishOperationFileGeneration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.sngular.scsplugin.rarecharsgeneration.model.event.producer; | ||
|
||
import com.sngular.scsplugin.rarecharsgeneration.model.event.OrderDTO; | ||
|
||
public interface IPublishOperationFileGeneration { | ||
|
||
OrderDTO publishOperationFileGeneration(); | ||
} |
8 changes: 8 additions & 0 deletions
8
...s/asyncapigenerator/testRareCharsGeneration/assets/ISubscribeOperationFileGeneration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.sngular.scsplugin.rarecharsgeneration.model.event.consumer; | ||
|
||
import com.sngular.scsplugin.rarecharsgeneration.model.event.CreateOrderDTO; | ||
|
||
public interface ISubscribeOperationFileGeneration { | ||
|
||
void subscribeOperationFileGeneration(final CreateOrderDTO value); | ||
} |
10 changes: 10 additions & 0 deletions
10
.../test/resources/asyncapigenerator/testRareCharsGeneration/assets/ModelClassException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.sngular.scsplugin.rarecharsgeneration.model.event.exception; | ||
|
||
public class ModelClassException extends RuntimeException { | ||
|
||
private static final String ERROR_MESSAGE = "There are some problems related to the entity called %s. Maybe could be caused by required fields or anyOf/oneOf restrictions"; | ||
|
||
public ModelClassException(final String modelEntity) { | ||
super(String.format(ERROR_MESSAGE, modelEntity)); | ||
} | ||
} |
Oops, something went wrong.