@@ -707,6 +707,134 @@ public class SubObject {
707707"
708708`;
709709
710+ exports[`template integration tests using the generator should generate code using schemas that have $id set 1`] = `
711+ "
712+ import java.util.function.Consumer;
713+
714+ import org.slf4j.Logger;
715+ import org.slf4j.LoggerFactory;
716+ import org.springframework.boot.SpringApplication;
717+ import org.springframework.boot.autoconfigure.SpringBootApplication;
718+ import org.springframework.context.annotation.Bean;
719+
720+ @SpringBootApplication
721+ public class Application {
722+
723+ private static final Logger logger = LoggerFactory .getLogger (Application .class );
724+
725+ public static void main (String [] args ) {
726+ SpringApplication.run(Application .class );
727+ }
728+
729+ @Bean
730+ public Consumer <DefaultMessageSchema > acmeRideshareRideRequested001Consumer() {
731+ return data - > {
732+ // Add business logic here.
733+ logger.info(data .toString ());
734+ };
735+ }
736+
737+ }
738+ "
739+ `;
740+
741+ exports[`template integration tests using the generator should generate code using schemas that have $id set 2`] = `
742+ "
743+ import com.fasterxml.jackson.annotation.JsonInclude;
744+ import com.fasterxml.jackson.annotation.JsonProperty;
745+
746+
747+
748+ @JsonInclude(JsonInclude.Include.NON_NULL)
749+ public class DefaultMessageSchema {
750+
751+ public DefaultMessageSchema () {
752+ }
753+
754+ public DefaultMessageSchema (
755+ java .math .BigDecimal avgMeterReading ,
756+ Integer windowDurationSec ,
757+ java .math .BigDecimal avgPassengerCount ,
758+ Integer windowRideCount ,
759+ String timestamp ) {
760+ this.avgMeterReading = avgMeterReading;
761+ this.windowDurationSec = windowDurationSec;
762+ this.avgPassengerCount = avgPassengerCount;
763+ this.windowRideCount = windowRideCount;
764+ this.timestamp = timestamp;
765+ }
766+
767+ @JsonProperty (\\" avg_meter_reading\\ " )
768+ private java .math .BigDecimal avgMeterReading ;
769+ @JsonProperty (\\" window_duration_sec\\ " )
770+ private Integer windowDurationSec ;
771+ @JsonProperty (\\" avg_passenger_count\\ " )
772+ private java .math .BigDecimal avgPassengerCount ;
773+ @JsonProperty (\\" window_ride_count\\ " )
774+ private Integer windowRideCount ;
775+ private String timestamp ;
776+ public java .math .BigDecimal getAvgMeterReading () {
777+ return avgMeterReading;
778+ }
779+
780+ public DefaultMessageSchema setAvgMeterReading (java .math .BigDecimal avgMeterReading ) {
781+ this.avgMeterReading = avgMeterReading;
782+ return this;
783+ }
784+
785+
786+ public Integer getWindowDurationSec () {
787+ return windowDurationSec;
788+ }
789+
790+ public DefaultMessageSchema setWindowDurationSec (Integer windowDurationSec ) {
791+ this.windowDurationSec = windowDurationSec;
792+ return this;
793+ }
794+
795+
796+ public java .math .BigDecimal getAvgPassengerCount () {
797+ return avgPassengerCount;
798+ }
799+
800+ public DefaultMessageSchema setAvgPassengerCount (java .math .BigDecimal avgPassengerCount ) {
801+ this.avgPassengerCount = avgPassengerCount;
802+ return this;
803+ }
804+
805+
806+ public Integer getWindowRideCount () {
807+ return windowRideCount;
808+ }
809+
810+ public DefaultMessageSchema setWindowRideCount (Integer windowRideCount ) {
811+ this.windowRideCount = windowRideCount;
812+ return this;
813+ }
814+
815+
816+ public String getTimestamp () {
817+ return timestamp;
818+ }
819+
820+ public DefaultMessageSchema setTimestamp (String timestamp ) {
821+ this.timestamp = timestamp;
822+ return this;
823+ }
824+
825+ public String toString () {
826+ return \\"DefaultMessageSchema [\\"
827+ + \\" avgMeterReading: \\" + avgMeterReading
828+ + \\" windowDurationSec: \\ " + windowDurationSec
829+ + \\" avgPassengerCount: \\ " + avgPassengerCount
830+ + \\" windowRideCount: \\ " + windowRideCount
831+ + \\" timestamp: \\ " + timestamp
832+ + \\" ]\\ " ;
833+ }
834+ }
835+ "
836+ `;
837+
710838exports[`template integration tests using the generator should generate extra config when using the paramatersToHeaders parameter 1`] = `
711839"package com.acme;
712840
0 commit comments