"
- )
- else default
- } else {
- Paths.get(rootDir)
- }
- }
-
- def getDefaultResourcesDirectory(): Path = {
- val file = (configuration / resourceDirectory).value
- if (!file.exists()) {
- file.mkdirs()
- }
- val path = Paths.get(file.getPath)
- sLog.value.info(s"default resources path: $path")
- path
- }
-
- result
- }
- // watch graphql schema source, I'm not sure if this will be mutually exclusive with the deletion of codegen.
- ) ++ watchSourcesSetting ++ Seq(cleanFiles += generateCodegenTargetPath.value)
- }
-
- protected def buildJsonSupplier(configurationFiles: Seq[String]): Option[MergeableMappingConfigSupplier] =
- if (configurationFiles != null && configurationFiles.nonEmpty)
- Some(new MergeableMappingConfigSupplier(configurationFiles.asJava))
- else None
-
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/ParentInterfacesConfig.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/ParentInterfacesConfig.scala
deleted file mode 100644
index 27b65f1dd..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/ParentInterfacesConfig.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-package io.github.dreamylost.graphql.codegen
-
-/** @author
- * 梦境迷离
- * @version 1.0,2020/7/15
- */
-final case class ParentInterfacesConfig(
- queryResolver: String = null,
- mutationResolver: String = null,
- subscriptionResolver: String = null,
- resolver: String = null
-)
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/SchemaFinderConfig.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/SchemaFinderConfig.scala
deleted file mode 100644
index 06b90deea..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/SchemaFinderConfig.scala
+++ /dev/null
@@ -1,14 +0,0 @@
-package io.github.dreamylost.graphql.codegen
-
-import com.kobylynskyi.graphql.codegen.supplier.SchemaFinder
-
-/** @author
- * 梦境迷离
- * @version 1.0,2020/7/15
- */
-final case class SchemaFinderConfig(
- rootDir: String,
- recursive: Boolean = SchemaFinder.DEFAULT_RECURSIVE,
- includePattern: String = SchemaFinder.DEFAULT_INCLUDE_PATTERN,
- excludedFiles: Set[String] = Set.empty
-)
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/build.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/build.sbt
deleted file mode 100644
index adf7f2554..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/build.sbt
+++ /dev/null
@@ -1,42 +0,0 @@
-import java.util
-
-name := "example-client-scala"
-
-organization := "io.github.jxnu-liguobin"
-
-libraryDependencies ++= Seq(
- "org.apache.logging.log4j" %% "log4j-api-scala" % "11.0",
- "org.apache.logging.log4j" % "log4j-api" % "2.8.2",
- "org.apache.logging.log4j" % "log4j-core" % "2.8.2",
- "org.apache.logging.log4j" % "log4j-slf4j-impl" % "2.8.2",
- "com.squareup.okhttp3" % "okhttp" % "4.7.2",
- "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.11.3",
- "com.fasterxml.jackson.core" % "jackson-databind" % "2.11.3",
- "org.json" % "json" % "20190722")
-
-enablePlugins(GraphQLCodegenPlugin)
-graphqlJavaCodegenVersion := Some((version in Scope.ThisScope).value)
-GraphQLCodegenPluginDependencies
-graphqlSchemaPaths := List("src/main/resources/schema.graphqls")
-modelPackageName := Some("io.github.dreamylost.model")
-apiPackageName := Some("io.github.dreamylost.api")
-generateClient := true
-generateApis := true
-generatedLanguage := com.kobylynskyi.graphql.codegen.model.GeneratedLanguage.SCALA
-generateImmutableModels := true
-modelNameSuffix := Some("DO")
-customAnnotationsMapping := {
- val mapping = new util.HashMap[String, util.List[String]]
- val annotations = new util.ArrayList[String]()
- annotations.add("@com.fasterxml.jackson.annotation.JsonTypeInfo(use=com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include=com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY,property = \"__typename\")")
- annotations.add(
- """@com.fasterxml.jackson.annotation.JsonSubTypes(value = Array(
- | new com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = classOf[HumanDO], name = "Human"),
- | new com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = classOf[DroidDO], name = "Droid")))""".stripMargin)
- mapping.put("Character", annotations)
- mapping
-}
-generateCodegenTargetPath in GraphQLCodegenConfig := crossTarget.value / "src_managed_graphql_scala"
-generateEqualsAndHashCode := true
-generateToString := true
-generateSealedInterfaces := true
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/project/build.properties b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/project/build.properties
deleted file mode 100644
index 862afa5f2..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/project/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-sbt.version=1.4.7
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/project/plugins.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/project/plugins.sbt
deleted file mode 100644
index 614518cda..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/project/plugins.sbt
+++ /dev/null
@@ -1 +0,0 @@
-addSbtPlugin("io.github.jxnu-liguobin" % "graphql-codegen-sbt-plugin" % "5.10.1-SNAPSHOT")
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/resources/log4j2.xml b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/resources/log4j2.xml
deleted file mode 100644
index bc2bb91ee..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/resources/schema.graphqls b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/resources/schema.graphqls
deleted file mode 100644
index b028fcabf..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/resources/schema.graphqls
+++ /dev/null
@@ -1,46 +0,0 @@
-schema {
- query: Query
-}
-
-type Query {
- hero(episode: Episode) : Character
- human(id : String) : Human
- humans: [Human]
- droid(id: ID!) : Droid
-}
-enum Episode {
- NEWHOPE
- EMPIRE
- JEDI
-}
-
-interface Character {
- id: ID!
- name: String!
- friends: [Character]
- appearsIn: [Episode]!
- secretBackstory : String @deprecated(reason : "We have decided that this is not canon")
-}
-
-type Human implements Character {
- id: ID!
- name: String!
- friends: [Character]
- appearsIn: [Episode]!
- homePlanet: String
- secretBackstory : String @deprecated(reason : "We have decided that this is not canon")
- email: Email!
-}
-
-type Droid implements Character {
- id: ID!
- name: String!
- friends: [Character]
- appearsIn: [Episode]!
- primaryFunction: String
- secretBackstory : String @deprecated(reason : "We have decided that this is not canon")
-}
-
-scalar Email
-
-union Role = Droid | Human
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/Jackson.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/Jackson.scala
deleted file mode 100644
index 8cc8d3c88..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/Jackson.scala
+++ /dev/null
@@ -1,18 +0,0 @@
-package io.github.dreamylost
-
-import com.fasterxml.jackson.annotation.JsonInclude.Include
-import com.fasterxml.jackson.databind.{ DeserializationFeature, ObjectMapper }
-import com.fasterxml.jackson.module.scala.{ DefaultScalaModule, ScalaObjectMapper }
-
-object Jackson {
-
- lazy val mapper: ObjectMapper with ScalaObjectMapper = {
- val mapper = new ObjectMapper() with ScalaObjectMapper
- mapper.setSerializationInclusion(Include.NON_NULL)
- mapper.setSerializationInclusion(Include.NON_ABSENT)
- mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
- mapper.registerModule(DefaultScalaModule)
- mapper
- }
-
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/OkHttp.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/OkHttp.scala
deleted file mode 100644
index 269f64b67..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/OkHttp.scala
+++ /dev/null
@@ -1,65 +0,0 @@
-package io.github.dreamylost
-
-import java.io.IOException
-import java.util
-import java.util.concurrent.TimeUnit
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequest
-import okhttp3._
-
-import scala.concurrent.{ ExecutionContext, Future, Promise }
-
-object OkHttp {
-
- var url = "http://localhost:8080/graphql"
- val defaultCharset = "utf8"
- val json = MediaType.parse("application/json; charset=utf-8")
-
- private lazy val defaultTimeout: Long = TimeUnit.MINUTES.toMillis(1)
- lazy val client: OkHttpClient = buildClient(defaultTimeout, defaultTimeout, defaultTimeout)
-
- def buildClient(readTimeout: Long, writeTimeout: Long, connectTimeout: Long): OkHttpClient = {
- new OkHttpClient.Builder()
- .readTimeout(readTimeout, TimeUnit.MILLISECONDS)
- .writeTimeout(writeTimeout, TimeUnit.MILLISECONDS)
- .connectTimeout(connectTimeout, TimeUnit.MILLISECONDS)
- .protocols(util.Arrays.asList(Protocol.HTTP_1_1, Protocol.HTTP_2))
- .build()
- }
-
- /**
- *
- * @param request
- * @param ec
- * @tparam T
- * @return
- */
- def executeRequest[T: Manifest](request: GraphQLRequest)(implicit ec: ExecutionContext): Future[T] = {
- val rb = new Request.Builder().url(url).addHeader("Accept", "application/json; charset=utf-8").
- post(RequestBody.create(request.toHttpJsonBody, json))
- val promise = Promise[T]
-
- println("Graphql query " + request.toHttpJsonBody)
- OkHttp.client.newCall(rb.build()).enqueue(new Callback {
-
- override def onFailure(call: Call, e: IOException): Unit = {
- promise.failure(e)
- }
-
- override def onResponse(call: Call, response: Response): Unit = {
- if (response.isSuccessful) {
- val result = parseFrom[T](response.body().string())
- promise.success(result.asInstanceOf[T])
-
- } else {
- Future.successful()
- }
-
- }
- })
- promise.future
- }
-
- def parseFrom[T: Manifest](json: String): T = Jackson.mapper.readValue(json)
-
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/service/QueryResolverImpl.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/service/QueryResolverImpl.scala
deleted file mode 100644
index 5813b5e85..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/service/QueryResolverImpl.scala
+++ /dev/null
@@ -1,63 +0,0 @@
-package io.github.dreamylost.service
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequest
-import io.github.dreamylost.api.QueryResolver
-import io.github.dreamylost.model._
-import io.github.dreamylost.OkHttp
-import io.github.dreamylost.model.EpisodeDO.EpisodeDO
-
-import scala.concurrent.Await
-import scala.concurrent.ExecutionContext.Implicits.global
-import scala.concurrent.duration.Duration
-
-/**
- * This is scala style deserialization
- *
- * @author liguobin@growingio.com
- * @version 1.0,2020/11/27
- */
-class QueryResolverImpl extends QueryResolver {
-
- @throws[Exception]
- def hero(episode: EpisodeDO): CharacterDO = {
- val heroQueryRequest = HeroQueryRequest()
- heroQueryRequest.setEpisode(episode)
- val characterResponseProjection = new CharacterResponseProjection().all$(1)
- val graphQLRequest = new GraphQLRequest(heroQueryRequest, characterResponseProjection)
- val retFuture = OkHttp.executeRequest[HeroQueryResponse](graphQLRequest)
- val ret = Await.result(retFuture, Duration.Inf)
- ret.hero()
- }
-
- @throws[Exception]
- def human(id: String): HumanDO = {
- val humanQueryRequest = HumanQueryRequest()
- humanQueryRequest.setId(id)
- val humanResponseProjection = new HumanResponseProjection().all$(1)
- val graphQLRequest = new GraphQLRequest(humanQueryRequest, humanResponseProjection)
- val retFuture = OkHttp.executeRequest[HumanQueryResponse](graphQLRequest)
- val ret = Await.result(retFuture, Duration.Inf)
- ret.human()
- }
-
- @throws[Exception]
- def humans: Seq[HumanDO] = {
- val humanQueryRequest = HumansQueryRequest()
- val humanResponseProjection = new HumanResponseProjection().all$(1)
- val graphQLRequest = new GraphQLRequest(humanQueryRequest, humanResponseProjection)
- val retFuture = OkHttp.executeRequest[HumansQueryResponse](graphQLRequest)
- val ret = Await.result(retFuture, Duration.Inf)
- ret.humans()
- }
-
- @throws[Exception]
- def droid(id: String): DroidDO = {
- val productByIdQueryRequest = DroidQueryRequest()
- productByIdQueryRequest.setId(id)
- val droidResponseProjection = new DroidResponseProjection().all$(1)
- val graphQLRequest = new GraphQLRequest(productByIdQueryRequest, droidResponseProjection)
- val retFuture = OkHttp.executeRequest[DroidQueryResponse](graphQLRequest)
- val ret = Await.result(retFuture, Duration.Inf)
- ret.droid()
- }
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/service/QueryResolverImplMain.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/service/QueryResolverImplMain.scala
deleted file mode 100644
index 3505f3346..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/src/main/scala/io/github/dreamylost/service/QueryResolverImplMain.scala
+++ /dev/null
@@ -1,69 +0,0 @@
-package io.github.dreamylost.service
-
-import io.github.dreamylost.model.EpisodeDO
-
-/**
- *
- * @author liguobin@growingio.com
- * @version 1.0,2020/7/21
- */
-object QueryResolverImplMain extends App {
-
- val droidResolver = new QueryResolverImpl
- println("=======QueryResolverImpl=======")
- // need typename on Projection
- println("=======get droid id 2001=========")
- val d = droidResolver.droid("2001")
- println(d)
-
- println("=======get humans all=======")
- val hums = droidResolver.humans
- for (h <- hums) {
- println(h)
- }
-
- println("=======get human id 1002=======")
- val hum = droidResolver.human("1002")
- println(hum)
-
- println("=======get hero Episode.EMPIRE=======")
- val character = droidResolver.hero(EpisodeDO.EMPIRE)
- println(character)
-
- println("=======QueryResolverImpl2=======")
- /**
- * MAX DEPTH = 4
- * gql:{{{
- * { id name friends {
- * id name friends {
- * id name friends {
- * id name friends {
- * id name friends {
- * id name appearsIn secretBackstory __typename }
- * appearsIn secretBackstory __typename }
- * appearsIn secretBackstory __typename }
- * appearsIn secretBackstory __typename }
- * appearsIn secretBackstory __typename }
- * appearsIn primaryFunction secretBackstory __typename }
- * }}}
- */
- val droidResolver2 = new QueryResolverImpl
- println("=======2get droid id 2001=========")
- val d2 = droidResolver2.droid("2001")
- println(d2)
-
- println("=======2get humans all=======")
- val hums2 = droidResolver2.humans
- for (h <- hums2) {
- println(h)
- }
-
- println("=======2get human id 1002=======")
- val hum2 = droidResolver2.human("1002")
- println(hum2)
-
- println("=======2get hero Episode.EMPIRE=======")
- val character2 = droidResolver2.hero(EpisodeDO.EMPIRE)
- println(character2)
-
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/test b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/test
deleted file mode 100644
index 585d8979b..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/test
+++ /dev/null
@@ -1,6 +0,0 @@
-# check if the file gets created
-> graphqlCodegen
-> graphqlSchemaValidate src/main/resources/schema.graphqls
-> graphqlCodegenValidate
-> compile
-$ exists target/scala-2.12/src_managed_graphql_scala/io/github/dreamylost/model/CharacterDO.scala
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/version.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/version.sbt
deleted file mode 100644
index a4cf54075..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/version.sbt
+++ /dev/null
@@ -1 +0,0 @@
-version in ThisBuild := "5.10.1-SNAPSHOT"
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/build.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/build.sbt
deleted file mode 100644
index 07f8abaac..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/build.sbt
+++ /dev/null
@@ -1,63 +0,0 @@
-import java.util
-
-name := "example-client"
-
-organization := "io.github.jxnu-liguobin"
-
-libraryDependencies ++= Seq(
- "org.apache.logging.log4j" %% "log4j-api-scala" % "11.0",
- "org.apache.logging.log4j" % "log4j-api" % "2.8.2",
- "org.apache.logging.log4j" % "log4j-core" % "2.8.2",
- "org.apache.logging.log4j" % "log4j-slf4j-impl" % "2.8.2",
- "com.squareup.okhttp3" % "okhttp" % "4.7.2",
- "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.11.1",
- "com.fasterxml.jackson.core" % "jackson-databind" % "2.11.1",
- "org.json" % "json" % "20190722",
- "com.graphql-java" % "graphql-java" % "16.2")
-
-
-enablePlugins(GraphQLCodegenPlugin)
-
-graphqlJavaCodegenVersion := Some((version in Scope.ThisScope).value)
-
-GraphQLCodegenPluginDependencies
-
-graphqlSchemaPaths := List("src/main/resources/schema.graphqls")
-modelPackageName := Some("io.github.dreamylost.model")
-apiPackageName := Some("io.github.dreamylost.api")
-generateClient := true
-generateApis := true
-// Scala collection cannot be used. The latter one uses the put method, which is not supported by Scala collection.
-// in FB, collection is immutable
-customTypesMapping := {
- val mapping = new util.HashMap[String, String]
-// mapping.put("Email", "io.github.dreamylost.scalar.EmailScalar")
- //Character will conflict with java.lang.Character. maybe because Scala imports it automatically java.lang *.
- //So we use Full class name
- mapping
-}
-
-//Of course, you can also add a suffix to be different from it
-modelNameSuffix := Some("DO")
-
-customAnnotationsMapping := {
- val mapping = new util.HashMap[String, util.List[String]]
- val annotations = new util.ArrayList[String]()
- annotations.add("@com.fasterxml.jackson.annotation.JsonTypeInfo(use=com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include=com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY,property = \"__typename\")")
- annotations.add("""@com.fasterxml.jackson.annotation.JsonSubTypes(value = {
- | @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = HumanDO.class, name = "Human"),
- | @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = DroidDO.class, name = "Droid")})""".stripMargin)
- //must add this annotation
- //property is __typename and you must with __typename while invoke, like new CharacterResponseProjection().id().name().typename()
- //and in @JsonSubTypes.Type, name is __typename's value
- mapping.put("Character",annotations)//since v3.0.0
- mapping
-}
-
-generateCodegenTargetPath in GraphQLCodegenConfig := crossTarget.value / "src_managed_graphql_my_folder"
-
-generateEqualsAndHashCode := true
-
-generateToString := true
-
-generateSealedInterfaces := true
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/project/build.properties b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/project/build.properties
deleted file mode 100644
index 862afa5f2..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/project/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-sbt.version=1.4.7
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/project/plugins.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/project/plugins.sbt
deleted file mode 100644
index 614518cda..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/project/plugins.sbt
+++ /dev/null
@@ -1 +0,0 @@
-addSbtPlugin("io.github.jxnu-liguobin" % "graphql-codegen-sbt-plugin" % "5.10.1-SNAPSHOT")
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/resources/log4j2.xml b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/resources/log4j2.xml
deleted file mode 100644
index bc2bb91ee..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/resources/schema.graphqls b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/resources/schema.graphqls
deleted file mode 100644
index cba4019cd..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/resources/schema.graphqls
+++ /dev/null
@@ -1,44 +0,0 @@
-schema {
- query: Query
-}
-
-type Query {
- hero(episode: Episode) : Character
- human(id : String) : Human
- humans: [Human]
- droid(id: ID!) : Droid
-}
-enum Episode {
- NEWHOPE
- EMPIRE
- JEDI
-}
-
-interface Character {
- id: ID!
- name: String!
- friends: [Character]
- appearsIn: [Episode]!
- secretBackstory : String @deprecated(reason : "We have decided that this is not canon")
-}
-
-type Human implements Character {
- id: ID!
- name: String!
- friends: [Character]
- appearsIn: [Episode]!
- homePlanet: String
- secretBackstory : String @deprecated(reason : "We have decided that this is not canon")
- email: Email!
-}
-
-type Droid implements Character {
- id: ID!
- name: String!
- friends: [Character]
- appearsIn: [Episode]!
- primaryFunction: String
- secretBackstory : String @deprecated(reason : "We have decided that this is not canon")
-}
-
-scalar Email
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/Jackson.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/Jackson.scala
deleted file mode 100644
index 8cc8d3c88..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/Jackson.scala
+++ /dev/null
@@ -1,18 +0,0 @@
-package io.github.dreamylost
-
-import com.fasterxml.jackson.annotation.JsonInclude.Include
-import com.fasterxml.jackson.databind.{ DeserializationFeature, ObjectMapper }
-import com.fasterxml.jackson.module.scala.{ DefaultScalaModule, ScalaObjectMapper }
-
-object Jackson {
-
- lazy val mapper: ObjectMapper with ScalaObjectMapper = {
- val mapper = new ObjectMapper() with ScalaObjectMapper
- mapper.setSerializationInclusion(Include.NON_NULL)
- mapper.setSerializationInclusion(Include.NON_ABSENT)
- mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
- mapper.registerModule(DefaultScalaModule)
- mapper
- }
-
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/OkHttp.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/OkHttp.scala
deleted file mode 100644
index e21a70500..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/OkHttp.scala
+++ /dev/null
@@ -1,68 +0,0 @@
-package io.github.dreamylost
-
-import java.io.IOException
-import java.util
-import java.util.concurrent.TimeUnit
-
-import com.fasterxml.jackson.core.`type`.TypeReference
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequest
-import okhttp3._
-import org.json.JSONObject
-
-import scala.concurrent.{ ExecutionContext, Future, Promise }
-
-object OkHttp {
-
- var url = "http://localhost:8080/graphql"
- val defaultCharset = "utf8"
- val json = MediaType.parse("application/json; charset=utf-8")
-
- private lazy val defaultTimeout: Long = TimeUnit.MINUTES.toMillis(1)
- lazy val client: OkHttpClient = buildClient(defaultTimeout, defaultTimeout, defaultTimeout)
-
- def buildClient(readTimeout: Long, writeTimeout: Long, connectTimeout: Long): OkHttpClient = {
- new OkHttpClient.Builder()
- .readTimeout(readTimeout, TimeUnit.MILLISECONDS)
- .writeTimeout(writeTimeout, TimeUnit.MILLISECONDS)
- .connectTimeout(connectTimeout, TimeUnit.MILLISECONDS)
- .protocols(util.Arrays.asList(Protocol.HTTP_1_1, Protocol.HTTP_2))
- .build()
- }
-
- /**
- *
- * @param request
- * @param valueType must get from invoker, ClassTag is invalid
- * @param ec
- * @tparam T
- * @return
- */
- def executeRequest[T](request: GraphQLRequest, valueType: TypeReference[T])(implicit ec: ExecutionContext): Future[T] = {
- val rb = new Request.Builder().url(url).addHeader("Accept", "application/json; charset=utf-8").
- post(RequestBody.create(request.toHttpJsonBody, json))
- val promise = Promise[T]
-
- println("Graphql query " + request.toHttpJsonBody)
- OkHttp.client.newCall(rb.build()).enqueue(new Callback {
-
- override def onFailure(call: Call, e: IOException): Unit = {
- promise.failure(e)
- }
-
- override def onResponse(call: Call, response: Response): Unit = {
- if (response.isSuccessful) {
- // val clazz = implicitly[ClassTag[T]].runtimeClass
- val jsonObject = new JSONObject(response.body().string())
- val res = jsonObject.getJSONObject("data").get(request.getRequest.getOperationName)
- val result = Jackson.mapper.readValue(res.toString, valueType)
- promise.success(result.asInstanceOf[T])
-
- } else {
- Future.successful()
- }
-
- }
- })
- promise.future
- }
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/scalar/EmailScalar.java b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/scalar/EmailScalar.java
deleted file mode 100644
index 1583f1ccf..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/scalar/EmailScalar.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package io.github.dreamylost.scalar;
-
-import graphql.language.StringValue;
-import graphql.schema.*;
-
-import java.util.regex.Pattern;
-
-/**
- * graphql scalar type
- *
- * use in graphql schema like : scalar Email
- *
- * @author 梦境迷离
- * @time 2020年04月03日
- */
-public class EmailScalar {
-
- public static final GraphQLScalarType Email = GraphQLScalarType.newScalar().name("Email").description("A custom scalar that handles emails").coercing(
- new Coercing() {
- @Override
- public Object serialize(Object dataFetcherResult) {
- return serializeEmail(dataFetcherResult);
- }
-
- @Override
- public Object parseValue(Object input) {
- return parseEmailFromVariable(input);
- }
-
- @Override
- public Object parseLiteral(Object input) {
- return parseEmailFromAstLiteral(input);
- }
- }).build();
-
-
- private static boolean looksLikeAnEmailAddress(String possibleEmailValue) {
- return Pattern.matches("^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", possibleEmailValue);
- }
-
- private static Object serializeEmail(Object dataFetcherResult) {
- String possibleEmailValue = String.valueOf(dataFetcherResult);
- if (looksLikeAnEmailAddress(possibleEmailValue)) {
- return possibleEmailValue;
- } else {
- throw new CoercingSerializeException("Unable to serialize " + possibleEmailValue + " as an email address");
- }
- }
-
- private static Object parseEmailFromVariable(Object input) {
- if (input instanceof String) {
- String possibleEmailValue = input.toString();
- if (looksLikeAnEmailAddress(possibleEmailValue)) {
- return possibleEmailValue;
- }
- }
- throw new CoercingParseValueException("Unable to parse variable value " + input + " as an email address");
- }
-
- private static Object parseEmailFromAstLiteral(Object input) {
- if (input instanceof StringValue) {
- String possibleEmailValue = ((StringValue) input).getValue();
- if (looksLikeAnEmailAddress(possibleEmailValue)) {
- return possibleEmailValue;
- }
- }
- throw new CoercingParseLiteralException(
- "Value is not any email address : '" + input + "'"
- );
- }
-}
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/service/QueryResolverImpl.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/service/QueryResolverImpl.scala
deleted file mode 100644
index 97cc88b26..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/service/QueryResolverImpl.scala
+++ /dev/null
@@ -1,71 +0,0 @@
-package io.github.dreamylost.service
-
-import java.util
-
-import com.fasterxml.jackson.core.`type`.TypeReference
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequest
-import io.github.dreamylost.api.QueryResolver
-import io.github.dreamylost.OkHttp
-import io.github.dreamylost.model._
-
-import scala.concurrent.Await
-import scala.concurrent.duration.Duration
-import scala.concurrent.ExecutionContext.Implicits.global
-
-/**
- * a scala client example
- *
- * @author liguobin@growingio.com
- * @version 1.0,2020/7/20
- */
-class QueryResolverImpl extends QueryResolver {
-
- @throws[Exception]
- def hero(episode: EpisodeDO): CharacterDO = {
- val heroQueryRequest = new HeroQueryRequest
- heroQueryRequest.setEpisode(episode)
- //must use typename, and add jackson annotation to support, since v2.4
- val characterResponseProjection = new CharacterResponseProjection().id().name().typename()
- .friends(new CharacterResponseProjection().id().name().typename()).appearsIn()
- val graphQLRequest = new GraphQLRequest(heroQueryRequest, characterResponseProjection)
- val retFuture = OkHttp.executeRequest(graphQLRequest, new TypeReference[CharacterDO] {})
- val ret = Await.result(retFuture, Duration.Inf)
- ret
- }
-
- @throws[Exception]
- def human(id: String): HumanDO = {
- val humanQueryRequest = new HumanQueryRequest
- humanQueryRequest.setId(id)
- //must use typename, and add jackson annotation to support, since v2.4
- val humanResponseProjection = new HumanResponseProjection().id().name().typename()
- val graphQLRequest = new GraphQLRequest(humanQueryRequest, humanResponseProjection)
- val retFuture = OkHttp.executeRequest(graphQLRequest, new TypeReference[HumanDO] {})
- val ret = Await.result(retFuture, Duration.Inf)
- ret
- }
-
- @throws[Exception]
- def humans: util.List[HumanDO] = {
- import scala.collection.JavaConverters._
- val humanQueryRequest = new HumansQueryRequest
- //must use typename, and add jackson annotation to support, since v2.4
- val humanResponseProjection = new HumanResponseProjection().id().name().typename()
- val graphQLRequest = new GraphQLRequest(humanQueryRequest, humanResponseProjection)
- val retFuture = OkHttp.executeRequest(graphQLRequest, new TypeReference[List[HumanDO]] {})
- val ret = Await.result(retFuture, Duration.Inf)
- ret.asJava
- }
-
- @throws[Exception]
- def droid(id: String): DroidDO = {
- val productByIdQueryRequest = new DroidQueryRequest
- productByIdQueryRequest.setId(id)
- //must use typename, and add jackson annotation to support, since v2.4
- val droidResponseProjection = new DroidResponseProjection().id().name().typename()
- val graphQLRequest = new GraphQLRequest(productByIdQueryRequest, droidResponseProjection)
- val retFuture = OkHttp.executeRequest(graphQLRequest, new TypeReference[DroidDO] {})
- val ret = Await.result(retFuture, Duration.Inf)
- ret
- }
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/service/QueryResolverImpl2.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/service/QueryResolverImpl2.scala
deleted file mode 100644
index 46c3aa84e..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/service/QueryResolverImpl2.scala
+++ /dev/null
@@ -1,74 +0,0 @@
-package io.github.dreamylost.service
-
-import java.util
-
-import com.fasterxml.jackson.core.`type`.TypeReference
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequest
-import io.github.dreamylost.api.QueryResolver
-import io.github.dreamylost.model._
-import io.github.dreamylost.OkHttp
-
-import scala.concurrent.Await
-import scala.concurrent.ExecutionContext.Implicits.global
-import scala.concurrent.duration.Duration
-
-/**
- * use all$()
- *
- * At now, we can simply construct a request and call it directly.
- *
- * Next, we'll replace the reflection in the proxy with `all$()`
- *
- * @author liguobin@growingio.com
- * @version 1.0,2020/8/27
- */
-class QueryResolverImpl2 extends QueryResolver {
-
- @throws[Exception]
- def hero(episode: EpisodeDO): CharacterDO = {
- val heroQueryRequest = new HeroQueryRequest
- heroQueryRequest.setEpisode(episode)
- //must use typename, and add jackson annotation to support, since v2.4
- val characterResponseProjection = new CharacterResponseProjection().all$(1)
- val graphQLRequest = new GraphQLRequest(heroQueryRequest, characterResponseProjection)
- val retFuture = OkHttp.executeRequest(graphQLRequest, new TypeReference[CharacterDO] {})
- val ret = Await.result(retFuture, Duration.Inf)
- ret
- }
-
- @throws[Exception]
- def human(id: String): HumanDO = {
- val humanQueryRequest = new HumanQueryRequest
- humanQueryRequest.setId(id)
- //must use typename, and add jackson annotation to support, since v2.4
- val humanResponseProjection = new HumanResponseProjection().all$(1)
- val graphQLRequest = new GraphQLRequest(humanQueryRequest, humanResponseProjection)
- val retFuture = OkHttp.executeRequest(graphQLRequest, new TypeReference[HumanDO] {})
- val ret = Await.result(retFuture, Duration.Inf)
- ret
- }
-
- @throws[Exception]
- def humans: util.List[HumanDO] = {
- import scala.collection.JavaConverters._
- val humanQueryRequest = new HumansQueryRequest
- //must use typename, and add jackson annotation to support, since v2.4
- val humanResponseProjection = new HumanResponseProjection().all$(1)
- val graphQLRequest = new GraphQLRequest(humanQueryRequest, humanResponseProjection)
- val retFuture = OkHttp.executeRequest(graphQLRequest, new TypeReference[List[HumanDO]] {})
- val ret = Await.result(retFuture, Duration.Inf)
- ret.asJava
- }
-
- @throws[Exception]
- def droid(id: String): DroidDO = {
- val productByIdQueryRequest = new DroidQueryRequest
- productByIdQueryRequest.setId(id)
- //must use typename, and add jackson annotation to support, since v2.4
- val droidResponseProjection = new DroidResponseProjection().all$(1)
- val graphQLRequest = new GraphQLRequest(productByIdQueryRequest, droidResponseProjection)
- val retFuture = OkHttp.executeRequest(graphQLRequest, new TypeReference[DroidDO] {})
- val ret = Await.result(retFuture, Duration.Inf)
- ret
- }
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/service/QueryResolverImplMain.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/service/QueryResolverImplMain.scala
deleted file mode 100644
index 37b6af8bb..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/src/main/scala/io/github/dreamylost/service/QueryResolverImplMain.scala
+++ /dev/null
@@ -1,71 +0,0 @@
-package io.github.dreamylost.service
-
-import io.github.dreamylost.model.EpisodeDO
-
-import scala.collection.JavaConverters._
-
-/**
- *
- * @author liguobin@growingio.com
- * @version 1.0,2020/7/21
- */
-object QueryResolverImplMain extends App {
-
- val droidResolver = new QueryResolverImpl
- println("=======QueryResolverImpl=======")
- // need typename on Projection
- println("=======get droid id 2001=========")
- val d = droidResolver.droid("2001")
- println(d)
-
- println("=======get humans all=======")
- val hums = droidResolver.humans
- for (h <- hums.asScala) {
- println(h)
- }
-
- println("=======get human id 1002=======")
- val hum = droidResolver.human("1002")
- println(hum)
-
- println("=======get hero Episode.EMPIRE=======")
- val character = droidResolver.hero(EpisodeDO.EMPIRE)
- println(character)
-
- println("=======QueryResolverImpl2=======")
- /**
- * MAX DEPTH = 4
- * gql:{{{
- * { id name friends {
- * id name friends {
- * id name friends {
- * id name friends {
- * id name friends {
- * id name appearsIn secretBackstory __typename }
- * appearsIn secretBackstory __typename }
- * appearsIn secretBackstory __typename }
- * appearsIn secretBackstory __typename }
- * appearsIn secretBackstory __typename }
- * appearsIn primaryFunction secretBackstory __typename }
- * }}}
- */
- val droidResolver2 = new QueryResolverImpl2
- println("=======2get droid id 2001=========")
- val d2 = droidResolver2.droid("2001")
- println(d2)
-
- println("=======2get humans all=======")
- val hums2 = droidResolver2.humans
- for (h <- hums2.asScala) {
- println(h)
- }
-
- println("=======2get human id 1002=======")
- val hum2 = droidResolver2.human("1002")
- println(hum2)
-
- println("=======2get hero Episode.EMPIRE=======")
- val character2 = droidResolver2.hero(EpisodeDO.EMPIRE)
- println(character2)
-
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/test b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/test
deleted file mode 100644
index 9a68f155c..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/test
+++ /dev/null
@@ -1,6 +0,0 @@
-# check if the file gets created
-> graphqlCodegen
-> graphqlSchemaValidate src/main/resources/schema.graphqls
-> graphqlCodegenValidate
-> compile
-$ exists target/scala-2.12/src_managed_graphql_my_folder/io/github/dreamylost/model/CharacterDO.java
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/version.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/version.sbt
deleted file mode 100644
index a4cf54075..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/version.sbt
+++ /dev/null
@@ -1 +0,0 @@
-version in ThisBuild := "5.10.1-SNAPSHOT"
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/build.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/build.sbt
deleted file mode 100644
index 8b9ac7f94..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/build.sbt
+++ /dev/null
@@ -1,14 +0,0 @@
-name := "simple"
-
-lazy val root = (project in file("."))
- .settings(
- scalaVersion := "2.13.2",
- apiPackageName := Some("io.github.kobylynskyi.graphql.test.api"),
- modelPackageName := Some("io.github.kobylynskyi.graphql.test.model"),
- apiReturnType := Some("scala.concurrent.Future"), // if Async class is not at current source, need import dependency
- graphqlJavaCodegenVersion := Some((version in Scope.ThisScope).value)
- //use full class name is good
- ).enablePlugins(GraphQLCodegenPlugin).settings(GraphQLCodegenPluginDependencies)
-
-
-//javaSource in Compile := crossTarget.value / "src_managed_graphql"
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/project/build.properties b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/project/build.properties
deleted file mode 100644
index 862afa5f2..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/project/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-sbt.version=1.4.7
\ No newline at end of file
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/project/plugins.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/project/plugins.sbt
deleted file mode 100644
index 35ceb501a..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/project/plugins.sbt
+++ /dev/null
@@ -1,5 +0,0 @@
-sys.props.get("plugin.version").orElse(Some("5.10.1-SNAPSHOT")) match {
- case Some(x) => addSbtPlugin("io.github.jxnu-liguobin" % "graphql-codegen-sbt-plugin" % x)
- case _ => sys.error("""|The system property 'plugin.version' is not defined.
- |Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/src/main/resources/schema.graphql b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/src/main/resources/schema.graphql
deleted file mode 100644
index c14b91955..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/src/main/resources/schema.graphql
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# Schemas must have at least a query root type
-#
-schema {
- query: Query
-}
-
-# This is the type that will be the root of our query, and the
-# entry point into our schema.
-type Query {
- getPosts: [Post]
-
- getUser(
- id : ID!
- ): User
-
- getPost(
- id: ID!
- ): Post
-}
-
-type Post {
- id: ID!
- title: String!
- # Content if provided by author
- content: String
- # The URL if this is external content
- url: String
- author: User
-}
-
-type User {
- id: ID!
- username: String!
- email: String!
- posts: [Post]
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/src/main/scala/io/github/kobylynskyi/graphql/test/api/impl/GetUserQueryResolverImpl.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/src/main/scala/io/github/kobylynskyi/graphql/test/api/impl/GetUserQueryResolverImpl.scala
deleted file mode 100644
index a9cbc4225..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/src/main/scala/io/github/kobylynskyi/graphql/test/api/impl/GetUserQueryResolverImpl.scala
+++ /dev/null
@@ -1,19 +0,0 @@
-package io.github.kobylynskyi.graphql.test.api.impl
-
-import io.github.kobylynskyi.graphql.test.api.GetUserQueryResolver
-import io.github.kobylynskyi.graphql.test.model.User
-
-import scala.concurrent.Future
-
-/**
- * example, use a async api
- *
- * @author 梦境迷离
- * @since 2020-07-19
- * @version v1.0
- */
-class GetUserQueryResolverImpl extends GetUserQueryResolver {
- override def getUser(id: _root_.java.lang.String): _root_.scala.concurrent.Future[_root_.io.github.kobylynskyi.graphql.test.model.User] = {
- Future.successful(User.builder().setId("id").setEmail("email@126.com").setUsername("user name").build())
- }
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/test b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/test
deleted file mode 100644
index 6c6c6bf91..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/test
+++ /dev/null
@@ -1,6 +0,0 @@
-# check if the file gets created
-> graphqlCodegen
-> graphqlSchemaValidate src/main/resources/schema.graphql
-> graphqlCodegenValidate
-> compile
-$ exists target/scala-2.13/src_managed_graphql/io/github/kobylynskyi/graphql/test/model/User.java
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/version.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/version.sbt
deleted file mode 100644
index a4cf54075..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/version.sbt
+++ /dev/null
@@ -1 +0,0 @@
-version in ThisBuild := "5.10.1-SNAPSHOT"
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/test/scala/test/Test.scala b/plugins/sbt/graphql-java-codegen-sbt-plugin/src/test/scala/test/Test.scala
deleted file mode 100644
index 4bfbb409a..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/src/test/scala/test/Test.scala
+++ /dev/null
@@ -1,13 +0,0 @@
-package test
-
-/** @author
- * 梦境迷离
- * @version 1.0,2020/7/15
- */
-object Test {
-
- import io.github.dreamylost.graphql.codegen.GraphQLCodegenPlugin
-
- val s = GraphQLCodegenPlugin
-
-}
diff --git a/plugins/sbt/graphql-java-codegen-sbt-plugin/version.sbt b/plugins/sbt/graphql-java-codegen-sbt-plugin/version.sbt
deleted file mode 100644
index 4c81273a5..000000000
--- a/plugins/sbt/graphql-java-codegen-sbt-plugin/version.sbt
+++ /dev/null
@@ -1 +0,0 @@
-ThisBuild / version := "5.10.1-SNAPSHOT"
diff --git a/scripts/update-release-version-in-build-files.sh b/scripts/update-release-version-in-build-files.sh
index d8c920e6f..f06fc548b 100755
--- a/scripts/update-release-version-in-build-files.sh
+++ b/scripts/update-release-version-in-build-files.sh
@@ -25,16 +25,5 @@ set_version_in_file "plugins/gradle/example-client-kotlin/build.gradle" "id \"io
set_version_in_file "plugins/gradle/example-client-kotlin/build.gradle" "def graphqlCodegenClientKotlinVersion = '"
set_version_in_file "plugins/gradle/example-client-kotlin/build.gradle" "implementation \"io.github.kobylynskyi:graphql-java-codegen:"
-set_version_in_file "plugins/sbt/graphql-java-codegen-sbt-plugin/version.sbt" "version in ThisBuild := \""
-
-set_version_in_file "plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/version.sbt" "version in ThisBuild := \""
-set_version_in_file "plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client/project/plugins.sbt" "graphql-codegen-sbt-plugin\" % \""
-
-set_version_in_file "plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/version.sbt" "version in ThisBuild := \""
-set_version_in_file "plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/example-client-scala/project/plugins.sbt" "graphql-codegen-sbt-plugin\" % \""
-
-set_version_in_file "plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/version.sbt" "version in ThisBuild := \""
-set_version_in_file "plugins/sbt/graphql-java-codegen-sbt-plugin/src/sbt-test/graphql-codegen-sbt-plugin/simple/project/plugins.sbt" "plugin.version\").orElse(Some(\""
-
# Exit clean
exit 0
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/generators/FreeMarkerTemplatesRegistry.java b/src/main/java/com/kobylynskyi/graphql/codegen/generators/FreeMarkerTemplatesRegistry.java
index bb4b7d837..f2e299be0 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/generators/FreeMarkerTemplatesRegistry.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/generators/FreeMarkerTemplatesRegistry.java
@@ -32,7 +32,6 @@ class FreeMarkerTemplatesRegistry {
try {
configuration = buildFreeMarkerTemplateConfiguration();
templateMap.put(GeneratedLanguage.JAVA, getTemplates(configuration, GeneratedLanguage.JAVA));
- templateMap.put(GeneratedLanguage.SCALA, getTemplates(configuration, GeneratedLanguage.SCALA));
templateMap.put(GeneratedLanguage.KOTLIN, getTemplates(configuration, GeneratedLanguage.KOTLIN));
} catch (IOException e) {
throw new UnableToLoadFreeMarkerTemplateException(e);
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/FieldDefinitionsToResolverDataModelMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/FieldDefinitionsToResolverDataModelMapper.java
index a8a0626f2..1ac6cbd72 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/FieldDefinitionsToResolverDataModelMapper.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/FieldDefinitionsToResolverDataModelMapper.java
@@ -25,7 +25,6 @@
import java.util.stream.Collectors;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.CLASS_NAME;
-import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ENUM_IMPORT_IT_SELF_IN_SCALA;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATED_ANNOTATION;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATED_INFO;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATE_MODEL_OPEN_CLASSES;
@@ -161,7 +160,6 @@ private Map mapToResolverModel(MappingContext mappingContext, St
dataModel.put(IMPLEMENTS, parentInterface != null ? singletonList(parentInterface) : null);
dataModel.put(GENERATED_ANNOTATION, mappingContext.getAddGeneratedAnnotation());
dataModel.put(GENERATED_INFO, mappingContext.getGeneratedInformation());
- dataModel.put(ENUM_IMPORT_IT_SELF_IN_SCALA, mappingContext.getEnumImportItSelfInScala());
dataModel.put(GENERATE_MODEL_OPEN_CLASSES, mappingContext.isGenerateModelOpenClasses());
dataModel.put(INITIALIZE_NULLABLE_TYPES, mappingContext.isInitializeNullableTypes());
return dataModel;
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/GraphQLTypeMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/GraphQLTypeMapper.java
index a14942fb2..e82366e75 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/GraphQLTypeMapper.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/GraphQLTypeMapper.java
@@ -21,7 +21,7 @@
import java.util.Set;
/**
- * Map GraphQL type to language-specific type (java/scala/kotlin/etc)
+ * Map GraphQL type to language-specific type (java/kotlin/etc)
*
* @author kobylynskyi
*/
@@ -60,7 +60,7 @@ public static List getDirectives(NamedNode> def) {
}
/**
- * Wrap language-specific type (java/scala/kotlin/etc) into {@link List}.
+ * Wrap language-specific type (java/kotlin/etc) into {@link List}.
* E.g.: {@code String} becomes {@code List}
*
* @param type The name of a type that will be wrapped into {@code List<>}
@@ -107,7 +107,7 @@ public static List getDirectives(NamedNode> def) {
* @param mappingContext Global mapping context
* @param namedDefinition Named definition
* @param parentTypeName Name of the parent type
- * @return Java/Scala type wrapped into the subscriptionReturnType
+ * @return Java/Kotlin type wrapped into the subscriptionReturnType
*/
public abstract String wrapApiReturnTypeIfRequired(MappingContext mappingContext,
NamedDefinition namedDefinition,
@@ -197,20 +197,20 @@ public String getGenericsString(MappingContext mappingContext, String genericTyp
*
* @param mappingContext Global mapping context
* @param type GraphQL type
- * @return Corresponding language-specific type (java/scala/kotlin/etc)
+ * @return Corresponding language-specific type (java/kotlin/etc)
*/
public String getLanguageType(MappingContext mappingContext, Type> type) {
return getLanguageType(mappingContext, type, null, null).getJavaName();
}
/**
- * Convert GraphQL type to a corresponding language-specific type (java/scala/kotlin/etc)
+ * Convert GraphQL type to a corresponding language-specific type (java/kotlin/etc)
*
* @param mappingContext Global mapping context
* @param graphqlType GraphQL type
* @param name GraphQL type name
* @param parentTypeName Name of the parent type
- * @return Corresponding language-specific type (java/scala/kotlin/etc)
+ * @return Corresponding language-specific type (java/kotlin/etc)
*/
public NamedDefinition getLanguageType(MappingContext mappingContext, Type> graphqlType, String name,
String parentTypeName) {
@@ -218,14 +218,14 @@ public NamedDefinition getLanguageType(MappingContext mappingContext, Type> gr
}
/**
- * Convert GraphQL type to a corresponding language-specific type (java/scala/kotlin/etc)
+ * Convert GraphQL type to a corresponding language-specific type (java/kotlin/etc)
*
* @param mappingContext Global mapping context
* @param graphqlType GraphQL type
* @param name GraphQL type name
* @param parentTypeName Name of the parent type
* @param directives GraphQL field directives
- * @return Corresponding language-specific type (java/scala/kotlin/etc)
+ * @return Corresponding language-specific type (java/kotlin/etc)
*/
public NamedDefinition getLanguageType(MappingContext mappingContext, Type> graphqlType, String name,
String parentTypeName, List directives) {
@@ -235,7 +235,7 @@ public NamedDefinition getLanguageType(MappingContext mappingContext, Type> gr
}
/**
- * Convert GraphQL type to a corresponding language-specific type (java/scala/kotlin/etc)
+ * Convert GraphQL type to a corresponding language-specific type (java/kotlin/etc)
*
* @param mappingContext Global mapping context
* @param graphqlType GraphQL type
@@ -243,7 +243,7 @@ public NamedDefinition getLanguageType(MappingContext mappingContext, Type> gr
* @param parentTypeName Name of the parent type
* @param mandatory GraphQL type is non-null
* @param collection GraphQL type is collection
- * @return Corresponding language-specific type (java/scala/kotlin/etc)
+ * @return Corresponding language-specific type (java/kotlin/etc)
*/
public NamedDefinition getLanguageType(MappingContext mappingContext, Type> graphqlType,
String name, String parentTypeName,
@@ -254,7 +254,7 @@ public NamedDefinition getLanguageType(MappingContext mappingContext, Type> gr
}
/**
- * Convert GraphQL type to a corresponding language-specific type (java/scala/kotlin/etc)
+ * Convert GraphQL type to a corresponding language-specific type (java/kotlin/etc)
*
* @param mappingContext Global mapping context
* @param graphqlType GraphQL type
@@ -263,7 +263,7 @@ public NamedDefinition getLanguageType(MappingContext mappingContext, Type> gr
* @param mandatory GraphQL type is non-null
* @param collection GraphQL type is collection
* @param directives GraphQL field directives
- * @return Corresponding language-specific type (java/scala/kotlin/etc)
+ * @return Corresponding language-specific type (java/kotlin/etc)
*/
public NamedDefinition getLanguageType(MappingContext mappingContext, Type> graphqlType,
String name, String parentTypeName,
@@ -291,7 +291,7 @@ public NamedDefinition getLanguageType(MappingContext mappingContext, Type> gr
}
/**
- * Convert GraphQL type to a corresponding language-specific type (java/scala/kotlin/etc)
+ * Convert GraphQL type to a corresponding language-specific type (java/kotlin/etc)
*
* @param mappingContext Global mapping context
* @param graphQLType GraphQL type
@@ -300,7 +300,7 @@ public NamedDefinition getLanguageType(MappingContext mappingContext, Type> gr
* @param mandatory GraphQL type is non-null
* @param collection GraphQL type is collection
* @param directives GraphQL field directives
- * @return Corresponding language-specific type (java/scala/kotlin/etc)
+ * @return Corresponding language-specific type (java/kotlin/etc)
*/
public NamedDefinition getLanguageType(MappingContext mappingContext, String graphQLType, String name,
String parentTypeName, boolean mandatory, boolean collection,
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/InputDefinitionToDataModelMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/InputDefinitionToDataModelMapper.java
index d567e8106..1cf4b54bd 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/InputDefinitionToDataModelMapper.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/InputDefinitionToDataModelMapper.java
@@ -12,7 +12,6 @@
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ANNOTATIONS;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.BUILDER;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.CLASS_NAME;
-import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ENUM_IMPORT_IT_SELF_IN_SCALA;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.EQUALS_AND_HASH_CODE;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.FIELDS;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATED_ANNOTATION;
@@ -74,7 +73,6 @@ public Map map(MappingContext mappingContext, ExtendedInputObjec
dataModel.put(TO_STRING_FOR_REQUEST, mappingContext.getGenerateClient());
dataModel.put(GENERATED_ANNOTATION, mappingContext.getAddGeneratedAnnotation());
dataModel.put(GENERATED_INFO, mappingContext.getGeneratedInformation());
- dataModel.put(ENUM_IMPORT_IT_SELF_IN_SCALA, mappingContext.getEnumImportItSelfInScala());
dataModel.put(GENERATE_MODEL_OPEN_CLASSES, mappingContext.isGenerateModelOpenClasses());
dataModel.put(INITIALIZE_NULLABLE_TYPES, mappingContext.isInitializeNullableTypes());
dataModel.put(SUPPORT_UNKNOWN_FIELDS, mappingContext.isSupportUnknownFields());
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/InterfaceDefinitionToDataModelMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/InterfaceDefinitionToDataModelMapper.java
index b21d18965..084fe3c3b 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/InterfaceDefinitionToDataModelMapper.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/InterfaceDefinitionToDataModelMapper.java
@@ -11,7 +11,6 @@
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ANNOTATIONS;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.CLASS_NAME;
-import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ENUM_IMPORT_IT_SELF_IN_SCALA;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.FIELDS;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATED_ANNOTATION;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATED_INFO;
@@ -61,7 +60,6 @@ public Map map(MappingContext mappingContext, ExtendedInterfaceT
.mapFields(mappingContext, definition.getFieldDefinitions(), definition));
dataModel.put(GENERATED_ANNOTATION, mappingContext.getAddGeneratedAnnotation());
dataModel.put(GENERATED_INFO, mappingContext.getGeneratedInformation());
- dataModel.put(ENUM_IMPORT_IT_SELF_IN_SCALA, mappingContext.getEnumImportItSelfInScala());
dataModel.put(IMMUTABLE_MODELS, mappingContext.getGenerateImmutableModels());
dataModel.put(PARENT_INTERFACE_PROPERTIES, mappingContext.getParentInterfaceProperties());
dataModel.put(GENERATE_SEALED_INTERFACES, mappingContext.isGenerateSealedInterfaces());
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/RequestResponseDefinitionToDataModelMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/RequestResponseDefinitionToDataModelMapper.java
index 18d381161..0b4b2f64b 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/RequestResponseDefinitionToDataModelMapper.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/RequestResponseDefinitionToDataModelMapper.java
@@ -23,7 +23,6 @@
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.BUILDER;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.CLASS_NAME;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.DEPRECATED;
-import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ENUM_IMPORT_IT_SELF_IN_SCALA;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.EQUALS_AND_HASH_CODE;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.FIELDS;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATED_ANNOTATION;
@@ -154,7 +153,6 @@ public Map mapParametrizedInput(MappingContext mappingContext,
dataModel.put(EQUALS_AND_HASH_CODE, mappingContext.getGenerateEqualsAndHashCode());
dataModel.put(GENERATED_ANNOTATION, mappingContext.getAddGeneratedAnnotation());
dataModel.put(GENERATED_INFO, mappingContext.getGeneratedInformation());
- dataModel.put(ENUM_IMPORT_IT_SELF_IN_SCALA, mappingContext.getEnumImportItSelfInScala());
dataModel.put(GENERATE_NOARGS_CONSTRUCTOR_ONLY, mappingContext.isGenerateNoArgsConstructorOnly());
// dataModel.put(TO_STRING, mappingConfig.getGenerateToString()); always generated for serialization purposes
return dataModel;
@@ -225,7 +223,6 @@ public Map mapRequest(MappingContext mappingContext,
dataModel.put(TO_STRING_FOR_REQUEST, mappingContext.getGenerateClient());
dataModel.put(GENERATED_ANNOTATION, mappingContext.getAddGeneratedAnnotation());
dataModel.put(GENERATED_INFO, mappingContext.getGeneratedInformation());
- dataModel.put(ENUM_IMPORT_IT_SELF_IN_SCALA, mappingContext.getEnumImportItSelfInScala());
return dataModel;
}
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/TypeDefinitionToDataModelMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/TypeDefinitionToDataModelMapper.java
index 5edef456d..dd313fca6 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/TypeDefinitionToDataModelMapper.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/TypeDefinitionToDataModelMapper.java
@@ -20,7 +20,6 @@
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ANNOTATIONS;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.BUILDER;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.CLASS_NAME;
-import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ENUM_IMPORT_IT_SELF_IN_SCALA;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.EQUALS_AND_HASH_CODE;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.FIELDS;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATED_ANNOTATION;
@@ -104,7 +103,6 @@ public Map map(MappingContext mappingContext,
dataModel.put(TO_STRING_FOR_REQUEST, mappingContext.getGenerateClient());
dataModel.put(GENERATED_ANNOTATION, mappingContext.getAddGeneratedAnnotation());
dataModel.put(GENERATED_INFO, mappingContext.getGeneratedInformation());
- dataModel.put(ENUM_IMPORT_IT_SELF_IN_SCALA, mappingContext.getEnumImportItSelfInScala());
dataModel.put(PARENT_INTERFACE_PROPERTIES, mappingContext.getParentInterfaceProperties());
dataModel.put(GENERATE_MODEL_OPEN_CLASSES, mappingContext.isGenerateModelOpenClasses());
dataModel.put(INITIALIZE_NULLABLE_TYPES, mappingContext.isInitializeNullableTypes());
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/UnionDefinitionToDataModelMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/UnionDefinitionToDataModelMapper.java
index 5b94a632a..fd152a242 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/mapper/UnionDefinitionToDataModelMapper.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/mapper/UnionDefinitionToDataModelMapper.java
@@ -9,7 +9,6 @@
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ANNOTATIONS;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.CLASS_NAME;
-import static com.kobylynskyi.graphql.codegen.model.DataModelFields.ENUM_IMPORT_IT_SELF_IN_SCALA;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATED_ANNOTATION;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATED_INFO;
import static com.kobylynskyi.graphql.codegen.model.DataModelFields.GENERATE_SEALED_INTERFACES;
@@ -47,7 +46,6 @@ public Map map(MappingContext mappingContext, ExtendedUnionTypeD
dataModel.put(JAVA_DOC, JavaDocBuilder.build(definition));
dataModel.put(GENERATED_ANNOTATION, mappingContext.getAddGeneratedAnnotation());
dataModel.put(GENERATED_INFO, mappingContext.getGeneratedInformation());
- dataModel.put(ENUM_IMPORT_IT_SELF_IN_SCALA, mappingContext.getEnumImportItSelfInScala());
dataModel.put(GENERATE_SEALED_INTERFACES, mappingContext.isGenerateSealedInterfaces());
return dataModel;
}
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/model/DataModelFields.java b/src/main/java/com/kobylynskyi/graphql/codegen/model/DataModelFields.java
index 591080bf1..0e3a8a73d 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/model/DataModelFields.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/model/DataModelFields.java
@@ -32,7 +32,6 @@ public final class DataModelFields {
public static final String GENERATED_INFO = "generatedInfo";
public static final String GENERATE_ALL_METHOD_IN_PROJECTION = "generateAllMethodInProjection";
public static final String RESPONSE_PROJECTION_MAX_DEPTH = "responseProjectionMaxDepth";
- public static final String ENUM_IMPORT_IT_SELF_IN_SCALA = "enumImportItSelfInScala";
public static final String PARENT_INTERFACE_PROPERTIES = "parentInterfaceProperties";
public static final String SERIALIZATION_LIBRARY = "serializationLibrary";
public static final String GENERATE_MODEL_OPEN_CLASSES = "generateModelOpenClasses";
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/model/DeprecatedDefinition.java b/src/main/java/com/kobylynskyi/graphql/codegen/model/DeprecatedDefinition.java
index 13cfa419a..bb9c99960 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/model/DeprecatedDefinition.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/model/DeprecatedDefinition.java
@@ -18,7 +18,7 @@ public DeprecatedDefinition(String annotation) {
}
/**
- * field reason Only support in Scala/Kotlin.
+ * field reason Only support in Kotlin.
*
* @param annotation Definitions in different languages
* @param reason Description in graphql schema Directive
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/model/GeneratedLanguage.java b/src/main/java/com/kobylynskyi/graphql/codegen/model/GeneratedLanguage.java
index 2eb310734..2163d9d3c 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/model/GeneratedLanguage.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/model/GeneratedLanguage.java
@@ -7,8 +7,6 @@ public enum GeneratedLanguage {
JAVA(".java"),
- SCALA(".scala"),
-
KOTLIN(".kt");
private final String fileExtension;
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/model/GraphQLCodegenConfiguration.java b/src/main/java/com/kobylynskyi/graphql/codegen/model/GraphQLCodegenConfiguration.java
index 8510667d0..1b5206b83 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/model/GraphQLCodegenConfiguration.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/model/GraphQLCodegenConfiguration.java
@@ -518,7 +518,7 @@ public interface GraphQLCodegenConfiguration {
/**
* Generate code with lang
*
- * @return GeneratedLanguage.SCALA or GeneratedLanguage.JAVA
+ * @return GeneratedLanguage.KOTLIN or GeneratedLanguage.JAVA
*/
GeneratedLanguage getGeneratedLanguage();
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/model/MappingConfigConstants.java b/src/main/java/com/kobylynskyi/graphql/codegen/model/MappingConfigConstants.java
index c16b53ab1..3093e7866 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/model/MappingConfigConstants.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/model/MappingConfigConstants.java
@@ -84,11 +84,11 @@ public class MappingConfigConstants {
public static final GeneratedLanguage DEFAULT_GENERATED_LANGUAGE = GeneratedLanguage.JAVA;
public static final String DEFAULT_GENERATED_LANGUAGE_STRING = "JAVA";
- // This library is the only one that supports Scala well and is generally used.
+ // This library is the only one that supports Kotlin well and is generally used.
// There is no need to consider the possibility of switching.
public static final String DEFAULT_SERIALIZATION_LIBRARY = "JACKSON";
- // Only supported in Kotlin and Scala
+ // Only supported in Kotlin
public static final boolean DEFAULT_GENERATE_MODEL_OPEN_CLASSES = false;
public static final String DEFAULT_GENERATE_MODEL_OPEN_CLASSES_STRING = "false";
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/model/MappingContext.java b/src/main/java/com/kobylynskyi/graphql/codegen/model/MappingContext.java
index 544b5f812..c597b5d68 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/model/MappingContext.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/model/MappingContext.java
@@ -35,7 +35,6 @@ public class MappingContext implements GraphQLCodegenConfiguration {
private final Map> interfaceChildren;
private final GeneratedInformation generatedInformation;
private final DataModelMapperFactory dataModelMapperFactory;
- private Set enumImportItSelfInScala;
private Map> parentInterfaceProperties;
private Set fieldNamesWithResolvers;
@@ -420,27 +419,16 @@ public File getOutputDirectory() {
return outputDirectory;
}
- public Set getEnumImportItSelfInScala() {
- // Only for scala
- if (GeneratedLanguage.SCALA.equals(this.config.getGeneratedLanguage()) && enumImportItSelfInScala == null) {
- enumImportItSelfInScala = this.document.getEnumDefinitions().stream()
- .map(this::getModelClassNameWithPrefixAndSuffix)
- .collect(Collectors.toSet());
- }
- return enumImportItSelfInScala;
- }
-
/**
* Get a list of fields for each interface
- * This method is used only for Scala and Kotlin
+ * This method is used only for Kotlin
*
* @return a map of interface name to a list of fields
*/
public Map> getParentInterfaceProperties() {
// In this way, we no longer need to rely on the order in which files are created
- // Only for scala/kotlin
- if ((GeneratedLanguage.SCALA.equals(this.config.getGeneratedLanguage()) ||
- GeneratedLanguage.KOTLIN.equals(this.config.getGeneratedLanguage())) &&
+ // Only for kotlin
+ if (GeneratedLanguage.KOTLIN.equals(this.config.getGeneratedLanguage()) &&
parentInterfaceProperties == null) {
parentInterfaceProperties = new HashMap<>();
for (ExtendedInterfaceTypeDefinition interfaceDef : this.document.getInterfaceDefinitions()) {
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/model/builders/DeprecatedDefinitionBuilder.java b/src/main/java/com/kobylynskyi/graphql/codegen/model/builders/DeprecatedDefinitionBuilder.java
index 074107997..3541f074b 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/model/builders/DeprecatedDefinitionBuilder.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/model/builders/DeprecatedDefinitionBuilder.java
@@ -15,7 +15,6 @@
public class DeprecatedDefinitionBuilder {
private static final String REASON = "reason";
- private static final String SCALA_ANNOTATION = "deprecated";
private static final String JAVA_ANNOTATION = "Deprecated";
private static final String KOTLIN_ANNOTATION = "Deprecated";
@@ -51,8 +50,6 @@ public static DeprecatedDefinition build(GeneratedLanguage generatedLanguage,
switch (generatedLanguage) {
case KOTLIN:
return new DeprecatedDefinition(KOTLIN_ANNOTATION, getMessage(directive));
- case SCALA:
- return new DeprecatedDefinition(SCALA_ANNOTATION, getMessage(directive));
case JAVA:
default:
return new DeprecatedDefinition(JAVA_ANNOTATION); // message is ignored
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/model/graphql/GraphQLRequestSerializer.java b/src/main/java/com/kobylynskyi/graphql/codegen/model/graphql/GraphQLRequestSerializer.java
index 7eed10332..6c9a773f0 100644
--- a/src/main/java/com/kobylynskyi/graphql/codegen/model/graphql/GraphQLRequestSerializer.java
+++ b/src/main/java/com/kobylynskyi/graphql/codegen/model/graphql/GraphQLRequestSerializer.java
@@ -170,12 +170,6 @@ public static String getEntry(Object input, boolean useObjectMapper) {
return serializeEnum((Enum>) input);
} else if (input instanceof String) {
return escapeJsonString(input.toString());
- } else if (input.getClass().getName().equals("scala.Some")) { // TODO: move to Scala Serializer
- // Currently, option only supports primitive types, so that's fine.
- // Now, this kind of case will appear if and only if Seq[Option[Int]] is
- return input.toString().replace("Some(", "").replace(")", "");
- } else if (input.getClass().getName().equals("scala.None$")) {
- return null;
} else {
return input.toString();
}
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaAnnotationsMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaAnnotationsMapper.java
deleted file mode 100644
index 411860222..000000000
--- a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaAnnotationsMapper.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.mapper.AnnotationsMapper;
-import com.kobylynskyi.graphql.codegen.mapper.DataModelMapper;
-import com.kobylynskyi.graphql.codegen.mapper.ValueMapper;
-import com.kobylynskyi.graphql.codegen.model.MappingContext;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Mapper class for converting GraphQL types to Scala types
- */
-public class ScalaAnnotationsMapper extends AnnotationsMapper {
-
- private final ValueMapper valueMapper;
-
- public ScalaAnnotationsMapper(ValueMapper valueMapper) {
- this.valueMapper = valueMapper;
- }
-
- @Override
- public boolean addModelValidationAnnotationForType(String possiblyPrimitiveType) {
- return !ScalaGraphQLTypeMapper.isScalaPrimitive(possiblyPrimitiveType);
- }
-
- @Override
- public String getJacksonResolverTypeIdAnnotation(String modelPackageName) {
- return "com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver(classOf[" + modelPackageName +
- "GraphqlJacksonTypeIdResolver])";
- }
-
- @Override
- public List getAdditionalAnnotations(MappingContext mappingContext, String typeName) {
- StringBuilder typeNameWithPrefixAndSuffixBuilder = new StringBuilder();
- if (mappingContext.getModelNamePrefix() != null) {
- typeNameWithPrefixAndSuffixBuilder.append(mappingContext.getModelNamePrefix());
- }
- typeNameWithPrefixAndSuffixBuilder.append(typeName);
- if (mappingContext.getModelNameSuffix() != null) {
- typeNameWithPrefixAndSuffixBuilder.append(mappingContext.getModelNameSuffix());
- }
- Set enumImportItSelf = mappingContext.getEnumImportItSelfInScala();
- if (enumImportItSelf == null ||
- !enumImportItSelf.contains(typeNameWithPrefixAndSuffixBuilder.toString())) {
- return Collections.emptyList();
- }
- // Inspired by the pr https://github.com/kobylynskyi/graphql-java-codegen/pull/637/files
- String modelPackageName = DataModelMapper.getModelPackageName(mappingContext);
- if (Utils.isNotBlank(modelPackageName)) {
- typeNameWithPrefixAndSuffixBuilder.insert(0, modelPackageName + ".");
- }
- String annotation = String.format(
- "com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[%sTypeRefer])",
- typeNameWithPrefixAndSuffixBuilder);
- return Collections.singletonList(annotation);
- }
-
- @Override
- public ValueMapper getValueMapper() {
- return valueMapper;
- }
-
-}
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaDataModelMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaDataModelMapper.java
deleted file mode 100644
index 5eef26d7e..000000000
--- a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaDataModelMapper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.mapper.DataModelMapper;
-import com.kobylynskyi.graphql.codegen.model.MappingContext;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import static com.kobylynskyi.graphql.codegen.utils.Utils.wrapString;
-
-/**
- * Data model mapper for SCALA generated classes
- */
-public class ScalaDataModelMapper extends DataModelMapper {
-
- private static final String RESTRICTED_WORDS_WRAP_WITH = "`";
- private static final Set SCALA_RESTRICTED_KEYWORDS = new HashSet<>(Arrays.asList(
- "package", "import", "class", "object", "trait", "extends", "with", "type", "forSome",
- "private", "protected", "abstract", "sealed", "final", "implicit", "lazy", "override", "try",
- "catch", "finally", "throw", "if", "else", "match", "case", "do", "while", "for", "return", "yield",
- "def", "val", "var", "this", "super", "new", "true", "false", "null"
- ));
-
- //TODO maybe have others
- private static final Set SCALA_RESTRICTED_METHOD_NAMES = new HashSet<>(Arrays.asList(
- "getClass", "notify", "notifyAll", "wait", "clone", "finalize"));
-
-
- @Override
- public String capitalizeIfRestricted(MappingContext mappingContext, String fieldName) {
-
- if (SCALA_RESTRICTED_KEYWORDS.contains(fieldName)) {
- return wrapString(fieldName, RESTRICTED_WORDS_WRAP_WITH);
- }
-
- // Scala case class's Fields cannot also use the names of these methods.
- if (SCALA_RESTRICTED_METHOD_NAMES.contains(fieldName)) {
- return Utils.capitalize(fieldName);
- }
-
- return fieldName;
- }
-
- @Override
- public String capitalizeMethodNameIfRestricted(MappingContext mappingContext, String methodName) {
- if (SCALA_RESTRICTED_KEYWORDS.contains(methodName)) {
- return wrapString(methodName, RESTRICTED_WORDS_WRAP_WITH);
- }
- if (SCALA_RESTRICTED_METHOD_NAMES.contains(methodName)) {
- return Utils.capitalize(methodName);
- }
- return methodName;
- }
-
-}
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaGraphQLCodegen.java b/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaGraphQLCodegen.java
deleted file mode 100644
index 55343d52b..000000000
--- a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaGraphQLCodegen.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.GraphQLCodegen;
-import com.kobylynskyi.graphql.codegen.mapper.MapperFactory;
-import com.kobylynskyi.graphql.codegen.model.GeneratedInformation;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.model.definitions.ExtendedScalarTypeDefinition;
-import com.kobylynskyi.graphql.codegen.supplier.MappingConfigSupplier;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * Class having only Scala-specific methods for code-generation
- * Most of the logic is still residing in the parent class
- */
-public class ScalaGraphQLCodegen extends GraphQLCodegen {
-
- private static final MapperFactory MAPPER_FACTORY = new ScalaMapperFactoryImpl();
-
- public ScalaGraphQLCodegen(List schemas, File outputDir, MappingConfig mappingConfig,
- GeneratedInformation generatedInformation) {
- super(schemas, outputDir, mappingConfig, generatedInformation, MAPPER_FACTORY);
- }
-
- public ScalaGraphQLCodegen(String introspectionResult, File outputDir, MappingConfig mappingConfig,
- GeneratedInformation generatedInformation) {
- super(introspectionResult, outputDir, mappingConfig, generatedInformation, MAPPER_FACTORY);
- }
-
- public ScalaGraphQLCodegen(List schemas, String introspectionResult, File outputDir,
- MappingConfig mappingConfig, MappingConfigSupplier externalMappingConfigSupplier) {
- super(schemas, introspectionResult, outputDir, mappingConfig, externalMappingConfigSupplier, MAPPER_FACTORY);
- }
-
- public ScalaGraphQLCodegen(List schemas, String introspectionResult, File outputDir,
- MappingConfig mappingConfig, MappingConfigSupplier externalMappingConfigSupplier,
- GeneratedInformation generatedInformation) {
- super(schemas, introspectionResult, outputDir, mappingConfig, externalMappingConfigSupplier,
- generatedInformation, MAPPER_FACTORY);
- }
-
- @Override
- protected void initDefaultValues(MappingConfig mappingConfig) {
- if (mappingConfig.isGenerateModelOpenClasses() == null) {
- mappingConfig.setGenerateModelOpenClasses(false);
- }
- if (mappingConfig.getGenerateBuilder() == null) {
- // functional expression
- mappingConfig.setGenerateBuilder(false);
- }
- if (mappingConfig.getGenerateImmutableModels() == null) {
- // functional expression
- mappingConfig.setGenerateImmutableModels(true);
- }
- super.initDefaultValues(mappingConfig);
- }
-
- @Override
- protected void initCustomTypeMappings(Collection scalarTypeDefinitions) {
- //Although Scala doesn't work like kotlin`?`, But for primitive types that allow nulls, we can use Option.
- super.initCustomTypeMappings(scalarTypeDefinitions);
- mappingConfig.putCustomTypeMappingIfAbsent("ID", String.class.getSimpleName());
- mappingConfig.putCustomTypeMappingIfAbsent("String", String.class.getSimpleName());
- mappingConfig.putCustomTypeMappingIfAbsent("Int", "scala.Option[Int]");
- mappingConfig.putCustomTypeMappingIfAbsent("Int!", "Int");
- mappingConfig.putCustomTypeMappingIfAbsent("Float",
- Utils.wrapString(Double.class.getSimpleName(), "scala.Option[", "]"));
- mappingConfig.putCustomTypeMappingIfAbsent("Float!", Double.class.getSimpleName());
- mappingConfig.putCustomTypeMappingIfAbsent("Boolean",
- Utils.wrapString(Boolean.class.getSimpleName(), "scala.Option[", "]"));
- mappingConfig.putCustomTypeMappingIfAbsent("Boolean!", Boolean.class.getSimpleName());
- }
-
-}
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaGraphQLTypeMapper.java b/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaGraphQLTypeMapper.java
deleted file mode 100644
index e29aa3463..000000000
--- a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaGraphQLTypeMapper.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.mapper.GraphQLTypeMapper;
-import com.kobylynskyi.graphql.codegen.model.MappingConfigConstants;
-import com.kobylynskyi.graphql.codegen.model.MappingContext;
-import com.kobylynskyi.graphql.codegen.model.NamedDefinition;
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import graphql.language.InputValueDefinition;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import static com.kobylynskyi.graphql.codegen.java.JavaGraphQLTypeMapper.JAVA_UTIL_LIST;
-import static java.util.Arrays.asList;
-
-/**
- * Mapper class for converting GraphQL types to Scala types
- */
-public class ScalaGraphQLTypeMapper extends GraphQLTypeMapper {
-
- private static final String SCALA_UTIL_LIST = "scala.Seq";
- private static final Pattern SCALA_UTIL_LIST_ELEMENT_REGEX = Pattern.compile("scala\\.Seq\\[(.+)]");
- private static final String SCALA_UTIL_OPTIONAL = "scala.Option";
- private static final Set SCALA_PRIMITIVE_TYPES = new HashSet<>(asList(
- "Byte", "Short", "Int", "Long", "Float", "Double", "Char", "Boolean"));
-
- public static boolean isScalaPrimitive(String scalaType) {
- return SCALA_PRIMITIVE_TYPES.contains(scalaType);
- }
-
- public static boolean isScalaOption(String scalaType) {
- return scalaType.startsWith(SCALA_UTIL_OPTIONAL + "[") && scalaType.endsWith("]");
- }
-
- public static boolean isScalaCollection(String scalaType) {
- return scalaType.startsWith(SCALA_UTIL_LIST + "[") && scalaType.endsWith("]");
- }
-
- public static String getGenericParameter(String scalaType) {
- return scalaType.substring(SCALA_UTIL_LIST.length() + 1, scalaType.length() - 1);
- }
-
- @Override
- public String wrapIntoList(MappingContext mappingContext, String type, boolean mandatory) {
- return getGenericsString(mappingContext, SCALA_UTIL_LIST, type);
- }
-
- @Override
- public String wrapSuperTypeIntoList(MappingContext mappingContext, String type, boolean mandatory) {
- return getGenericsString(mappingContext, SCALA_UTIL_LIST, "_ <: " + type);
- }
-
- @Override
- public String wrapApiReturnTypeIfRequired(MappingContext mappingContext,
- NamedDefinition namedDefinition,
- String parentTypeName) {
- String computedTypeName = namedDefinition.getJavaName();
- if (parentTypeName.equalsIgnoreCase(GraphQLOperation.SUBSCRIPTION.name()) &&
- Utils.isNotBlank(mappingContext.getSubscriptionReturnType())) {
- // in case it is subscription and subscriptionReturnType is set
- return getGenericsString(mappingContext, mappingContext.getSubscriptionReturnType(), computedTypeName);
- }
-
- if (Boolean.TRUE.equals(mappingContext.getUseOptionalForNullableReturnTypes())
- && !namedDefinition.isMandatory()
- && !computedTypeName.startsWith(SCALA_UTIL_LIST)
- && !computedTypeName.startsWith(JAVA_UTIL_LIST)
- && !computedTypeName.startsWith(SCALA_UTIL_OPTIONAL)) {
- // Kotlin/Scala: primitive types is Option by default
- // wrap the type into scala.Option (except java list and scala list)
- computedTypeName = getGenericsString(mappingContext, SCALA_UTIL_OPTIONAL, computedTypeName);
- }
-
- if (computedTypeName.startsWith(SCALA_UTIL_LIST) &&
- Utils.isNotBlank(mappingContext.getApiReturnListType())) {
- // in case it is query/mutation, return type is list and apiReturnListType is set
- if (mappingContext.getApiReturnListType().contains(MappingConfigConstants.API_RETURN_NAME_PLACEHOLDER)) {
- Matcher matcher = SCALA_UTIL_LIST_ELEMENT_REGEX.matcher(computedTypeName);
- if (matcher.find()) {
- String listElement = matcher.group(1);
- return mappingContext.getApiReturnListType().replace(
- MappingConfigConstants.API_RETURN_NAME_PLACEHOLDER,
- listElement);
- } else {
- throw new IllegalStateException();
- }
- } else {
- return computedTypeName.replace(SCALA_UTIL_LIST, mappingContext.getApiReturnListType());
- }
- }
- if (Utils.isNotBlank(mappingContext.getApiReturnType())) {
- // in case it is query/mutation and apiReturnType is set
- if (mappingContext.getApiReturnType().contains(MappingConfigConstants.API_RETURN_NAME_PLACEHOLDER)) {
- return mappingContext.getApiReturnType()
- .replace(MappingConfigConstants.API_RETURN_NAME_PLACEHOLDER, computedTypeName);
- } else {
- return getGenericsString(mappingContext, mappingContext.getApiReturnType(), computedTypeName);
- }
- }
- return getTypeConsideringPrimitive(mappingContext, namedDefinition, computedTypeName);
- }
-
- @Override
- public boolean isPrimitive(String scalaType) {
- return isScalaPrimitive(scalaType);
- }
-
- @Override
- public String getGenericsString(MappingContext mappingContext, String genericType, String typeParameter) {
- if (genericType.contains("%s")) {
- return String.format(genericType, typeParameter);
- } else {
- return String.format("%s[%s]", genericType, typeParameter);
- }
- }
-
- @Override
- public String wrapApiInputTypeIfRequired(MappingContext mappingContext, NamedDefinition namedDefinition,
- String parentTypeName) {
- return getTypeConsideringPrimitive(mappingContext, namedDefinition, namedDefinition.getJavaName());
- }
-
- @Override
- public String wrapApiDefaultValueIfRequired(MappingContext mappingContext, NamedDefinition namedDefinition,
- InputValueDefinition inputValueDefinition, String defaultValue,
- String parentTypeName) {
- return defaultValue;
- }
-
-}
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaMapperFactoryImpl.java b/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaMapperFactoryImpl.java
deleted file mode 100644
index af195744f..000000000
--- a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaMapperFactoryImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.mapper.AnnotationsMapper;
-import com.kobylynskyi.graphql.codegen.mapper.DataModelMapper;
-import com.kobylynskyi.graphql.codegen.mapper.GraphQLTypeMapper;
-import com.kobylynskyi.graphql.codegen.mapper.MapperFactory;
-import com.kobylynskyi.graphql.codegen.mapper.ValueMapper;
-
-/**
- * A factory of various mappers for Scala language
- */
-public class ScalaMapperFactoryImpl implements MapperFactory {
-
- private final DataModelMapper dataModelMapper;
- private final ValueMapper valueMapper;
- private final GraphQLTypeMapper graphQLTypeMapper;
- private final AnnotationsMapper annotationsMapper;
-
- public ScalaMapperFactoryImpl() {
- dataModelMapper = new ScalaDataModelMapper();
- valueMapper = new ValueMapper(new ScalaValueFormatter(), dataModelMapper);
- graphQLTypeMapper = new ScalaGraphQLTypeMapper();
- annotationsMapper = new ScalaAnnotationsMapper(valueMapper);
- }
-
- @Override
- public DataModelMapper getDataModelMapper() {
- return dataModelMapper;
- }
-
- @Override
- public GraphQLTypeMapper getGraphQLTypeMapper() {
- return graphQLTypeMapper;
- }
-
- @Override
- public AnnotationsMapper getAnnotationsMapper() {
- return annotationsMapper;
- }
-
- @Override
- public ValueMapper getValueMapper() {
- return valueMapper;
- }
-
-}
diff --git a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaValueFormatter.java b/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaValueFormatter.java
deleted file mode 100644
index 09e7d6ff4..000000000
--- a/src/main/java/com/kobylynskyi/graphql/codegen/scala/ScalaValueFormatter.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.mapper.ValueFormatter;
-
-import java.util.StringJoiner;
-
-/**
- * Class contains various formatting logic that is specific only for Scala language
- */
-public class ScalaValueFormatter implements ValueFormatter {
-
- @Override
- public String getEmptyListValue() {
- return "scala.Seq.empty";
- }
-
- @Override
- public StringJoiner getListJoiner() {
- return new StringJoiner(", ", "scala.Seq(", ")");
- }
-
- @Override
- public StringJoiner getArrayJoiner() {
- return new StringJoiner(", ", "scala.Array(", ")");
- }
-
-}
diff --git a/src/main/resources/templates/scala-lang/enum.ftl b/src/main/resources/templates/scala-lang/enum.ftl
deleted file mode 100644
index e00c30423..000000000
--- a/src/main/resources/templates/scala-lang/enum.ftl
+++ /dev/null
@@ -1,49 +0,0 @@
-<#if package?has_content>
-package ${package}
-
-#if>
-<#if serializationLibrary == 'JACKSON'>
-import com.fasterxml.jackson.core.`type`.TypeReference
-
-#if>
-<#if javaDoc?has_content>
-/**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-<#list annotations as annotation>
-@${annotation}
-#list>
-object ${className} extends Enumeration<#if implements?has_content> with<#list implements as interface> ${interface}<#if interface_has_next> with #if>#list>#if> {
-
- type ${className} = Value
-
-<#if fields?has_content>
-<#list fields as field>
-<#if field.javaDoc?has_content>
- /**
-<#list field.javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if field.deprecated?has_content>
- @${field.deprecated.annotation}(message = "${field.deprecated.reason}")
-#if>
- val ${field.javaName}: Value = Value("${field.graphqlName}")
-#list>
-#if>
-
-}
-<#if serializationLibrary == 'JACKSON'>
-
-class ${className}TypeRefer extends TypeReference[${className}.type]
-#if>
diff --git a/src/main/resources/templates/scala-lang/interface.ftl b/src/main/resources/templates/scala-lang/interface.ftl
deleted file mode 100644
index 923a5e50c..000000000
--- a/src/main/resources/templates/scala-lang/interface.ftl
+++ /dev/null
@@ -1,66 +0,0 @@
-<#assign MapperUtil=statics["com.kobylynskyi.graphql.codegen.scala.ScalaGraphQLTypeMapper"]>
-<#if package?has_content>
-package ${package}
-
-#if>
-<#if imports??>
-<#list imports as import>
-import ${import}._
-#list>
-#if>
-<#if fields?has_content>
- <#if enumImportItSelfInScala?has_content>
- <#list fields as field>
- <#list enumImportItSelfInScala as enum>
- <#if MapperUtil.isScalaCollection(field.type)>
- <#if enum == MapperUtil.getGenericParameter(field.type)>
-import ${enum}._
- #if>
- <#else >
- <#if enum == field.type>
-import ${enum}._
- #if>
- #if>
- #list>
- #list>
- #if>
-#if>
-
-<#if javaDoc?has_content>
-/**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-<#list annotations as annotation>
-@${annotation}
-#list>
-<#if generateSealedInterfaces>sealed #if>trait ${className}<#if implements?has_content> extends<#list implements as interface> ${interface}<#if interface_has_next> with #if>#list>#if> {
-
-<#if fields?has_content>
-<#list fields as field>
-<#if field.javaDoc?has_content>
- /**
-<#list field.javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if field.deprecated?has_content>
- @${field.deprecated.annotation}(message = "${field.deprecated.reason}")
-#if>
-<#list field.annotations as annotation>
- @${annotation}
-#list>
- <#if !immutableModels>var <#else>val #if>${field.name}: ${field.type}
-
-#list>
-#if>
-}
diff --git a/src/main/resources/templates/scala-lang/jackson_type_id_resolver.ftl b/src/main/resources/templates/scala-lang/jackson_type_id_resolver.ftl
deleted file mode 100644
index 99eca095e..000000000
--- a/src/main/resources/templates/scala-lang/jackson_type_id_resolver.ftl
+++ /dev/null
@@ -1,41 +0,0 @@
-<#if package?has_content>
-package ${package}
-
-#if>
-import com.fasterxml.jackson.annotation.JsonTypeInfo
-import com.fasterxml.jackson.databind.DatabindContext
-import com.fasterxml.jackson.databind.JavaType
-import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
-
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-class GraphqlJacksonTypeIdResolver extends TypeIdResolverBase {
-
- private var superType: JavaType = _
-
- override def init(baseType: JavaType): Unit = {
- superType = baseType
- }
-
- override def typeFromId(context: DatabindContext, typename: String): JavaType = try {
- val clazz = Class.forName(<#if package?has_content>"${package}." +
- #if><#if modelNamePrefix?has_content>"${modelNamePrefix}" +
- #if>typename<#if modelNameSuffix?has_content> +
- "${modelNameSuffix}"#if>)
- context.constructSpecializedType(superType, clazz)
- } catch {
- case e: ClassNotFoundException =>
- Console.err.println(e.getMessage)
- null
- }
-
- override def getMechanism = JsonTypeInfo.Id.NAME
-
- override def idFromValue(obj: Any): String = idFromValueAndType(obj, obj.getClass)
-
- override def idFromValueAndType(obj: Any, subType: Class[_]): String = subType.getSimpleName
-}
\ No newline at end of file
diff --git a/src/main/resources/templates/scala-lang/operations.ftl b/src/main/resources/templates/scala-lang/operations.ftl
deleted file mode 100644
index 680034821..000000000
--- a/src/main/resources/templates/scala-lang/operations.ftl
+++ /dev/null
@@ -1,74 +0,0 @@
-<#assign MapperUtil=statics["com.kobylynskyi.graphql.codegen.scala.ScalaGraphQLTypeMapper"]>
-<#if package?has_content>
-package ${package}
-
-#if>
-<#list imports as import>
-import ${import}._
-#list>
-<#assign waitImports = []>
-<#list operations as operation>
- <#if operation.parameters?has_content>
- <#if enumImportItSelfInScala?has_content>
- <#list operation.parameters as param>
- <#list enumImportItSelfInScala as enum>
- <#if MapperUtil.isScalaCollection(param.type)>
- <#if enum == MapperUtil.getGenericParameter(param.type)>
- <#if !waitImports?seq_contains(enum)>
- <#assign waitImports = waitImports + [enum] />
- #if>
- #if>
- <#else >
- <#if enum == param.type>
- <#if !waitImports?seq_contains(enum)>
- <#assign waitImports = waitImports + [enum] />
- #if>
- #if>
- #if>
- #list>
- #list>
- #if>
- #if>
-#list>
-<#if waitImports?has_content>
-<#list waitImports as import>
-import ${import}._
-#list>
-#if>
-
-<#if javaDoc?has_content>
-/**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-trait ${className}<#if implements?has_content> extends <#list implements as interface>${interface}<#if interface_has_next> with #if>#list>#if> {
-
-<#list operations as operation>
-<#if operation.javaDoc?has_content>
- /**
-<#list operation.javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if operation.deprecated?has_content>
- @${operation.deprecated.annotation}(message = "${operation.deprecated.reason}")
-#if>
-<#list operation.annotations as annotation>
- @${annotation}
-#list>
- <#if operation.throwsException>
- @throws[Exception]
- #if>
- def ${operation.name}(<#list operation.parameters as param>${param.name}: ${param.type}<#if param_has_next>, #if>#list>): ${operation.type}
-
-#list>
-}
diff --git a/src/main/resources/templates/scala-lang/parametrized_input.ftl b/src/main/resources/templates/scala-lang/parametrized_input.ftl
deleted file mode 100644
index c6fd907a0..000000000
--- a/src/main/resources/templates/scala-lang/parametrized_input.ftl
+++ /dev/null
@@ -1,79 +0,0 @@
-<#assign MapperUtil=statics["com.kobylynskyi.graphql.codegen.scala.ScalaGraphQLTypeMapper"]>
-<#if package?has_content>
-package ${package}
-
-#if>
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLParametrizedInput
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-<#if fields?has_content>
- <#if enumImportItSelfInScala?has_content>
- <#list fields as field>
- <#list enumImportItSelfInScala as enum>
- <#if MapperUtil.isScalaCollection(field.type)>
- <#if enum == MapperUtil.getGenericParameter(field.type)>
-import ${enum}._
- #if>
- <#else >
- <#if enum == field.type>
-import ${enum}._
- #if>
- #if>
- #list>
- #list>
- #if>
-#if>
-
-<#if javaDoc?has_content>
-/**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-<#list annotations as annotation>
-@${annotation}
-#list>
-case class ${className}(
-<#if fields?has_content>
-<#list fields as field>
- <#if field.deprecated?has_content>
- @${field.deprecated.annotation}(message = "${field.deprecated.reason}")
- #if>
- <#list field.annotations as annotation>
- @${annotation}
- #list>
- ${field.name}: ${field.type}<#if field.defaultValue?has_content> = <#if MapperUtil.isScalaOption(field.type)><#if field.defaultValue != "null">Some(${field.defaultValue})<#else>None#if><#else>${field.defaultValue}#if>#if><#if field_has_next>,#if>
-#list>
-#if>
-) extends GraphQLParametrizedInput {
-
- override def deepCopy(): ${className} = {
- <#if fields?has_content>
- ${className}(
- <#list fields as field>
- this.${field.name}<#if field_has_next>,#if>
- #list>
- )
- <#else>
- ${className}()
- #if>
- }
-
- override def toString(): String = {<#--There is no Option[Seq[T]], Format is not supported in the generated code, so it is very difficult to write template for this format.-->
- <#if fields?has_content>
- scala.Seq(<#list fields as field><#assign getMethod = ".get"><#assign asJava = ".asJava">
- <#if MapperUtil.isScalaPrimitive(field.type)>"${field.originalName}: " + GraphQLRequestSerializer.getEntry(${field.name}<#if field.serializeUsingObjectMapper>, true#if>)<#if field_has_next>,#if><#elseif MapperUtil.isScalaOption(field.type)>if (${field.name}.isDefined) "${field.originalName}: " + GraphQLRequestSerializer.getEntry(${field.name}${getMethod}<#if field.serializeUsingObjectMapper>, true#if>) else ""<#if field_has_next>,#if><#else>if (${field.name} != null)<#if MapperUtil.isScalaCollection(field.type)> "${field.originalName}: " + GraphQLRequestSerializer.getEntry(${field.name}${asJava}<#if field.serializeUsingObjectMapper>, true#if>) else ""<#if field_has_next>,#if><#else> "${field.originalName}: " + GraphQLRequestSerializer.getEntry(${field.name}<#if field.serializeUsingObjectMapper>, true#if>) else ""<#if field_has_next>,#if>#if>#if>#list>
- ).filter(_ != "").mkString("(", ",", ")")<#--Copy it out and modify the code to one line after modification.-->
- <#else>
- "()"
- #if>
- }
-
-}
diff --git a/src/main/resources/templates/scala-lang/request.ftl b/src/main/resources/templates/scala-lang/request.ftl
deleted file mode 100644
index 3e3bc2568..000000000
--- a/src/main/resources/templates/scala-lang/request.ftl
+++ /dev/null
@@ -1,171 +0,0 @@
-<#assign MapperUtil=statics["com.kobylynskyi.graphql.codegen.scala.ScalaGraphQLTypeMapper"]>
-<#if package?has_content>
-package ${package}
-
-#if>
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest
-import java.util.{ LinkedHashMap => JLinkedHashMap }
-import java.util.{ Map => JMap, Set => JSet }
-<#if toString || equalsAndHashCode>
-import java.util.Objects
-#if>
-import scala.collection.mutable
-import scala.collection.JavaConverters._
-<#if fields?has_content>
- <#if enumImportItSelfInScala?has_content>
- <#list fields as field>
- <#list enumImportItSelfInScala as enum>
- <#if MapperUtil.isScalaCollection(field.type)>
- <#if enum == MapperUtil.getGenericParameter(field.type)>
-import ${enum}._
- #if>
- <#else >
- <#if enum == field.type>
-import ${enum}._
- #if>
- #if>
- #list>
- #list>
- #if>
-#if>
-
-<#if javaDoc?has_content>
-/**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-<#list annotations as annotation>
-@${annotation}
-#list>
-class ${className}(alias: String) extends GraphQLOperationRequest {
-
- <#--use Any be prepared for any contingency-->
- private final lazy val input = new JLinkedHashMap[String, java.lang.Object]()
- private final lazy val useObjectMapperForInputSerialization: mutable.Set[String] = mutable.Set()
-
-<#if fields?has_content>
-<#list fields as field>
-<#if field.javaDoc?has_content>
- /**
-<#list field.javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if field.deprecated?has_content>
- @${field.deprecated.annotation}(message = "${field.deprecated.reason}")
-#if>
- def set${field.name?replace("`", "")?cap_first}(${field.name}: ${field.type}): Unit = {
- <#if MapperUtil.isScalaPrimitive(field.type)>
- this.input.put("${field.originalName}", ${field.type}.box(${field.name}))
- <#else>
- this.input.put("${field.originalName}", ${field.name})
- #if>
- <#if field.serializeUsingObjectMapper>
- this.useObjectMapperForInputSerialization.add("${field.originalName}");
- #if>
- }
-
-#list>
-#if>
- override def getOperationType(): GraphQLOperation = ${className}.OPERATION_TYPE
-
- override def getOperationName(): String = ${className}.OPERATION_NAME
-
- override def getAlias(): String = if (alias != null) alias else ${className}.OPERATION_NAME
-
- override def getInput(): JMap[String, java.lang.Object] = input
-
- override def getUseObjectMapperForInputSerialization(): JSet[String] = useObjectMapperForInputSerialization.asJava
-<#if equalsAndHashCode>
-
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[${className}]
- Objects.equals(getOperationType(), that.getOperationType()) &&
- Objects.equals(getOperationName(), that.getOperationName()) &&
- Objects.equals(input, that.input)
- }
-
- override def hashCode(): Int = Objects.hash(getOperationType(), getOperationName(), input)
-#if>
-<#if toString>
-
- override def toString(): String = Objects.toString(input)
-#if>
-}
-
-object ${className} {
-
- final val OPERATION_NAME: String = "${operationName}"
- final val OPERATION_TYPE: GraphQLOperation = GraphQLOperation.${operationType}
-
- <#-- use apply create instance -->
- def apply(alias: String) = new ${className}(alias)
-
- def apply() = new ${className}(null)
-
- <#if builder>
-
- def builder(): Builder = new Builder()
-
- class Builder {
-
- private var $alias: String = _
- <#if fields?has_content>
- <#list fields as field>
- private var ${field.name}: ${field.type} = <#if field.defaultValue?has_content><#if MapperUtil.isScalaOption(field.type)><#if field.defaultValue!= "null">Some(${field.defaultValue})<#else>None#if><#else>${field.defaultValue}#if><#else>_#if>
- #list>
- #if>
-
- def alias(alias: String): Builder = {
- this.$alias = alias
- this
- }
-
- <#if fields?has_content>
- <#list fields as field>
- <#if field.javaDoc?has_content>
- /**
- <#list field.javaDoc as javaDocLine>
- * ${javaDocLine}
- #list>
- */
- #if>
- <#if field.deprecated?has_content>
- @${field.deprecated.annotation}(message = "${field.deprecated.reason}")
- #if>
- def set${field.name?replace("`", "")?cap_first}(${field.name}: ${field.type}): Builder = {
- this.${field.name} = ${field.name}
- this
- }
- #list>
- #if>
-
- def build(): ${className} = {
- val obj = new ${className}($alias)
- <#if fields?has_content>
- <#list fields as field>
- obj.set${field.name?replace("`", "")?cap_first}(${field.name})
- #list>
- #if>
- obj
- }
-
- }
- #if>
-}
diff --git a/src/main/resources/templates/scala-lang/response.ftl b/src/main/resources/templates/scala-lang/response.ftl
deleted file mode 100644
index 04f7332eb..000000000
--- a/src/main/resources/templates/scala-lang/response.ftl
+++ /dev/null
@@ -1,56 +0,0 @@
-<#assign MapperUtil=statics["com.kobylynskyi.graphql.codegen.scala.ScalaGraphQLTypeMapper"]>
-<#if package?has_content>
-package ${package}
-
-#if>
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResult
-import java.util.{ Map => JMap }
-
-<#if javaDoc?has_content>
-/**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-<#list annotations as annotation>
-@${annotation}
-#list>
-class ${className} extends GraphQLResult[JMap[String, ${returnTypeName}]] {
-
-<#if javaDoc?has_content>
- /**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if deprecated?has_content>
- @${deprecated.annotation}(message = "${deprecated.reason}")
-#if>
- def ${methodName}(): ${returnTypeName} = {
- val data: JMap[String, ${returnTypeName}] = getData
- <#if MapperUtil.isScalaOption(returnTypeName)>
- if (data != null) data.get(${className}.OPERATION_NAME) else None
- <#else>
- <#if MapperUtil.isScalaPrimitive(returnTypeName)>
- data.get(${className}.OPERATION_NAME)
- <#else>
- if (data != null) data.get(${className}.OPERATION_NAME) else null
- #if>
- #if>
- }
-
-}
-
-object ${className} {
-
- private final val OPERATION_NAME: String = "${operationName}"
-
-}
diff --git a/src/main/resources/templates/scala-lang/response_projection.ftl b/src/main/resources/templates/scala-lang/response_projection.ftl
deleted file mode 100644
index 666329688..000000000
--- a/src/main/resources/templates/scala-lang/response_projection.ftl
+++ /dev/null
@@ -1,126 +0,0 @@
-<#if package?has_content>
-package ${package}
-
-#if>
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseField
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseProjection
-<#if equalsAndHashCode>
-import java.util.Objects
-#if>
-<#if fields?has_content && generateAllMethodInProjection>
-import scala.collection.mutable.HashMap
-#if>
-import scala.collection.JavaConverters._
-
-<#if javaDoc?has_content>
-/**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-<#list annotations as annotation>
-@${annotation}
-#list>
-class ${className}() extends GraphQLResponseProjection() {
-
- def this(projection: ${className}) = {
- this()
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
-
- def this(projections: scala.Seq[${className}]) = {
- this()
- if (projections != null) {
- for (projection <- projections) {
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
- }
- }
-
-<#if fields?has_content && generateAllMethodInProjection>
- private final lazy val projectionDepthOnFields = new HashMap[String, Int]
-
- def all$(): ${className} = all$(${responseProjectionMaxDepth})
-
- def all$(maxDepth: Int): ${className} = {
- <#list fields as field>
- <#if field.type?has_content>
- if (projectionDepthOnFields.getOrElse("${className}.${field.type}.${field.methodName}", 0) <= maxDepth) {
- projectionDepthOnFields.put("${className}.${field.type}.${field.methodName}", projectionDepthOnFields.getOrElse("${className}.${field.type}.${field.methodName}", 0) + 1)
- this.${field.methodName}(new ${field.type}().all$(maxDepth - projectionDepthOnFields.getOrElse("${className}.${field.type}.${field.methodName}", 0)))
- }
- <#else>
- this.${field.methodName}()
- #if>
- #list>
- this
- }
-#if>
-
-<#if fields?has_content>
-<#list fields as field>
-<#if field.javaDoc?has_content>
- /**
-<#list field.javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if field.deprecated?has_content>
- @${field.deprecated.annotation}(message = "${field.deprecated.reason}")
-#if>
- def ${field.methodName}(<#if field.type?has_content>subProjection: ${field.type}#if>): ${className} = {
- ${field.methodName}(<#if field.parametrizedInputClassName?has_content>#if>null.asInstanceOf[String]<#if field.type?has_content>, subProjection#if>)
- }
-
- def ${field.methodName}(alias: String<#if field.type?has_content>, subProjection: ${field.type}#if>): ${className} = {
- add$(new GraphQLResponseField("${field.name}").alias(alias)<#if field.type?has_content>.projection(subProjection)#if>)
- this
- }
-
-<#if field.parametrizedInputClassName?has_content>
- def ${field.methodName}(input: ${field.parametrizedInputClassName}<#if field.type?has_content>,subProjection: ${field.type}#if>): ${className} = {
- ${field.methodName}(null.asInstanceOf[String], input<#if field.type?has_content>, subProjection#if>)
- }
-
- def ${field.methodName}(alias: String, input: ${field.parametrizedInputClassName} <#if field.type?has_content>, subProjection: ${field.type}#if>): ${className} = {
- add$(new GraphQLResponseField("${field.name}").alias(alias).parameters(input)<#if field.type?has_content>.projection(subProjection)#if>)
- this
- }
-
-#if>
-#list>
-#if>
- override def deepCopy$(): ${className} = new ${className}(this)
-
-<#if equalsAndHashCode>
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[${className}]
- Objects.equals(fields, that.fields)
- }
-
- override def hashCode(): Int = Objects.hash(fields)
-#if>
-
-}
diff --git a/src/main/resources/templates/scala-lang/type.ftl b/src/main/resources/templates/scala-lang/type.ftl
deleted file mode 100644
index 21eeab46d..000000000
--- a/src/main/resources/templates/scala-lang/type.ftl
+++ /dev/null
@@ -1,177 +0,0 @@
-<#assign MapperUtil=statics["com.kobylynskyi.graphql.codegen.scala.ScalaGraphQLTypeMapper"]>
-<#if package?has_content>
-package ${package}
-
-#if>
-<#if imports??>
-<#list imports as import>
-import ${import}.*
-#list>
-#if>
-<#if toStringForRequest>
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-#if>
-<#if generateModelOpenClasses && equalsAndHashCode>
-import java.util.Objects
-#if>
-import scala.collection.JavaConverters._
-<#assign duplicateEnumImports = [] />
-<#assign enumImports = [] />
-<#if fields?has_content>
- <#if enumImportItSelfInScala?has_content>
- <#list fields as field>
- <#list enumImportItSelfInScala as enum>
- <#if MapperUtil.isScalaCollection(field.type)>
- <#if enum == MapperUtil.getGenericParameter(field.type)>
- <#assign duplicateEnumImports = duplicateEnumImports + [enum] />
- #if>
- <#else >
- <#if enum == field.type>
- <#assign duplicateEnumImports = duplicateEnumImports + [enum] />
- #if>
- #if>
- #list>
- #list>
- #if>
-#if>
-<#if duplicateEnumImports?has_content>
- <#list duplicateEnumImports as duplicateEnumImport>
- <#if !enumImports?seq_contains(duplicateEnumImport)>
- <#assign enumImports = enumImports + [duplicateEnumImport]>
- #if>
- #list>
-#if>
-<#if enumImports?has_content>
- <#list enumImports as enumImport>
-import ${enumImport}._
- #list>
-#if>
-<#assign duplicateParentInterfaces = [] />
-<#assign parentInterfaces = [] />
-<#if fields?has_content>
- <#if parentInterfaceProperties?has_content>
- <#list implements as implement>
- <#list parentInterfaceProperties?keys as parentInterface>
- <#if implement == parentInterface>
- <#assign duplicateParentInterfaces = duplicateParentInterfaces + parentInterfaceProperties["${parentInterface}"] />
- <#else >
- #if>
- #list>
- #list>
- #if>
-#if>
-<#--duplicate removal-->
-<#if duplicateParentInterfaces?has_content>
- <#list duplicateParentInterfaces as duplicateParentInterface>
- <#if !parentInterfaces?seq_contains(duplicateParentInterface)>
- <#assign parentInterfaces = parentInterfaces + [duplicateParentInterface]>
- #if>
- #list>
-#if>
-
-<#if javaDoc?has_content>
-/**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-<#list annotations as annotation>
-@${annotation}
-#list>
-<#if !generateModelOpenClasses>case class<#else>class#if> ${className}(
-<#if fields?has_content>
-<#list fields as field>
- <#if field.deprecated?has_content>
- @${field.deprecated.annotation}(message = "${field.deprecated.reason}")
- #if>
-<#list field.annotations as annotation>
- @${annotation}
-#list>
- <#if parentInterfaces?has_content><#list parentInterfaces as parent><#if parent == field.name>override #if>#list>#if><#if !immutableModels>var <#elseif generateModelOpenClasses>val <#else><#if parentInterfaces?has_content><#list parentInterfaces as parent><#if parent == field.name>val #if>#list>#if>#if>${field.name}: ${field.type}<#if field.defaultValue?has_content> = <#if MapperUtil.isScalaOption(field.type)><#if field.defaultValue != "null">Some(${field.defaultValue})<#else>None#if><#else>${field.defaultValue}#if>#if><#if field_has_next>,#if>
-#list>
-#if>
-)<#if implements?has_content> extends <#list implements as interface>${interface}<#if interface_has_next> with #if>#list>#if> {
-
-<#if toString>
- override def toString(): String = {
- <#if fields?has_content><#-- When you modify it, copy it out and make sure it is one line after modification, There is no Option[Seq[T]]. -->
- scala.Seq(<#list fields as field><#assign getMethod = ""><#assign asJava = ""><#if MapperUtil.isScalaOption(field.type)><#assign getMethod = ".get">#if><#if MapperUtil.isScalaCollection(field.type)><#assign asJava = ".asJava">#if>
- <#if MapperUtil.isScalaPrimitive(field.type)><#if toStringForRequest>"${field.originalName}: " + GraphQLRequestSerializer.getEntry(${field.name}<#if field.serializeUsingObjectMapper>, true#if>)<#else>"${field.originalName}: " + ${field.name}#if><#else><#if MapperUtil.isScalaOption(field.type)>if (${field.name}.isDefined) <#else>if (${field.name} != null) #if><#if toStringForRequest>"${field.originalName}: " + GraphQLRequestSerializer.getEntry(${field.name}${getMethod}${asJava}<#if field.serializeUsingObjectMapper>, true#if>)<#else><#if field.type == "String"> "${field.originalName}: \"${field.name}\"" <#else> "${field.originalName}: ${field.name}"#if>#if> else ""#if><#if field_has_next>,#if>#list>
- ).filter(_ != "").mkString("{", ",", "}")
- <#else><#--Keep it on one line to make sure the code style remains the same-->
- "{}"
- #if>
- }
-#if>
-<#if generateModelOpenClasses && equalsAndHashCode>
-
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[${className}]
- <#if fields?has_content>
- <#list fields as field>
- Objects.equals(${field.name}, that.${field.name})<#if field_has_next> &&
- #if>#list>
- <#else>
- true#if>
- }
-
- override def hashCode(): Int = {
- <#if fields?has_content>
- Objects.hash(<#list fields as field>${field.name}<#if field_has_next>, #if>#list>)
- <#else>
- 0
- #if>
- }
-#if>
-}
-
-<#if builder>
-object ${className} {
-
- def builder(): ${className}.Builder = new Builder()
-
- class Builder {
-
-<#if fields?has_content>
- <#list fields as field>
- private var ${field.name}: ${field.type} = <#if field.defaultValue?has_content><#if MapperUtil.isScalaOption(field.type)><#if field.defaultValue!= "null">Some(${field.defaultValue})<#else>None#if><#else>${field.defaultValue}#if><#else>_#if>
- #list>
-#if>
-
-<#if fields?has_content>
- <#list fields as field>
- <#if field.javaDoc?has_content>
- /**
- <#list field.javaDoc as javaDocLine>
- * ${javaDocLine}
- #list>
- */
- #if>
- <#if field.deprecated?has_content>
- @${field.deprecated.annotation}(message = "${field.deprecated.reason}")
- #if>
- def set${field.name?replace("`", "")?cap_first}(${field.name}: ${field.type}): Builder = {
- this.${field.name} = ${field.name}
- this
- }
-
- #list>
-#if>
- def build(): ${className} = <#if generateModelOpenClasses>new ${className}<#else>${className}#if>(<#list fields as field>${field.name}<#if field_has_next>, #if>#list>)
-
- }
-}
-#if>
diff --git a/src/main/resources/templates/scala-lang/union.ftl b/src/main/resources/templates/scala-lang/union.ftl
deleted file mode 100644
index 0dbd77087..000000000
--- a/src/main/resources/templates/scala-lang/union.ftl
+++ /dev/null
@@ -1,24 +0,0 @@
-<#if package?has_content>
-package ${package}
-
-#if>
-
-<#if javaDoc?has_content>
-/**
-<#list javaDoc as javaDocLine>
- * ${javaDocLine}
-#list>
- */
-#if>
-<#if generatedAnnotation && generatedInfo.getGeneratedType()?has_content>
-@${generatedInfo.getGeneratedType()}(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "${generatedInfo.getDateTime()}"
-)
-#if>
-<#list annotations as annotation>
-@${annotation}
-#list>
-<#if generateSealedInterfaces>sealed #if>trait ${className} {
-
-}
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenEmptyTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenEmptyTest.java
index 34bbe65b7..1e3503600 100644
--- a/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenEmptyTest.java
+++ b/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenEmptyTest.java
@@ -2,9 +2,9 @@
import com.kobylynskyi.graphql.codegen.TestUtils;
import com.kobylynskyi.graphql.codegen.java.JavaGraphQLCodegen;
+import com.kobylynskyi.graphql.codegen.kotlin.KotlinGraphQLCodegen;
import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.scala.ScalaGraphQLCodegen;
import com.kobylynskyi.graphql.codegen.supplier.SchemaFinder;
import com.kobylynskyi.graphql.codegen.utils.Utils;
import org.junit.jupiter.api.AfterEach;
@@ -44,7 +44,7 @@ void cleanup() {
@Test
void generateServerSideClasses() throws Exception {
- new ScalaGraphQLCodegen(schemaFinder.findSchemas(), outputBuildDir, mappingConfig,
+ new KotlinGraphQLCodegen(schemaFinder.findSchemas(), outputBuildDir, mappingConfig,
TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenInitializeNullableTypesTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenInitializeNullableTypesTest.java
index 665f8fc3d..07114bff3 100644
--- a/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenInitializeNullableTypesTest.java
+++ b/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenInitializeNullableTypesTest.java
@@ -21,7 +21,7 @@
class GraphQLCodegenInitializeNullableTypesTest {
private final File outputBuildDir = new File("build/generated");
- private final File outputScalaClassesDir = new File("build/generated/com/github/graphql");
+ private final File outputKotlinClassesDir = new File("build/generated/com/github/graphql");
private final MappingConfig mappingConfig = new MappingConfig();
@BeforeEach
@@ -46,7 +46,7 @@ void cleanup() {
void generate_InitializeNullableTypes() throws Exception {
new KotlinGraphQLCodegen(singletonList("src/test/resources/schemas/github.graphqls"),
outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
+ File[] files = Objects.requireNonNull(outputKotlinClassesDir.listFiles());
assertSameTrimmedContent(
new File("src/test/resources/expected-classes/kt/Commit_initialize_nullable_types.kt.txt"),
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenOpenclassesTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenOpenclassesTest.java
index cdb64e6e5..800db39bd 100644
--- a/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenOpenclassesTest.java
+++ b/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenOpenclassesTest.java
@@ -21,7 +21,7 @@
class GraphQLCodegenOpenclassesTest {
private final File outputBuildDir = new File("build/generated");
- private final File outputScalaClassesDir = new File("build/generated/com/github/graphql");
+ private final File outputKotlinClassesDir = new File("build/generated/com/github/graphql");
private final MappingConfig mappingConfig = new MappingConfig();
@BeforeEach
@@ -46,7 +46,7 @@ void cleanup() {
void generate_MultipleInterfacesPerType() throws Exception {
new KotlinGraphQLCodegen(singletonList("src/test/resources/schemas/github.graphqls"),
outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
+ File[] files = Objects.requireNonNull(outputKotlinClassesDir.listFiles());
assertSameTrimmedContent(new File("src/test/resources/expected-classes/kt/Commit_no_final_class.kt.txt"),
getFileByName(files, "Commit.kt"));
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenSealedInterfacesTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenSealedInterfacesTest.java
index 6769239b4..c2d8b4541 100644
--- a/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenSealedInterfacesTest.java
+++ b/src/test/java/com/kobylynskyi/graphql/codegen/kotlin/GraphQLCodegenSealedInterfacesTest.java
@@ -20,7 +20,7 @@
@ExtendWith(MaxQueryTokensExtension.class)
class GraphQLCodegenSealedInterfacesTest {
private final File outputBuildDir = new File("build/generated");
- private final File outputScalaClassesDir = new File("build/generated/com/github/graphql");
+ private final File outputKotlinClassesDir = new File("build/generated/com/github/graphql");
private final MappingConfig mappingConfig = new MappingConfig();
@BeforeEach
@@ -45,7 +45,7 @@ void cleanup() {
void generate_MultipleInterfacesPerType() throws Exception {
new KotlinGraphQLCodegen(singletonList("src/test/resources/schemas/github.graphqls"),
outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
+ File[] files = Objects.requireNonNull(outputKotlinClassesDir.listFiles());
assertSameTrimmedContent(new File("src/test/resources/expected-classes/kt/Comment_sealed_interfaces.kt.txt"),
getFileByName(files, "Comment.kt"));
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/model/graphql/GraphQLRequestSerializerScalaTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/model/graphql/GraphQLRequestSerializerScalaTest.java
deleted file mode 100644
index 018f2d918..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/model/graphql/GraphQLRequestSerializerScalaTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.kobylynskyi.graphql.codegen.model.graphql;
-
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
-
-class GraphQLRequestSerializerScalaTest {
-
- //Original method cannot test in Java
- public static String getEntry(Object input) {
- if (input.getClass().getSimpleName().equals("Some")) {
- return input.toString().replace("Some(", "").replace(")", "");
- } else if (input.getClass().getSimpleName().equals("None$")) {
- return null;
- }
- return input.toString();
- }
-
- @Test
- void scalaOptionToString() {
- assertEquals("1", getEntry(new Some()));
- assertNull(getEntry(new None$()));
- }
-
- interface Option {
- }
-
- static class Some implements Option {
- @Override
- public String toString() {
- return "Some(1)";
- }
- }
-
- static class None$ implements Option {
- @Override
- public String toString() {
- return "None";
- }
- }
-}
\ No newline at end of file
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenAnnotationsTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenAnnotationsTest.java
deleted file mode 100644
index c8c1e1d11..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenAnnotationsTest.java
+++ /dev/null
@@ -1,195 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.MaxQueryTokensExtension;
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertFileContainsElements;
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static com.kobylynskyi.graphql.codegen.TestUtils.getFileByName;
-import static java.util.Collections.singletonList;
-import static java.util.Collections.singletonMap;
-
-@ExtendWith(MaxQueryTokensExtension.class)
-class GraphQLCodegenAnnotationsTest {
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputJavaClassesDir = new File("build/generated/com/kobylynskyi/graphql/test1");
-
- private MappingConfig mappingConfig;
-
- @BeforeEach
- void init() {
- mappingConfig = new MappingConfig();
- mappingConfig.setPackageName("com.kobylynskyi.graphql.test1");
- mappingConfig.setGenerateParameterizedFieldsResolvers(false);
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_CustomAnnotationMappings() throws Exception {
- mappingConfig.setCustomTypesMapping(singletonMap("Event.createdDateTime", "org.joda.time.DateTime"));
- mappingConfig.setCustomAnnotationsMapping(singletonMap("Event.createdDateTime",
- singletonList(
- "@com.fasterxml.jackson.databind" +
- ".annotation.JsonDeserialize(using =" +
- " classOf[com.example.json" +
- ".DateTimeScalarDeserializer])")));
-
- generate("src/test/resources/schemas/test.graphqls");
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- assertFileContainsElements(files, "Event.scala",
- " @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = ",
- "classOf[com.example.json.DateTimeScalarDeserializer])",
- " createdDateTime: org.joda.time.DateTime,");
- }
-
- @Test
- void generate_CustomAnnotationMappings_Class() throws Exception {
- Map> customAnnotationsMapping = new HashMap<>();
- // input
- customAnnotationsMapping.put("AcceptTopicSuggestionInput", singletonList(
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = " +
- "classOf[AcceptTopicSuggestionInputDeserializer])"));
- // type
- customAnnotationsMapping.put("AcceptTopicSuggestionPayload", singletonList(
- "com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = " +
- "classOf[AcceptTopicSuggestionPayloadDeserializer])"));
- // interface
- customAnnotationsMapping.put("Actor", singletonList(
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = classOf[ActorDeserializer])"));
- // union
- customAnnotationsMapping.put("Assignee", singletonList(
- "com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = classOf[AssigneeDeserializer])"));
- // enum
- customAnnotationsMapping.put("DeploymentOrderField", singletonList(
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = " +
- "classOf[DeploymentOrderFieldDeserializer])"));
- mappingConfig.setCustomAnnotationsMapping(customAnnotationsMapping);
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- assertFileContainsElements(files, "AcceptTopicSuggestionInput.scala",
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = ",
- "classOf[AcceptTopicSuggestionInputDeserializer])",
- "case class AcceptTopicSuggestionInput");
- assertFileContainsElements(files, "AcceptTopicSuggestionPayload.scala",
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = ",
- "classOf[AcceptTopicSuggestionPayloadDeserializer])",
- "case class AcceptTopicSuggestionPayload");
- assertFileContainsElements(files, "Actor.scala",
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = ",
- "classOf[ActorDeserializer])",
- "trait Actor");
- assertFileContainsElements(files, "Assignee.scala",
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = ",
- "classOf[AssigneeDeserializer])",
- "trait Assignee");
- assertFileContainsElements(files, "DeploymentOrderField.scala",
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = ",
- "classOf[DeploymentOrderFieldDeserializer])",
- "object DeploymentOrderField extends Enumeration");
- }
-
- @Test
- void generate_CustomAnnotationMappings_Multiple() throws Exception {
- Map> customAnnotationsMapping = new HashMap<>();
- // type
- customAnnotationsMapping.put("AcceptTopicSuggestionPayload", Arrays.asList(
- "@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id"
- + ".NAME, property = \"__typename\")",
- "@com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver(classOf[io.github.kobylynskyi.order"
- + ".external.starwars.AcceptTopicSuggestionPayloadTypeResolver])"));
- mappingConfig.setCustomAnnotationsMapping(customAnnotationsMapping);
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- assertFileContainsElements(files, "AcceptTopicSuggestionPayload.scala",
- "@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson",
- ".annotation.JsonTypeInfo.Id.NAME, property = \"__typename\")",
- "@com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver(classOf[io.github",
- ".kobylynskyi.order.external.starwars.AcceptTopicSuggestionPayloadTypeResolver])",
- "case class AcceptTopicSuggestionPayload");
- }
-
- @Test
- void generate_CustomAnnotationMappings_RequestResponseClasses() throws Exception {
- Map> customAnnotationsMapping = new HashMap<>();
- // request
- customAnnotationsMapping.put("CodeOfConductQueryRequest", singletonList(
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = " +
- "classOf[CodeOfConductQueryRequestDeserializer])"));
- // response
- customAnnotationsMapping.put("CodeOfConductQueryResponse", singletonList(
- "com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = " +
- "classOf[CodeOfConductQueryResponseDeserializer])"));
- mappingConfig.setCustomAnnotationsMapping(customAnnotationsMapping);
- mappingConfig.setGenerateClient(true);
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- assertFileContainsElements(files, "CodeOfConductQueryRequest.scala",
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = ",
- "classOf[CodeOfConductQueryRequestDeserializer])",
- "class CodeOfConductQueryRequest");
- assertFileContainsElements(files, "CodeOfConductQueryResponse.scala",
- "@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = ",
- "classOf[CodeOfConductQueryResponseDeserializer])",
- "class CodeOfConductQueryResponse extends GraphQLResult[JMap[String, CodeOfConduct]]");
- }
-
- @Test
- void generate_Directives() throws Exception {
- Map> directiveAnnotationsMapping = new HashMap<>();
- directiveAnnotationsMapping.put("auth",
- singletonList(
- "@com.example.CustomAnnotation(roles={{roles?toArray}}, " +
- "boo={{boo?toArray}}, float={{float?toArrayOfStrings}}, int={{int}}, " +
- "n={{n?toString}})"));
- directiveAnnotationsMapping.put("relationship",
- singletonList("@com.example.Relationship(type = {{type}}, direction = {{direction}})"));
- mappingConfig.setDirectiveAnnotationsMapping(directiveAnnotationsMapping);
-
- generate("src/test/resources/schemas/test.graphqls");
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/annotation/CreateEventMutationResolver.scala.txt"),
- getFileByName(files, "CreateEventMutationResolver.scala"));
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/annotation/MutationResolver.scala.txt"),
- getFileByName(files, "MutationResolver.scala"));
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/annotation/User.scala.txt"),
- getFileByName(files, "User.scala"));
- }
-
- private void generate(String path) throws IOException {
- new ScalaGraphQLCodegen(singletonList(path), outputBuildDir, mappingConfig,
- TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- }
-
-}
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenApiReturnTypeTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenApiReturnTypeTest.java
deleted file mode 100644
index 70d054216..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenApiReturnTypeTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertFileContainsElements;
-import static java.util.Collections.singletonList;
-
-class GraphQLCodegenApiReturnTypeTest {
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputJavaClassesDir = new File("build/generated/com/kobylynskyi/graphql/test1");
-
- private MappingConfig mappingConfig;
-
- @BeforeEach
- void init() {
- mappingConfig = new MappingConfig();
- mappingConfig.setPackageName("com.kobylynskyi.graphql.test1");
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_ApiReturnType_WithPlaceHolder() throws Exception {
- mappingConfig.setApiReturnType(
- "java.util.concurrent.CompletionStage[graphql.execution.DataFetcherResult[{{TYPE}}]]"
- );
-
- generate("src/test/resources/schemas/test.graphqls");
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- String childRequireText = getChildFunction(
- "java.util.concurrent.CompletionStage[graphql.execution.DataFetcherResult[scala.Seq[EventProperty]]]"
- );
- assertFileContainsElements(
- files,
- "EventPropertyResolver.scala",
- childRequireText
- );
-
- String parentRequireText = getParentFunction(
- "java.util.concurrent.CompletionStage[graphql.execution.DataFetcherResult[Event]]"
- );
- assertFileContainsElements(
- files,
- "EventPropertyResolver.scala",
- parentRequireText
- );
- }
-
- @Test
- void generate_ApiReturnType_And_ApiReturnListType_WithPlaceHolder() throws Exception {
- mappingConfig.setApiReturnType(
- "java.util.concurrent.CompletionStage[graphql.execution.DataFetcherResult[{{TYPE}}]]"
- );
- mappingConfig.setApiReturnListType(
- "reactor.core.publisher.Mono[graphql.execution.DataFetcherResult[{{TYPE}}]]"
- );
-
- generate("src/test/resources/schemas/test.graphqls");
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertFileContainsElements(
- files,
- "EventPropertyResolver.scala",
- getChildFunction(
- "reactor.core.publisher.Mono[graphql.execution.DataFetcherResult[EventProperty]]"
- )
- );
-
- assertFileContainsElements(
- files,
- "EventPropertyResolver.scala",
- getParentFunction(
- "java.util.concurrent.CompletionStage[graphql.execution.DataFetcherResult[Event]]"
- )
- );
- }
-
- private String getChildFunction(String returnType) {
- return "def child(eventProperty: EventProperty, first: scala.Option[Int], last: scala.Option[Int])" +
- ": " + returnType;
- }
-
- private String getParentFunction(String returnType) {
- return "def parent(eventProperty: EventProperty, withStatus: EventStatus, createdAfter: String)" +
- ": " + returnType;
- }
-
- private void generate(String path) throws IOException {
- new ScalaGraphQLCodegen(singletonList(path), outputBuildDir, mappingConfig,
- TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- }
-
-}
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenCustomScalarMappingTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenCustomScalarMappingTest.java
deleted file mode 100644
index b856135fe..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenCustomScalarMappingTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static com.kobylynskyi.graphql.codegen.TestUtils.getFileByName;
-import static java.util.Collections.singleton;
-import static java.util.Collections.singletonList;
-import static java.util.Collections.singletonMap;
-
-class GraphQLCodegenCustomScalarMappingTest {
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputJavaClassesDir = new File("build/generated/com/kobylynskyi/graphql/test1");
-
- private MappingConfig mappingConfig;
-
- @BeforeEach
- void init() {
- mappingConfig = new MappingConfig();
- mappingConfig.setPackageName("com.kobylynskyi.graphql.test1");
- mappingConfig.setGenerateClient(true);
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
-
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_CustomTypeMapping_WholeScalar() throws Exception {
- mappingConfig.setCustomTypesMapping(singletonMap("ZonedDateTime", "String"));
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/custom-type/" +
- "QueryINeedQueryRequest_whole_scalar.scala.txt"),
- getFileByName(files, "QueryINeedQueryRequest.scala"));
- }
-
- @Test
- void generate_CustomTypeMapping_ScalarOnQueryOnly() throws Exception {
- HashMap customTypesMapping = new HashMap<>();
- customTypesMapping.put("queryINeed.input", "String");
- customTypesMapping.put("ZonedDateTime", "java.time.ZonedDateTime");
- mappingConfig.setCustomTypesMapping(customTypesMapping);
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/custom-type/QueryINeedQueryRequest.scala.txt"),
- getFileByName(files, "QueryINeedQueryRequest.scala"));
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/custom-type/ResponseContainingDate.scala.txt"),
- getFileByName(files, "ResponseContainingDate.scala"));
- }
-
- @Test
- void generate_UseObjectMapperToSerializeFields_Parameter() throws Exception {
- HashMap customTypesMapping = new HashMap<>();
- customTypesMapping.put("queryINeed.input", "ZonedDateTime");
- customTypesMapping.put("ZonedDateTime", "java.time.ZonedDateTime");
- mappingConfig.setCustomTypesMapping(customTypesMapping);
- mappingConfig.setUseObjectMapperForRequestSerialization(singleton("ZonedDateTime"));
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/" +
- "QueryINeedQueryRequest_custom_serializer.scala.txt"),
- getFileByName(files, "QueryINeedQueryRequest.scala"));
- }
-
- private void generate() throws IOException {
- new ScalaGraphQLCodegen(singletonList("src/test/resources/schemas/date-scalar.graphqls"),
- outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- }
-}
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenDeprecatedTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenDeprecatedTest.java
deleted file mode 100644
index 7a427e1b9..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenDeprecatedTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static java.util.stream.Collectors.toList;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-class GraphQLCodegenDeprecatedTest {
-
- private final MappingConfig mappingConfig = new MappingConfig();
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputJavaClassesDir = new File("build/generated/com/github/graphql");
-
- @BeforeEach
- void init() {
- mappingConfig.setGenerateParameterizedFieldsResolvers(false);
- mappingConfig.setPackageName("com.github.graphql");
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_deprecated() throws Exception {
- new ScalaGraphQLCodegen(Collections.singletonList("src/test/resources/schemas/deprecated-with-msg.graphqls"),
- outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- List generatedFileNames = Arrays.stream(files).map(File::getName).sorted().collect(toList());
- assertEquals(Arrays.asList("CreateEventMutationResolver.scala", "Event.scala", "EventInput.scala",
- "EventsQueryResolver.scala",
- "MutationResolver.scala", "Node.scala", "PinnableItem.scala", "QueryResolver.scala",
- "Status.scala"), generatedFileNames);
-
- for (File file : files) {
- assertSameTrimmedContent(
- new File(String.format("src/test/resources/expected-classes/scala/deprecated/%s.txt",
- file.getName())),
- file);
- }
- }
-}
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenEmptyTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenEmptyTest.java
deleted file mode 100644
index c76ac12b0..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenEmptyTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.java.JavaGraphQLCodegen;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.supplier.SchemaFinder;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.Set;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static com.kobylynskyi.graphql.codegen.TestUtils.getFileByName;
-import static java.util.Arrays.asList;
-import static java.util.stream.Collectors.toSet;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-class GraphQLCodegenEmptyTest {
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputJavaClassesDir = new File("build/generated");
- private final MappingConfig mappingConfig = new MappingConfig();
- private final SchemaFinder schemaFinder = new SchemaFinder(Paths.get("src/test/resources"));
-
- @BeforeEach
- void init() {
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- schemaFinder.setIncludePattern("empty-types.graphqls");
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generateServerSideClasses() throws Exception {
- new ScalaGraphQLCodegen(schemaFinder.findSchemas(), outputBuildDir, mappingConfig,
- TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- Set generatedFileNames = Arrays.stream(files).map(File::getName).collect(toSet());
- assertEquals(new HashSet<>(asList("Node.scala", "Event.scala", "MutationResolver.scala",
- "EventInput.scala", "QueryResolver.scala", "Status.scala",
- "PinnableItem.scala")),
- generatedFileNames);
-
- for (File file : files) {
- assertSameTrimmedContent(
- new File(String.format("src/test/resources/expected-classes/scala/empty/%s.txt", file.getName())),
- file);
- }
- }
-
- @Test
- void generateClientSideClasses() throws Exception {
- mappingConfig.setGenerateApis(false);
- mappingConfig.setGenerateClient(true);
-
- new JavaGraphQLCodegen(schemaFinder.findSchemas(), outputBuildDir, mappingConfig,
- TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/empty/EventResponseProjection.scala.txt"),
- getFileByName(files, "EventResponseProjection.scala"));
- }
-
-}
\ No newline at end of file
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenExtendTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenExtendTest.java
deleted file mode 100644
index 26bc33075..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenExtendTest.java
+++ /dev/null
@@ -1,272 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.supplier.SchemaFinder;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static com.kobylynskyi.graphql.codegen.TestUtils.getFileByName;
-import static java.util.Arrays.asList;
-import static java.util.stream.Collectors.toSet;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-class GraphQLCodegenExtendTest {
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputJavaClassesDir = new File("build/generated");
- private final MappingConfig mappingConfig = new MappingConfig();
- private final SchemaFinder schemaFinder = new SchemaFinder(Paths.get("src/test/resources"));
-
- @BeforeEach
- void init() {
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- schemaFinder.setIncludePattern("extend.*\\.graphqls");
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generateServerSideClasses() throws Exception {
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- Set generatedFileNames = Arrays.stream(files).map(File::getName).collect(toSet());
- assertEquals(new HashSet<>(asList("MutationResolver.scala", "QueryResolver.scala",
- "EventsQueryResolver.scala", "AssetsQueryResolver.scala",
- "CreateEventMutationResolver.scala", "CreateAssetMutationResolver.scala",
- "Event.scala", "Asset.scala", "EventInput.scala", "AssetInput.scala",
- "Node.scala", "Status.scala", "PinnableItem.scala")), generatedFileNames);
-
- for (File file : files) {
- assertSameTrimmedContent(
- new File(String.format("src/test/resources/expected-classes/scala/extend/%s.txt", file.getName())),
- file);
- }
- }
-
- @Test
- void generateServerSideClasses_ExtensionFieldsResolvers_WithExclusions() throws Exception {
- mappingConfig.setGenerateExtensionFieldsResolvers(true);
- mappingConfig.setFieldsWithoutResolvers(new HashSet<>(asList("Node", "Event.assets")));
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- Set generatedFileNames = Arrays.stream(files).map(File::getName).collect(toSet());
- assertEquals(new HashSet<>(asList("MutationResolver.scala", "QueryResolver.scala",
- "EventsQueryResolver.scala", "AssetsQueryResolver.scala",
- "CreateEventMutationResolver.scala", "CreateAssetMutationResolver.scala",
- "Event.scala", "Asset.scala", "EventInput.scala", "AssetInput.scala",
- "Node.scala", "Status.scala", "PinnableItem.scala")), generatedFileNames);
-
- for (File file : files) {
- assertSameTrimmedContent(
- new File(String.format("src/test/resources/expected-classes/scala/extend/%s.txt", file.getName())),
- file);
- }
-
- }
-
- @Test
- void generateServerSideClasses_EmptyTypes() throws Exception {
- schemaFinder.setIncludePattern("empty-types-with-extend\\.graphqls");
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- Set generatedFileNames = Arrays.stream(files).map(File::getName).collect(toSet());
- assertEquals(new HashSet<>(asList("MutationResolver.scala", "QueryResolver.scala",
- "EventsQueryResolver.scala", "AssetsQueryResolver.scala",
- "CreateEventMutationResolver.scala", "CreateAssetMutationResolver.scala",
- "Event.scala", "Asset.scala", "EventInput.scala", "AssetInput.scala",
- "Node.scala", "Status.scala", "PinnableItem.scala")), generatedFileNames);
-
- for (File file : files) {
- assertSameTrimmedContent(
- new File(String.format("src/test/resources/expected-classes/scala/extend/%s.txt", file.getName())),
- file);
- }
- }
-
- @Test
- void generateClientSideClasses() throws Exception {
- mappingConfig.setGenerateApis(false);
- mappingConfig.setGenerateClient(true);
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/request/EventResponseProjection.scala.txt"),
- getFileByName(files, "EventResponseProjection.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/request/AssetResponseProjection.scala.txt"),
- getFileByName(files, "AssetResponseProjection.scala"));
- }
-
- @Test
- void generatePrimitiveTypesResponseResolverClasses() throws Exception {
- mappingConfig.setGenerateApis(true);
- mappingConfig.setGenerateClient(true);
- schemaFinder.setIncludePattern("null-extend1.graphqls");
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/resolver/" +
- "SimpleEventCountsQueryResponse.scala.txt"),
- getFileByName(files, "SimpleEventCountsQueryResponse.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/resolver/" +
- "SimpleEventCountsQueryResolver.scala.txt"),
- getFileByName(files, "SimpleEventCountsQueryResolver.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/resolver/" +
- "SimpleEventCountQueryResolver.scala.txt"),
- getFileByName(files, "SimpleEventCountQueryResolver.scala"));
-
- assertSameTrimmedContent(
- new File(
- "src/test/resources/expected-classes/scala/extend/resolver/" +
- "SimpleEventCountQueryResponse.scala.txt"),
- getFileByName(files, "SimpleEventCountQueryResponse.scala"));
- }
-
- @Test
- void generatePrimitiveTypesResponseResolverClasses_With_SetUseOptionalForNullableReturnTypes() throws Exception {
- mappingConfig.setGenerateApis(true);
- mappingConfig.setGenerateClient(true);
- //Therefore, when the return type is a primitive type, the return option is automatically turned on, and this
- // is mandatory.
- mappingConfig.setUseOptionalForNullableReturnTypes(true);
- schemaFinder.setIncludePattern("null-extend2.graphqls");
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResolver.scala.txt"),
- getFileByName(files, "SimplesQueryResolver.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResponse.scala.txt"),
- getFileByName(files, "SimplesQueryResponse.scala"));
- }
-
- @Test
- void generatePrimitiveTypesResponseResolverClasses_Without_SetUseOptionalForNullableReturnTypes() throws Exception {
- mappingConfig.setGenerateApis(true);
- mappingConfig.setGenerateClient(true);
- mappingConfig.setUseOptionalForNullableReturnTypes(false);
- schemaFinder.setIncludePattern("null-extend2.graphqls");
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- //Therefore, when the return type is a primitive type, the return option is automatically turned on, and this
- // is mandatory.
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullreturn/" +
- "SimpleEventCountQueryResolver.scala.txt"),
- getFileByName(files, "SimpleEventCountQueryResolver.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullreturn/" +
- "SimpleEventCountsQueryResolver.scala.txt"),
- getFileByName(files, "SimpleEventCountsQueryResolver.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullreturn/" +
- "SimplesQueryResolver_without_option.scala.txt"),
- getFileByName(files, "SimplesQueryResolver.scala"));
- }
-
- @Test
- void generatePrimitiveTypesResponseResolverClasses_nullable() throws Exception {
- mappingConfig.setGenerateApis(true);
- mappingConfig.setGenerateClient(true);
- mappingConfig.setUseOptionalForNullableReturnTypes(true);
- schemaFinder.setIncludePattern("null-extend3.graphqls");
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullable/Event.scala.txt"),
- getFileByName(files, "Event.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullable/Null1QueryQueryResolver.scala.txt"),
- getFileByName(files, "Null1QueryQueryResolver.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullable/Null2QueryQueryResolver.scala.txt"),
- getFileByName(files, "Null2QueryQueryResolver.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullable/Null3QueryQueryResolver.scala.txt"),
- getFileByName(files, "Null3QueryQueryResolver.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/extend/nullable/QueryResolver.scala.txt"),
- getFileByName(files, "QueryResolver.scala"));
- }
-
- /**
- * Verify Int! to override Int in graphql.
- * In scala, Int type cannot be null, So, option Int is Option[Int]. Can not override from Option[Int] to Int.
- */
- @Test
- void generate_OptionalFieldInInterfaceAndMandatoryInType() throws Exception {
- mappingConfig.setGenerateBuilder(true);
- mappingConfig.setGenerateToString(true);
- mappingConfig.setGenerateEqualsAndHashCode(true);
- Map maps = new HashMap<>();
- maps.put("Int", "Int"); // Now, That's the only way to do it.
- mappingConfig.setCustomTypesMapping(maps);
- schemaFinder.setIncludePattern("optional-vs-mandatory-types.graphqls");
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/optional/InterfaceWithOptionalField.scala.txt"),
- getFileByName(files, "InterfaceWithOptionalField.scala"));
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/optional/TypeWithMandatoryField.scala.txt"),
- getFileByName(files, "TypeWithMandatoryField.scala"));
- }
-
- private void generate() throws IOException {
- new ScalaGraphQLCodegen(schemaFinder.findSchemas(), outputBuildDir, mappingConfig,
- TestUtils.getStaticGeneratedInfo(mappingConfig))
- .generate();
- }
-}
\ No newline at end of file
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenGitHubTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenGitHubTest.java
deleted file mode 100644
index db7b73e00..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenGitHubTest.java
+++ /dev/null
@@ -1,213 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.MaxQueryTokensExtension;
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.hamcrest.core.StringContains;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static com.kobylynskyi.graphql.codegen.TestUtils.getFileByName;
-import static java.util.Collections.singletonList;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-@ExtendWith(MaxQueryTokensExtension.class)
-class GraphQLCodegenGitHubTest {
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputScalaClassesDir = new File("build/generated/com/github/graphql");
- private final MappingConfig mappingConfig = new MappingConfig();
-
- private static String getFileContent(File[] files, String fileName) throws IOException {
- return Utils.getFileContent(getFileByName(files, fileName).getPath());
- }
-
- @BeforeEach
- void init() {
- mappingConfig.setGenerateParameterizedFieldsResolvers(false);
- mappingConfig.setPackageName("com.github.graphql");
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- mappingConfig.setGenerateToString(true);
- mappingConfig.setGenerateApis(true);
- mappingConfig.setGenerateClient(true);
- mappingConfig.setGenerateEqualsAndHashCode(true);
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_MultipleInterfacesPerType() throws Exception {
- mappingConfig.putCustomTypeMappingIfAbsent("Int!", "Int");
- mappingConfig.putCustomTypeMappingIfAbsent("Boolean!", "Boolean");
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
-
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/Commit.scala.txt"),
- getFileByName(files, "Commit.scala"));
-
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/ProfileOwner.scala.txt"),
- getFileByName(files, "ProfileOwner.scala"));
- }
-
- @Test
- void generate_ClassNameWithSuffix_Prefix() throws Exception {
- mappingConfig.setModelNamePrefix("Github");
- mappingConfig.setModelNameSuffix("TO");
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
-
- // verify proper class name for GraphQL interface
- assertThat(getFileContent(files, "GithubActorTO.scala"),
- StringContains.containsString("trait GithubActorTO "));
-
- // verify proper class name for GraphQL enum
- assertThat(getFileContent(files, "GithubIssueStateTO.scala"),
- StringContains.containsString("object GithubIssueStateTO "));
-
- // verify proper class name for GraphQL union
- assertThat(getFileContent(files, "GithubAssigneeTO.scala"),
- StringContains.containsString("trait GithubAssigneeTO "));
-
- // verify proper class name for GraphQL input
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/GithubAcceptTopicSuggestionInputTO.scala.txt"),
- getFileByName(files, "GithubAcceptTopicSuggestionInputTO.scala"));
-
- // verify proper class name for GraphQL type and references to interfaces/types/unions for GraphQL type
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/GithubCommitTO.scala.txt"),
- getFileByName(files, "GithubCommitTO.scala"));
- }
-
- @Test
- void generate_NoValidationAnnotation() throws Exception {
- mappingConfig.setModelValidationAnnotation("");
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File commitFile = getFileByName(Objects.requireNonNull(outputScalaClassesDir.listFiles()), "Commit.scala");
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/Commit_noValidationAnnotation.scala.txt"),
- commitFile);
- }
-
- @Test
- void generate_Client_ConditionalFragments() throws Exception {
- mappingConfig.setGenerateClient(true);
- mappingConfig.setGenerateApis(false);
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
- assertSameTrimmedContent(new File(
- "src/test/resources/expected-classes/scala" +
- "/SearchResultItemConnectionResponseProjection.scala.txt"),
- getFileByName(files, "SearchResultItemConnectionResponseProjection.scala"));
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/SearchResultItemResponseProjection.scala.txt"),
- getFileByName(files, "SearchResultItemResponseProjection.scala"));
- }
-
- @Test
- void generate_NoPrimitives() throws Exception {
- mappingConfig.putCustomTypeMappingIfAbsent("Int!", "Integer");
- mappingConfig.putCustomTypeMappingIfAbsent("Float!", "java.lang.Double");
- mappingConfig.putCustomTypeMappingIfAbsent("Boolean!", "java.lang.Boolean");
- mappingConfig.setUseOptionalForNullableReturnTypes(true);
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/Commit_withoutPrimitives.scala.txt"),
- getFileByName(files, "Commit.scala"));
- }
-
- @Test
- void generate_Primitives() throws Exception {
- mappingConfig.putCustomTypeMappingIfAbsent("Int!", "Int");
- mappingConfig.putCustomTypeMappingIfAbsent("Float!", "Double");
- mappingConfig.putCustomTypeMappingIfAbsent("Boolean!", "Boolean");
- mappingConfig.setUseOptionalForNullableReturnTypes(true);
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/Commit_withPrimitives.scala.txt"),
- getFileByName(files, "Commit.scala"));
- }
-
- @Test
- void generate_ResponseWithPrimitiveType() throws Exception {
- mappingConfig.putCustomTypeMappingIfAbsent("Int!", "Int");
- mappingConfig.putCustomTypeMappingIfAbsent("Int", "Int");
-
- generate("src/test/resources/schemas/primitive-query-response-type.graphqls");
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/VersionQueryResponse_int.scala.txt"),
- getFileByName(files, "VersionQueryResponse.scala"));
- }
-
- @Test
- void generate_ScalaList() throws Exception {
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/AddLabelsToLabelableInput.scala.txt"),
- getFileByName(files, "AddLabelsToLabelableInput.scala"));
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationRequest.scala.txt"),
- getFileByName(files, "AddLabelsToLabelableMutationRequest.scala"));
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationResolver.scala.txt"),
- getFileByName(files, "AddLabelsToLabelableMutationResolver.scala"));
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationResponse.scala.txt"),
- getFileByName(files, "AddLabelsToLabelableMutationResponse.scala"));
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/AddLabelsToLabelablePayload.scala.txt"),
- getFileByName(files, "AddLabelsToLabelablePayload.scala"));
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/CodesOfConductQueryResolver.scala.txt"),
- getFileByName(files, "CodesOfConductQueryResolver.scala"));
- }
-
- @Test
- void generate_Var_Field() throws Exception {
- mappingConfig.setGenerateImmutableModels(false);
-
- generate("src/test/resources/schemas/github.graphqls");
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/Commit_Var_Field.scala.txt"),
- getFileByName(files, "Commit.scala"));
- }
-
- private void generate(String path) throws IOException {
- new ScalaGraphQLCodegen(singletonList(path),
- outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig))
- .generate();
- }
-
-
-}
\ No newline at end of file
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenOpenclassesTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenOpenclassesTest.java
deleted file mode 100644
index 05ce65d98..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenOpenclassesTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.MaxQueryTokensExtension;
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static com.kobylynskyi.graphql.codegen.TestUtils.getFileByName;
-import static java.util.Collections.singletonList;
-
-@ExtendWith(MaxQueryTokensExtension.class)
-class GraphQLCodegenOpenclassesTest {
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputScalaClassesDir = new File("build/generated/com/github/graphql");
- private final MappingConfig mappingConfig = new MappingConfig();
-
- @BeforeEach
- void init() {
- mappingConfig.setGenerateParameterizedFieldsResolvers(false);
- mappingConfig.setPackageName("com.github.graphql");
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- mappingConfig.setGenerateToString(true);
- mappingConfig.setGenerateApis(true);
- mappingConfig.setGenerateClient(true);
- mappingConfig.setGenerateEqualsAndHashCode(true);
- mappingConfig.setGenerateModelOpenClasses(true);
- mappingConfig.setGenerateBuilder(true);
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_MultipleInterfacesPerType() throws Exception {
- generate();
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/Commit_no_final_class.scala.txt"),
- getFileByName(files, "Commit.scala"));
- }
-
- @Test
- void generate_MultipleInterfacesPerTypeVarFields() throws Exception {
- mappingConfig.setGenerateImmutableModels(false);
-
- generate();
-
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/Commit_normal_class_var_fields.scala.txt"),
- getFileByName(files, "Commit.scala"));
- }
-
- private void generate() throws IOException {
- new ScalaGraphQLCodegen(singletonList("src/test/resources/schemas/github.graphqls"),
- outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- }
-}
\ No newline at end of file
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenRelayTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenRelayTest.java
deleted file mode 100644
index e5ef6e37b..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenRelayTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.supplier.SchemaFinder;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.Set;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static com.kobylynskyi.graphql.codegen.TestUtils.getFileByName;
-import static java.util.Arrays.asList;
-import static java.util.stream.Collectors.toSet;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-class GraphQLCodegenRelayTest {
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputJavaClassesDir = new File("build/generated");
- private final MappingConfig mappingConfig = new MappingConfig();
- private final SchemaFinder schemaFinder = new SchemaFinder(Paths.get("src/test/resources"));
-
- @BeforeEach
- void init() {
- mappingConfig.setGenerateDataFetchingEnvironmentArgumentInApis(true);
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- schemaFinder.setIncludePattern("relay.graphqls");
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generateServerSideRelayClasses() throws Exception {
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- Set generatedFileNames = Arrays.stream(files).map(File::getName).collect(toSet());
- assertEquals(new HashSet<>(asList("Organization.scala", "User.scala", "OrganizationsQueryResolver.scala",
- "QueryResolver.scala", "UsersQueryResolver.scala")), generatedFileNames);
-
- for (File file : files) {
- assertSameTrimmedContent(
- new File(String.format("src/test/resources/expected-classes/scala/relay/%s.txt", file.getName())),
- file);
- }
- }
-
- @Test
- void generateServerSideRelayClasses_CustomGenericsConnectionType() throws Exception {
- mappingConfig.getRelayConfig()
- .setConnectionType("reactor.core.publisher.Mono[graphql.relay.Connection[%s]]");
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/relay/UsersQueryResolver_reactive.scala.txt"),
- getFileByName(files, "UsersQueryResolver.scala"));
-
- }
-
- private void generate() throws IOException {
- new ScalaGraphQLCodegen(schemaFinder.findSchemas(), outputBuildDir, mappingConfig,
- TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- }
-
-}
\ No newline at end of file
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenRestrictedWordsAndToStringTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenRestrictedWordsAndToStringTest.java
deleted file mode 100644
index 4d6a9b2e8..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenRestrictedWordsAndToStringTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static java.util.Collections.singleton;
-import static java.util.Collections.singletonList;
-import static java.util.stream.Collectors.toList;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-class GraphQLCodegenRestrictedWordsAndToStringTest {
-
- private final MappingConfig mappingConfig = new MappingConfig();
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputJavaClassesDir = new File("build/generated/com/kobylynskyi/graphql/codegen/prot");
-
- @BeforeEach
- public void setup() {
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- mappingConfig.setPackageName("com.kobylynskyi.graphql.codegen.prot");
- mappingConfig.setGenerateEqualsAndHashCode(true);
- mappingConfig.setGenerateModelsForRootTypes(true);
- mappingConfig.setApiNameSuffix("API");
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_SetGenerateBuilder_False() throws Exception {
- // fix an issue when generateBuilder=false => can not use object.OPERATION_NAME
- mappingConfig.setGenerateBuilder(false);
- mappingConfig.setGenerateClient(true);
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- List generatedFileNames = Arrays.stream(files).map(File::getName)
- .filter(f -> f.equals("CaseQueryRequest.scala")).sorted()
- .collect(toList());
- assertEquals(singletonList("CaseQueryRequest.scala"), generatedFileNames);
-
- for (File file : files) {
- if (file.getName().equals("CaseQueryRequest.scala")) {
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/builder/CaseQueryRequest.scala.txt"), file);
- }
- }
- }
-
- @Test
- void generate_SetGenerateClient_True() throws Exception {
- mappingConfig.setGenerateClient(true);
- mappingConfig.setGenerateBuilder(true);
- mappingConfig.setUseObjectMapperForRequestSerialization(singleton("TestEnum"));
- mappingConfig.putCustomTypeMappingIfAbsent("DateTime", "java.time.ZonedDateTime");
- mappingConfig.setGenerateApis(true);
- mappingConfig.setUseObjectMapperForRequestSerialization(singleton("DateTime"));
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- List generatedFileNames = Arrays.stream(files).map(File::getName)
- .filter(f -> Arrays.asList("QueryPrivateParametrizedInput.scala", "Synchronized.scala").contains(f))
- .sorted()
- .collect(toList());
- assertEquals(Arrays.asList("QueryPrivateParametrizedInput.scala", "Synchronized.scala"), generatedFileNames);
-
- for (File file : files) {
- if (Arrays.asList("QueryPrivateParametrizedInput.scala", "Synchronized.scala").contains(file.getName())) {
- assertSameTrimmedContent(
- new File(String.format("src/test/resources/expected-classes/scala/tostring/%s.txt",
- file.getName())),
- file);
- }
- }
- }
-
- @Test
- void generate_SetGenerateClient_False() throws Exception {
- mappingConfig.setGenerateClient(false);
- mappingConfig.setGenerateToString(true);
- mappingConfig.setUseObjectMapperForRequestSerialization(singleton("TestEnum"));
- mappingConfig.putCustomTypeMappingIfAbsent("DateTime", "java.time.ZonedDateTime");
- mappingConfig.setGenerateApis(true);
-
- generate();
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- List generatedFileNames = Arrays.stream(files).map(File::getName)
- .filter(f -> Objects.equals("Synchronized.scala", f)
- || Objects.equals("QueryCaseParametrizedInput.scala", f))
- .sorted().collect(toList());
- assertEquals(singletonList("Synchronized.scala"), generatedFileNames);
-
- for (File file : files) {
- if (Arrays.asList("QueryCaseParametrizedInput.scala", "Synchronized.scala").contains(file.getName())) {
- assertSameTrimmedContent(
- new File(String.format("src/test/resources/expected-classes/scala/tostring/%s.txt",
- "TOSTRING_Synchronized.scala",
- "QueryCaseParametrizedInput")),
- file);
- }
- }
- }
-
- private void generate() throws IOException {
- new ScalaGraphQLCodegen(singletonList("src/test/resources/schemas/scala/restricted-words.graphqls"),
- outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- }
-
-}
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenSealedInterfacesTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenSealedInterfacesTest.java
deleted file mode 100644
index 9bb40de88..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenSealedInterfacesTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.MaxQueryTokensExtension;
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import java.io.File;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static com.kobylynskyi.graphql.codegen.TestUtils.getFileByName;
-import static java.util.Collections.singletonList;
-
-@ExtendWith(MaxQueryTokensExtension.class)
-class GraphQLCodegenSealedInterfacesTest {
- private final File outputBuildDir = new File("build/generated");
- private final File outputScalaClassesDir = new File("build/generated/com/github/graphql");
- private final MappingConfig mappingConfig = new MappingConfig();
-
- @BeforeEach
- void init() {
- mappingConfig.setGenerateParameterizedFieldsResolvers(false);
- mappingConfig.setPackageName("com.github.graphql");
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- mappingConfig.setGenerateToString(true);
- mappingConfig.setGenerateApis(true);
- mappingConfig.setGenerateClient(true);
- mappingConfig.setGenerateEqualsAndHashCode(true);
- mappingConfig.setGenerateBuilder(true);
- mappingConfig.setGenerateSealedInterfaces(true);
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_MultipleInterfacesPerType() throws Exception {
- new ScalaGraphQLCodegen(singletonList("src/test/resources/schemas/github.graphqls"),
- outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig)).generate();
- File[] files = Objects.requireNonNull(outputScalaClassesDir.listFiles());
-
- assertSameTrimmedContent(
- new File("src/test/resources/expected-classes/scala/Comment_sealed_interfaces.scala.txt"),
- getFileByName(files, "Comment.scala")
- );
- }
-}
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenTypesAsInterfacesTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenTypesAsInterfacesTest.java
deleted file mode 100644
index dd63b7749..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenTypesAsInterfacesTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static com.kobylynskyi.graphql.codegen.TestUtils.getFileByName;
-import static java.util.Arrays.asList;
-import static java.util.Collections.singletonList;
-
-class GraphQLCodegenTypesAsInterfacesTest {
-
- private final File outputBuildDir = new File("build/generated");
- private final File outputJavaClassesDir = new File("build/generated/com/github/graphql");
- private final MappingConfig mappingConfig = new MappingConfig();
-
- @BeforeEach
- void init() {
- mappingConfig.setPackageName("com.github.graphql");
- mappingConfig.setFieldsWithResolvers(Collections.singleton("@customResolver"));
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_typeAsInterface() throws Exception {
- mappingConfig.setTypesAsInterfaces(new HashSet<>(asList("@asInterface", "Order")));
-
- generate("src/test/resources/schemas/types-as-interfaces.graphqls");
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/types-as-interfaces/" +
- "Order.scala.txt"), getFileByName(files, "Order.scala"));
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/types-as-interfaces/" +
- "QueryResolver.scala.txt"), getFileByName(files, "QueryResolver.scala"));
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/types-as-interfaces/" +
- "User.scala.txt"), getFileByName(files, "User.scala"));
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/types-as-interfaces/" +
- "UserCurrentQueryResolver.scala.txt"), getFileByName(files, "UserCurrentQueryResolver.scala"));
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/types-as-interfaces/" +
- "UserResolver.scala.txt"), getFileByName(files, "UserResolver.scala"));
- }
-
- @Test
- void generate_typeAsInterfaceExtendsInterface() throws Exception {
- mappingConfig.setTypesAsInterfaces(new HashSet<>(asList("@asInterface")));
-
- generate("src/test/resources/schemas/types-as-interfaces-extends-interface.graphqls");
-
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
-
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/" +
- "types-as-interfaces-extends-interface/Node.scala.txt"), getFileByName(files, "Node.scala"));
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/" +
- "types-as-interfaces-extends-interface/Profile.scala.txt"),
- getFileByName(files, "Profile.scala"));
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/" +
- "types-as-interfaces-extends-interface/QueryResolver.scala.txt"),
- getFileByName(files, "QueryResolver.scala"));
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/" +
- "types-as-interfaces-extends-interface/User.scala.txt"), getFileByName(files, "User.scala"));
- assertSameTrimmedContent(new File("src/test/resources/expected-classes/scala/" +
- "types-as-interfaces-extends-interface/UserCurrentQueryResolver.scala.txt"),
- getFileByName(files, "UserCurrentQueryResolver.scala"));
- }
-
- private void generate(String path) throws IOException {
- new ScalaGraphQLCodegen(singletonList(path),
- outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig))
- .generate();
- }
-
-}
diff --git a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenUnionResolverTest.java b/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenUnionResolverTest.java
deleted file mode 100644
index 83ba98e57..000000000
--- a/src/test/java/com/kobylynskyi/graphql/codegen/scala/GraphQLCodegenUnionResolverTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package com.kobylynskyi.graphql.codegen.scala;
-
-import com.kobylynskyi.graphql.codegen.TestUtils;
-import com.kobylynskyi.graphql.codegen.model.GeneratedLanguage;
-import com.kobylynskyi.graphql.codegen.model.MappingConfig;
-import com.kobylynskyi.graphql.codegen.utils.Utils;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-
-import static com.kobylynskyi.graphql.codegen.TestUtils.assertSameTrimmedContent;
-import static java.util.Collections.singletonList;
-import static java.util.stream.Collectors.toList;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-class GraphQLCodegenUnionResolverTest {
-
- private final File outputBuildDir = new File("build/generated");
-
- private MappingConfig mappingConfig;
-
- @BeforeEach
- void init() {
- mappingConfig = new MappingConfig();
- mappingConfig.setGenerateJacksonTypeIdResolver(true);
- mappingConfig.setGeneratedLanguage(GeneratedLanguage.SCALA);
- }
-
- @AfterEach
- void cleanup() {
- Utils.deleteDir(outputBuildDir);
- }
-
- @Test
- void generate_CheckFiles_with_model_package() throws Exception {
- mappingConfig.setPackageName("com.kobylynskyi.graphql.unionresolver");
-
- generate();
-
- File outputJavaClassesDir = new File("build/generated/com/kobylynskyi/graphql/unionresolver");
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- List generatedFileNames = Arrays.stream(files).map(File::getName).sorted().collect(toList());
- List expectedClasses = Arrays.asList("GraphqlJacksonTypeIdResolver.scala", "ResultObject.scala",
- "UnionMemberA.scala", "UnionMemberB.scala", "UnionToResolve.scala");
- assertEquals(expectedClasses, generatedFileNames);
-
- for (File file : files) {
- assertSameTrimmedContent(
- new File(String.format(
- "src/test/resources/expected-classes/scala/jackson-resolver-union/%s.txt",
- file.getName())),
- file);
- }
- }
-
- @Test
- void generate_CheckFiles_without_model_package_and_with_prefix_and_suffix() throws Exception {
- mappingConfig.setModelNamePrefix("My");
- mappingConfig.setModelNameSuffix("Suffix");
-
- generate();
-
- File outputJavaClassesDir = new File("build/generated");
- File[] files = Objects.requireNonNull(outputJavaClassesDir.listFiles());
- List generatedFileNames = Arrays.stream(files).map(File::getName).sorted().collect(toList());
- List expectedClasses = Arrays.asList("GraphqlJacksonTypeIdResolver.scala", "MyResultObjectSuffix.scala",
- "MyUnionMemberASuffix.scala", "MyUnionMemberBSuffix.scala", "MyUnionToResolveSuffix.scala");
- assertEquals(expectedClasses, generatedFileNames);
-
- for (File file : files) {
- assertSameTrimmedContent(
- new File(String.format(
- "src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/" +
- "%s.txt",
- file.getName())),
- file);
- }
- }
-
- private void generate() throws IOException {
- new ScalaGraphQLCodegen(singletonList("src/test/resources/schemas/union-resolver.graphqls"),
- outputBuildDir, mappingConfig, TestUtils.getStaticGeneratedInfo(mappingConfig))
- .generate();
- }
-
-}
diff --git a/src/test/resources/expected-classes/scala/AddLabelsToLabelableInput.scala.txt b/src/test/resources/expected-classes/scala/AddLabelsToLabelableInput.scala.txt
deleted file mode 100644
index 1aa51c68b..000000000
--- a/src/test/resources/expected-classes/scala/AddLabelsToLabelableInput.scala.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class AddLabelsToLabelableInput(
- clientMutationId: String,
- @javax.validation.constraints.NotNull
- labelIds: scala.Seq[String],
- @javax.validation.constraints.NotNull
- labelableId: String
-) {
-
- override def toString(): String = {
- scala.Seq(
- if (clientMutationId != null) "clientMutationId: " + GraphQLRequestSerializer.getEntry(clientMutationId) else "",
- if (labelIds != null) "labelIds: " + GraphQLRequestSerializer.getEntry(labelIds.asJava) else "",
- if (labelableId != null) "labelableId: " + GraphQLRequestSerializer.getEntry(labelableId) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationRequest.scala.txt b/src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationRequest.scala.txt
deleted file mode 100644
index b54492707..000000000
--- a/src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationRequest.scala.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest
-import java.util.{ LinkedHashMap => JLinkedHashMap }
-import java.util.{ Map => JMap, Set => JSet }
-import java.util.Objects
-import scala.collection.mutable
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class AddLabelsToLabelableMutationRequest(alias: String) extends GraphQLOperationRequest {
-
- private final lazy val input = new JLinkedHashMap[String, java.lang.Object]()
- private final lazy val useObjectMapperForInputSerialization: mutable.Set[String] = mutable.Set()
-
- def setInput(input: AddLabelsToLabelableInput): Unit = {
- this.input.put("input", input)
- }
-
- override def getOperationType(): GraphQLOperation = AddLabelsToLabelableMutationRequest.OPERATION_TYPE
-
- override def getOperationName(): String = AddLabelsToLabelableMutationRequest.OPERATION_NAME
-
- override def getAlias(): String = if (alias != null) alias else AddLabelsToLabelableMutationRequest.OPERATION_NAME
-
- override def getInput(): JMap[String, java.lang.Object] = input
-
- override def getUseObjectMapperForInputSerialization(): JSet[String] = useObjectMapperForInputSerialization.asJava
-
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[AddLabelsToLabelableMutationRequest]
- Objects.equals(getOperationType(), that.getOperationType()) &&
- Objects.equals(getOperationName(), that.getOperationName()) &&
- Objects.equals(input, that.input)
- }
-
- override def hashCode(): Int = Objects.hash(getOperationType(), getOperationName(), input)
-
- override def toString(): String = Objects.toString(input)
-}
-
-object AddLabelsToLabelableMutationRequest {
-
- final val OPERATION_NAME: String = "addLabelsToLabelable"
- final val OPERATION_TYPE: GraphQLOperation = GraphQLOperation.MUTATION
-
- def apply(alias: String) = new AddLabelsToLabelableMutationRequest(alias)
-
- def apply() = new AddLabelsToLabelableMutationRequest(null)
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationResolver.scala.txt b/src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationResolver.scala.txt
deleted file mode 100644
index 363ff2b7b..000000000
--- a/src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationResolver.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait AddLabelsToLabelableMutationResolver {
-
- @throws[Exception]
- def addLabelsToLabelable(input: AddLabelsToLabelableInput): AddLabelsToLabelablePayload
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationResponse.scala.txt b/src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationResponse.scala.txt
deleted file mode 100644
index 35f78851d..000000000
--- a/src/test/resources/expected-classes/scala/AddLabelsToLabelableMutationResponse.scala.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResult
-import java.util.{ Map => JMap }
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class AddLabelsToLabelableMutationResponse extends GraphQLResult[JMap[String, AddLabelsToLabelablePayload]] {
-
- def addLabelsToLabelable(): AddLabelsToLabelablePayload = {
- val data: JMap[String, AddLabelsToLabelablePayload] = getData
- if (data != null) data.get(AddLabelsToLabelableMutationResponse.OPERATION_NAME) else null
- }
-
-}
-
-object AddLabelsToLabelableMutationResponse {
-
- private final val OPERATION_NAME: String = "addLabelsToLabelable"
-
-}
diff --git a/src/test/resources/expected-classes/scala/AddLabelsToLabelablePayload.scala.txt b/src/test/resources/expected-classes/scala/AddLabelsToLabelablePayload.scala.txt
deleted file mode 100644
index 4ead411df..000000000
--- a/src/test/resources/expected-classes/scala/AddLabelsToLabelablePayload.scala.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class AddLabelsToLabelablePayload(
- clientMutationId: String,
- labelable: Labelable
-) {
-
- override def toString(): String = {
- scala.Seq(
- if (clientMutationId != null) "clientMutationId: " + GraphQLRequestSerializer.getEntry(clientMutationId) else "",
- if (labelable != null) "labelable: " + GraphQLRequestSerializer.getEntry(labelable) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/CodesOfConductQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/CodesOfConductQueryResolver.scala.txt
deleted file mode 100644
index 7ed324ac9..000000000
--- a/src/test/resources/expected-classes/scala/CodesOfConductQueryResolver.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait CodesOfConductQueryResolver {
-
- @throws[Exception]
- def codesOfConduct(): scala.Seq[CodeOfConduct]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/Comment_sealed_interfaces.scala.txt b/src/test/resources/expected-classes/scala/Comment_sealed_interfaces.scala.txt
deleted file mode 100644
index 4e2d51a34..000000000
--- a/src/test/resources/expected-classes/scala/Comment_sealed_interfaces.scala.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.github.graphql
-
-import CommentAuthorAssociation._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-sealed trait Comment {
-
- val author: Actor
-
- @javax.validation.constraints.NotNull
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.CommentAuthorAssociationTypeRefer])
- val authorAssociation: CommentAuthorAssociation
-
- @javax.validation.constraints.NotNull
- val body: String
-
- @javax.validation.constraints.NotNull
- val bodyHTML: String
-
- @javax.validation.constraints.NotNull
- val bodyText: String
-
- @javax.validation.constraints.NotNull
- val createdAt: String
-
- val createdViaEmail: Boolean
-
- val editor: Actor
-
- @javax.validation.constraints.NotNull
- val id: String
-
- val includesCreatedEdit: Boolean
-
- val lastEditedAt: String
-
- val publishedAt: String
-
- @javax.validation.constraints.NotNull
- val updatedAt: String
-
- val userContentEdits: UserContentEditConnection
-
- val viewerDidAuthor: Boolean
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/Commit.scala.txt b/src/test/resources/expected-classes/scala/Commit.scala.txt
deleted file mode 100644
index 2595aa34f..000000000
--- a/src/test/resources/expected-classes/scala/Commit.scala.txt
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-import SubscriptionState._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Commit(
- @javax.validation.constraints.NotNull
- override val abbreviatedOid: String,
- additions: Int,
- associatedPullRequests: PullRequestConnection,
- author: GitActor,
- authoredByCommitter: Boolean,
- @javax.validation.constraints.NotNull
- authoredDate: String,
- @javax.validation.constraints.NotNull
- blame: Blame,
- changedFiles: Int,
- @javax.validation.constraints.NotNull
- comments: CommitCommentConnection,
- @javax.validation.constraints.NotNull
- override val commitResourcePath: String,
- @javax.validation.constraints.NotNull
- override val commitUrl: String,
- @javax.validation.constraints.NotNull
- committedDate: String,
- committedViaWeb: Boolean,
- committer: GitActor,
- deletions: Int,
- deployments: DeploymentConnection,
- @javax.validation.constraints.NotNull
- history: CommitHistoryConnection,
- @javax.validation.constraints.NotNull
- override val id: String,
- @javax.validation.constraints.NotNull
- message: String,
- @javax.validation.constraints.NotNull
- messageBody: String,
- @javax.validation.constraints.NotNull
- messageBodyHTML: String,
- @javax.validation.constraints.NotNull
- messageHeadline: String,
- @javax.validation.constraints.NotNull
- messageHeadlineHTML: String,
- @javax.validation.constraints.NotNull
- override val oid: String,
- @javax.validation.constraints.NotNull
- parents: CommitConnection,
- pushedDate: String,
- @javax.validation.constraints.NotNull
- override val repository: Repository,
- @javax.validation.constraints.NotNull
- override val resourcePath: String,
- signature: GitSignature,
- status: Status,
- @javax.validation.constraints.NotNull
- tarballUrl: String,
- @javax.validation.constraints.NotNull
- tree: Tree,
- @javax.validation.constraints.NotNull
- treeResourcePath: String,
- @javax.validation.constraints.NotNull
- treeUrl: String,
- @javax.validation.constraints.NotNull
- override val url: String,
- override val viewerCanSubscribe: Boolean,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.SubscriptionStateTypeRefer])
- override val viewerSubscription: SubscriptionState,
- @javax.validation.constraints.NotNull
- zipballUrl: String
-) extends Closer with IssueTimelineItem with PullRequestTimelineItem with Subscribable with Node with GitObject with UniformResourceLocatable {
-
- override def toString(): String = {
- scala.Seq(
- if (abbreviatedOid != null) "abbreviatedOid: " + GraphQLRequestSerializer.getEntry(abbreviatedOid) else "",
- "additions: " + GraphQLRequestSerializer.getEntry(additions),
- if (associatedPullRequests != null) "associatedPullRequests: " + GraphQLRequestSerializer.getEntry(associatedPullRequests) else "",
- if (author != null) "author: " + GraphQLRequestSerializer.getEntry(author) else "",
- "authoredByCommitter: " + GraphQLRequestSerializer.getEntry(authoredByCommitter),
- if (authoredDate != null) "authoredDate: " + GraphQLRequestSerializer.getEntry(authoredDate) else "",
- if (blame != null) "blame: " + GraphQLRequestSerializer.getEntry(blame) else "",
- "changedFiles: " + GraphQLRequestSerializer.getEntry(changedFiles),
- if (comments != null) "comments: " + GraphQLRequestSerializer.getEntry(comments) else "",
- if (commitResourcePath != null) "commitResourcePath: " + GraphQLRequestSerializer.getEntry(commitResourcePath) else "",
- if (commitUrl != null) "commitUrl: " + GraphQLRequestSerializer.getEntry(commitUrl) else "",
- if (committedDate != null) "committedDate: " + GraphQLRequestSerializer.getEntry(committedDate) else "",
- "committedViaWeb: " + GraphQLRequestSerializer.getEntry(committedViaWeb),
- if (committer != null) "committer: " + GraphQLRequestSerializer.getEntry(committer) else "",
- "deletions: " + GraphQLRequestSerializer.getEntry(deletions),
- if (deployments != null) "deployments: " + GraphQLRequestSerializer.getEntry(deployments) else "",
- if (history != null) "history: " + GraphQLRequestSerializer.getEntry(history) else "",
- if (id != null) "id: " + GraphQLRequestSerializer.getEntry(id) else "",
- if (message != null) "message: " + GraphQLRequestSerializer.getEntry(message) else "",
- if (messageBody != null) "messageBody: " + GraphQLRequestSerializer.getEntry(messageBody) else "",
- if (messageBodyHTML != null) "messageBodyHTML: " + GraphQLRequestSerializer.getEntry(messageBodyHTML) else "",
- if (messageHeadline != null) "messageHeadline: " + GraphQLRequestSerializer.getEntry(messageHeadline) else "",
- if (messageHeadlineHTML != null) "messageHeadlineHTML: " + GraphQLRequestSerializer.getEntry(messageHeadlineHTML) else "",
- if (oid != null) "oid: " + GraphQLRequestSerializer.getEntry(oid) else "",
- if (parents != null) "parents: " + GraphQLRequestSerializer.getEntry(parents) else "",
- if (pushedDate != null) "pushedDate: " + GraphQLRequestSerializer.getEntry(pushedDate) else "",
- if (repository != null) "repository: " + GraphQLRequestSerializer.getEntry(repository) else "",
- if (resourcePath != null) "resourcePath: " + GraphQLRequestSerializer.getEntry(resourcePath) else "",
- if (signature != null) "signature: " + GraphQLRequestSerializer.getEntry(signature) else "",
- if (status != null) "status: " + GraphQLRequestSerializer.getEntry(status) else "",
- if (tarballUrl != null) "tarballUrl: " + GraphQLRequestSerializer.getEntry(tarballUrl) else "",
- if (tree != null) "tree: " + GraphQLRequestSerializer.getEntry(tree) else "",
- if (treeResourcePath != null) "treeResourcePath: " + GraphQLRequestSerializer.getEntry(treeResourcePath) else "",
- if (treeUrl != null) "treeUrl: " + GraphQLRequestSerializer.getEntry(treeUrl) else "",
- if (url != null) "url: " + GraphQLRequestSerializer.getEntry(url) else "",
- "viewerCanSubscribe: " + GraphQLRequestSerializer.getEntry(viewerCanSubscribe),
- if (viewerSubscription != null) "viewerSubscription: " + GraphQLRequestSerializer.getEntry(viewerSubscription) else "",
- if (zipballUrl != null) "zipballUrl: " + GraphQLRequestSerializer.getEntry(zipballUrl) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/Commit_Var_Field.scala.txt b/src/test/resources/expected-classes/scala/Commit_Var_Field.scala.txt
deleted file mode 100644
index 2fba5775c..000000000
--- a/src/test/resources/expected-classes/scala/Commit_Var_Field.scala.txt
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-import SubscriptionState._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Commit(
- @javax.validation.constraints.NotNull
- override var abbreviatedOid: String,
- var additions: Int,
- var associatedPullRequests: PullRequestConnection,
- var author: GitActor,
- var authoredByCommitter: Boolean,
- @javax.validation.constraints.NotNull
- var authoredDate: String,
- @javax.validation.constraints.NotNull
- var blame: Blame,
- var changedFiles: Int,
- @javax.validation.constraints.NotNull
- var comments: CommitCommentConnection,
- @javax.validation.constraints.NotNull
- override var commitResourcePath: String,
- @javax.validation.constraints.NotNull
- override var commitUrl: String,
- @javax.validation.constraints.NotNull
- var committedDate: String,
- var committedViaWeb: Boolean,
- var committer: GitActor,
- var deletions: Int,
- var deployments: DeploymentConnection,
- @javax.validation.constraints.NotNull
- var history: CommitHistoryConnection,
- @javax.validation.constraints.NotNull
- override var id: String,
- @javax.validation.constraints.NotNull
- var message: String,
- @javax.validation.constraints.NotNull
- var messageBody: String,
- @javax.validation.constraints.NotNull
- var messageBodyHTML: String,
- @javax.validation.constraints.NotNull
- var messageHeadline: String,
- @javax.validation.constraints.NotNull
- var messageHeadlineHTML: String,
- @javax.validation.constraints.NotNull
- override var oid: String,
- @javax.validation.constraints.NotNull
- var parents: CommitConnection,
- var pushedDate: String,
- @javax.validation.constraints.NotNull
- override var repository: Repository,
- @javax.validation.constraints.NotNull
- override var resourcePath: String,
- var signature: GitSignature,
- var status: Status,
- @javax.validation.constraints.NotNull
- var tarballUrl: String,
- @javax.validation.constraints.NotNull
- var tree: Tree,
- @javax.validation.constraints.NotNull
- var treeResourcePath: String,
- @javax.validation.constraints.NotNull
- var treeUrl: String,
- @javax.validation.constraints.NotNull
- override var url: String,
- override var viewerCanSubscribe: Boolean,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.SubscriptionStateTypeRefer])
- override var viewerSubscription: SubscriptionState,
- @javax.validation.constraints.NotNull
- var zipballUrl: String
-) extends Closer with IssueTimelineItem with PullRequestTimelineItem with Subscribable with Node with GitObject with UniformResourceLocatable {
-
- override def toString(): String = {
- scala.Seq(
- if (abbreviatedOid != null) "abbreviatedOid: " + GraphQLRequestSerializer.getEntry(abbreviatedOid) else "",
- "additions: " + GraphQLRequestSerializer.getEntry(additions),
- if (associatedPullRequests != null) "associatedPullRequests: " + GraphQLRequestSerializer.getEntry(associatedPullRequests) else "",
- if (author != null) "author: " + GraphQLRequestSerializer.getEntry(author) else "",
- "authoredByCommitter: " + GraphQLRequestSerializer.getEntry(authoredByCommitter),
- if (authoredDate != null) "authoredDate: " + GraphQLRequestSerializer.getEntry(authoredDate) else "",
- if (blame != null) "blame: " + GraphQLRequestSerializer.getEntry(blame) else "",
- "changedFiles: " + GraphQLRequestSerializer.getEntry(changedFiles),
- if (comments != null) "comments: " + GraphQLRequestSerializer.getEntry(comments) else "",
- if (commitResourcePath != null) "commitResourcePath: " + GraphQLRequestSerializer.getEntry(commitResourcePath) else "",
- if (commitUrl != null) "commitUrl: " + GraphQLRequestSerializer.getEntry(commitUrl) else "",
- if (committedDate != null) "committedDate: " + GraphQLRequestSerializer.getEntry(committedDate) else "",
- "committedViaWeb: " + GraphQLRequestSerializer.getEntry(committedViaWeb),
- if (committer != null) "committer: " + GraphQLRequestSerializer.getEntry(committer) else "",
- "deletions: " + GraphQLRequestSerializer.getEntry(deletions),
- if (deployments != null) "deployments: " + GraphQLRequestSerializer.getEntry(deployments) else "",
- if (history != null) "history: " + GraphQLRequestSerializer.getEntry(history) else "",
- if (id != null) "id: " + GraphQLRequestSerializer.getEntry(id) else "",
- if (message != null) "message: " + GraphQLRequestSerializer.getEntry(message) else "",
- if (messageBody != null) "messageBody: " + GraphQLRequestSerializer.getEntry(messageBody) else "",
- if (messageBodyHTML != null) "messageBodyHTML: " + GraphQLRequestSerializer.getEntry(messageBodyHTML) else "",
- if (messageHeadline != null) "messageHeadline: " + GraphQLRequestSerializer.getEntry(messageHeadline) else "",
- if (messageHeadlineHTML != null) "messageHeadlineHTML: " + GraphQLRequestSerializer.getEntry(messageHeadlineHTML) else "",
- if (oid != null) "oid: " + GraphQLRequestSerializer.getEntry(oid) else "",
- if (parents != null) "parents: " + GraphQLRequestSerializer.getEntry(parents) else "",
- if (pushedDate != null) "pushedDate: " + GraphQLRequestSerializer.getEntry(pushedDate) else "",
- if (repository != null) "repository: " + GraphQLRequestSerializer.getEntry(repository) else "",
- if (resourcePath != null) "resourcePath: " + GraphQLRequestSerializer.getEntry(resourcePath) else "",
- if (signature != null) "signature: " + GraphQLRequestSerializer.getEntry(signature) else "",
- if (status != null) "status: " + GraphQLRequestSerializer.getEntry(status) else "",
- if (tarballUrl != null) "tarballUrl: " + GraphQLRequestSerializer.getEntry(tarballUrl) else "",
- if (tree != null) "tree: " + GraphQLRequestSerializer.getEntry(tree) else "",
- if (treeResourcePath != null) "treeResourcePath: " + GraphQLRequestSerializer.getEntry(treeResourcePath) else "",
- if (treeUrl != null) "treeUrl: " + GraphQLRequestSerializer.getEntry(treeUrl) else "",
- if (url != null) "url: " + GraphQLRequestSerializer.getEntry(url) else "",
- "viewerCanSubscribe: " + GraphQLRequestSerializer.getEntry(viewerCanSubscribe),
- if (viewerSubscription != null) "viewerSubscription: " + GraphQLRequestSerializer.getEntry(viewerSubscription) else "",
- if (zipballUrl != null) "zipballUrl: " + GraphQLRequestSerializer.getEntry(zipballUrl) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/Commit_noValidationAnnotation.scala.txt b/src/test/resources/expected-classes/scala/Commit_noValidationAnnotation.scala.txt
deleted file mode 100644
index 831be78f0..000000000
--- a/src/test/resources/expected-classes/scala/Commit_noValidationAnnotation.scala.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-import SubscriptionState._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Commit(
- override val abbreviatedOid: String,
- additions: Int,
- associatedPullRequests: PullRequestConnection,
- author: GitActor,
- authoredByCommitter: Boolean,
- authoredDate: String,
- blame: Blame,
- changedFiles: Int,
- comments: CommitCommentConnection,
- override val commitResourcePath: String,
- override val commitUrl: String,
- committedDate: String,
- committedViaWeb: Boolean,
- committer: GitActor,
- deletions: Int,
- deployments: DeploymentConnection,
- history: CommitHistoryConnection,
- override val id: String,
- message: String,
- messageBody: String,
- messageBodyHTML: String,
- messageHeadline: String,
- messageHeadlineHTML: String,
- override val oid: String,
- parents: CommitConnection,
- pushedDate: String,
- override val repository: Repository,
- override val resourcePath: String,
- signature: GitSignature,
- status: Status,
- tarballUrl: String,
- tree: Tree,
- treeResourcePath: String,
- treeUrl: String,
- override val url: String,
- override val viewerCanSubscribe: Boolean,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.SubscriptionStateTypeRefer])
- override val viewerSubscription: SubscriptionState,
- zipballUrl: String
-) extends Closer with IssueTimelineItem with PullRequestTimelineItem with Subscribable with Node with GitObject with UniformResourceLocatable {
-
- override def toString(): String = {
- scala.Seq(
- if (abbreviatedOid != null) "abbreviatedOid: " + GraphQLRequestSerializer.getEntry(abbreviatedOid) else "",
- "additions: " + GraphQLRequestSerializer.getEntry(additions),
- if (associatedPullRequests != null) "associatedPullRequests: " + GraphQLRequestSerializer.getEntry(associatedPullRequests) else "",
- if (author != null) "author: " + GraphQLRequestSerializer.getEntry(author) else "",
- "authoredByCommitter: " + GraphQLRequestSerializer.getEntry(authoredByCommitter),
- if (authoredDate != null) "authoredDate: " + GraphQLRequestSerializer.getEntry(authoredDate) else "",
- if (blame != null) "blame: " + GraphQLRequestSerializer.getEntry(blame) else "",
- "changedFiles: " + GraphQLRequestSerializer.getEntry(changedFiles),
- if (comments != null) "comments: " + GraphQLRequestSerializer.getEntry(comments) else "",
- if (commitResourcePath != null) "commitResourcePath: " + GraphQLRequestSerializer.getEntry(commitResourcePath) else "",
- if (commitUrl != null) "commitUrl: " + GraphQLRequestSerializer.getEntry(commitUrl) else "",
- if (committedDate != null) "committedDate: " + GraphQLRequestSerializer.getEntry(committedDate) else "",
- "committedViaWeb: " + GraphQLRequestSerializer.getEntry(committedViaWeb),
- if (committer != null) "committer: " + GraphQLRequestSerializer.getEntry(committer) else "",
- "deletions: " + GraphQLRequestSerializer.getEntry(deletions),
- if (deployments != null) "deployments: " + GraphQLRequestSerializer.getEntry(deployments) else "",
- if (history != null) "history: " + GraphQLRequestSerializer.getEntry(history) else "",
- if (id != null) "id: " + GraphQLRequestSerializer.getEntry(id) else "",
- if (message != null) "message: " + GraphQLRequestSerializer.getEntry(message) else "",
- if (messageBody != null) "messageBody: " + GraphQLRequestSerializer.getEntry(messageBody) else "",
- if (messageBodyHTML != null) "messageBodyHTML: " + GraphQLRequestSerializer.getEntry(messageBodyHTML) else "",
- if (messageHeadline != null) "messageHeadline: " + GraphQLRequestSerializer.getEntry(messageHeadline) else "",
- if (messageHeadlineHTML != null) "messageHeadlineHTML: " + GraphQLRequestSerializer.getEntry(messageHeadlineHTML) else "",
- if (oid != null) "oid: " + GraphQLRequestSerializer.getEntry(oid) else "",
- if (parents != null) "parents: " + GraphQLRequestSerializer.getEntry(parents) else "",
- if (pushedDate != null) "pushedDate: " + GraphQLRequestSerializer.getEntry(pushedDate) else "",
- if (repository != null) "repository: " + GraphQLRequestSerializer.getEntry(repository) else "",
- if (resourcePath != null) "resourcePath: " + GraphQLRequestSerializer.getEntry(resourcePath) else "",
- if (signature != null) "signature: " + GraphQLRequestSerializer.getEntry(signature) else "",
- if (status != null) "status: " + GraphQLRequestSerializer.getEntry(status) else "",
- if (tarballUrl != null) "tarballUrl: " + GraphQLRequestSerializer.getEntry(tarballUrl) else "",
- if (tree != null) "tree: " + GraphQLRequestSerializer.getEntry(tree) else "",
- if (treeResourcePath != null) "treeResourcePath: " + GraphQLRequestSerializer.getEntry(treeResourcePath) else "",
- if (treeUrl != null) "treeUrl: " + GraphQLRequestSerializer.getEntry(treeUrl) else "",
- if (url != null) "url: " + GraphQLRequestSerializer.getEntry(url) else "",
- "viewerCanSubscribe: " + GraphQLRequestSerializer.getEntry(viewerCanSubscribe),
- if (viewerSubscription != null) "viewerSubscription: " + GraphQLRequestSerializer.getEntry(viewerSubscription) else "",
- if (zipballUrl != null) "zipballUrl: " + GraphQLRequestSerializer.getEntry(zipballUrl) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/Commit_no_final_class.scala.txt b/src/test/resources/expected-classes/scala/Commit_no_final_class.scala.txt
deleted file mode 100644
index ff216623c..000000000
--- a/src/test/resources/expected-classes/scala/Commit_no_final_class.scala.txt
+++ /dev/null
@@ -1,412 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import java.util.Objects
-import scala.collection.JavaConverters._
-import SubscriptionState._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class Commit(
- @javax.validation.constraints.NotNull
- override val abbreviatedOid: String,
- val additions: Int,
- val associatedPullRequests: PullRequestConnection,
- val author: GitActor,
- val authoredByCommitter: Boolean,
- @javax.validation.constraints.NotNull
- val authoredDate: String,
- @javax.validation.constraints.NotNull
- val blame: Blame,
- val changedFiles: Int,
- @javax.validation.constraints.NotNull
- val comments: CommitCommentConnection,
- @javax.validation.constraints.NotNull
- override val commitResourcePath: String,
- @javax.validation.constraints.NotNull
- override val commitUrl: String,
- @javax.validation.constraints.NotNull
- val committedDate: String,
- val committedViaWeb: Boolean,
- val committer: GitActor,
- val deletions: Int,
- val deployments: DeploymentConnection,
- @javax.validation.constraints.NotNull
- val history: CommitHistoryConnection,
- @javax.validation.constraints.NotNull
- override val id: String,
- @javax.validation.constraints.NotNull
- val message: String,
- @javax.validation.constraints.NotNull
- val messageBody: String,
- @javax.validation.constraints.NotNull
- val messageBodyHTML: String,
- @javax.validation.constraints.NotNull
- val messageHeadline: String,
- @javax.validation.constraints.NotNull
- val messageHeadlineHTML: String,
- @javax.validation.constraints.NotNull
- override val oid: String,
- @javax.validation.constraints.NotNull
- val parents: CommitConnection,
- val pushedDate: String,
- @javax.validation.constraints.NotNull
- override val repository: Repository,
- @javax.validation.constraints.NotNull
- override val resourcePath: String,
- val signature: GitSignature,
- val status: Status,
- @javax.validation.constraints.NotNull
- val tarballUrl: String,
- @javax.validation.constraints.NotNull
- val tree: Tree,
- @javax.validation.constraints.NotNull
- val treeResourcePath: String,
- @javax.validation.constraints.NotNull
- val treeUrl: String,
- @javax.validation.constraints.NotNull
- override val url: String,
- override val viewerCanSubscribe: Boolean,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.SubscriptionStateTypeRefer])
- override val viewerSubscription: SubscriptionState,
- @javax.validation.constraints.NotNull
- val zipballUrl: String
-) extends Closer with IssueTimelineItem with PullRequestTimelineItem with Subscribable with Node with GitObject with UniformResourceLocatable {
-
- override def toString(): String = {
- scala.Seq(
- if (abbreviatedOid != null) "abbreviatedOid: " + GraphQLRequestSerializer.getEntry(abbreviatedOid) else "",
- "additions: " + GraphQLRequestSerializer.getEntry(additions),
- if (associatedPullRequests != null) "associatedPullRequests: " + GraphQLRequestSerializer.getEntry(associatedPullRequests) else "",
- if (author != null) "author: " + GraphQLRequestSerializer.getEntry(author) else "",
- "authoredByCommitter: " + GraphQLRequestSerializer.getEntry(authoredByCommitter),
- if (authoredDate != null) "authoredDate: " + GraphQLRequestSerializer.getEntry(authoredDate) else "",
- if (blame != null) "blame: " + GraphQLRequestSerializer.getEntry(blame) else "",
- "changedFiles: " + GraphQLRequestSerializer.getEntry(changedFiles),
- if (comments != null) "comments: " + GraphQLRequestSerializer.getEntry(comments) else "",
- if (commitResourcePath != null) "commitResourcePath: " + GraphQLRequestSerializer.getEntry(commitResourcePath) else "",
- if (commitUrl != null) "commitUrl: " + GraphQLRequestSerializer.getEntry(commitUrl) else "",
- if (committedDate != null) "committedDate: " + GraphQLRequestSerializer.getEntry(committedDate) else "",
- "committedViaWeb: " + GraphQLRequestSerializer.getEntry(committedViaWeb),
- if (committer != null) "committer: " + GraphQLRequestSerializer.getEntry(committer) else "",
- "deletions: " + GraphQLRequestSerializer.getEntry(deletions),
- if (deployments != null) "deployments: " + GraphQLRequestSerializer.getEntry(deployments) else "",
- if (history != null) "history: " + GraphQLRequestSerializer.getEntry(history) else "",
- if (id != null) "id: " + GraphQLRequestSerializer.getEntry(id) else "",
- if (message != null) "message: " + GraphQLRequestSerializer.getEntry(message) else "",
- if (messageBody != null) "messageBody: " + GraphQLRequestSerializer.getEntry(messageBody) else "",
- if (messageBodyHTML != null) "messageBodyHTML: " + GraphQLRequestSerializer.getEntry(messageBodyHTML) else "",
- if (messageHeadline != null) "messageHeadline: " + GraphQLRequestSerializer.getEntry(messageHeadline) else "",
- if (messageHeadlineHTML != null) "messageHeadlineHTML: " + GraphQLRequestSerializer.getEntry(messageHeadlineHTML) else "",
- if (oid != null) "oid: " + GraphQLRequestSerializer.getEntry(oid) else "",
- if (parents != null) "parents: " + GraphQLRequestSerializer.getEntry(parents) else "",
- if (pushedDate != null) "pushedDate: " + GraphQLRequestSerializer.getEntry(pushedDate) else "",
- if (repository != null) "repository: " + GraphQLRequestSerializer.getEntry(repository) else "",
- if (resourcePath != null) "resourcePath: " + GraphQLRequestSerializer.getEntry(resourcePath) else "",
- if (signature != null) "signature: " + GraphQLRequestSerializer.getEntry(signature) else "",
- if (status != null) "status: " + GraphQLRequestSerializer.getEntry(status) else "",
- if (tarballUrl != null) "tarballUrl: " + GraphQLRequestSerializer.getEntry(tarballUrl) else "",
- if (tree != null) "tree: " + GraphQLRequestSerializer.getEntry(tree) else "",
- if (treeResourcePath != null) "treeResourcePath: " + GraphQLRequestSerializer.getEntry(treeResourcePath) else "",
- if (treeUrl != null) "treeUrl: " + GraphQLRequestSerializer.getEntry(treeUrl) else "",
- if (url != null) "url: " + GraphQLRequestSerializer.getEntry(url) else "",
- "viewerCanSubscribe: " + GraphQLRequestSerializer.getEntry(viewerCanSubscribe),
- if (viewerSubscription != null) "viewerSubscription: " + GraphQLRequestSerializer.getEntry(viewerSubscription) else "",
- if (zipballUrl != null) "zipballUrl: " + GraphQLRequestSerializer.getEntry(zipballUrl) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[Commit]
- Objects.equals(abbreviatedOid, that.abbreviatedOid) &&
- Objects.equals(additions, that.additions) &&
- Objects.equals(associatedPullRequests, that.associatedPullRequests) &&
- Objects.equals(author, that.author) &&
- Objects.equals(authoredByCommitter, that.authoredByCommitter) &&
- Objects.equals(authoredDate, that.authoredDate) &&
- Objects.equals(blame, that.blame) &&
- Objects.equals(changedFiles, that.changedFiles) &&
- Objects.equals(comments, that.comments) &&
- Objects.equals(commitResourcePath, that.commitResourcePath) &&
- Objects.equals(commitUrl, that.commitUrl) &&
- Objects.equals(committedDate, that.committedDate) &&
- Objects.equals(committedViaWeb, that.committedViaWeb) &&
- Objects.equals(committer, that.committer) &&
- Objects.equals(deletions, that.deletions) &&
- Objects.equals(deployments, that.deployments) &&
- Objects.equals(history, that.history) &&
- Objects.equals(id, that.id) &&
- Objects.equals(message, that.message) &&
- Objects.equals(messageBody, that.messageBody) &&
- Objects.equals(messageBodyHTML, that.messageBodyHTML) &&
- Objects.equals(messageHeadline, that.messageHeadline) &&
- Objects.equals(messageHeadlineHTML, that.messageHeadlineHTML) &&
- Objects.equals(oid, that.oid) &&
- Objects.equals(parents, that.parents) &&
- Objects.equals(pushedDate, that.pushedDate) &&
- Objects.equals(repository, that.repository) &&
- Objects.equals(resourcePath, that.resourcePath) &&
- Objects.equals(signature, that.signature) &&
- Objects.equals(status, that.status) &&
- Objects.equals(tarballUrl, that.tarballUrl) &&
- Objects.equals(tree, that.tree) &&
- Objects.equals(treeResourcePath, that.treeResourcePath) &&
- Objects.equals(treeUrl, that.treeUrl) &&
- Objects.equals(url, that.url) &&
- Objects.equals(viewerCanSubscribe, that.viewerCanSubscribe) &&
- Objects.equals(viewerSubscription, that.viewerSubscription) &&
- Objects.equals(zipballUrl, that.zipballUrl)
- }
-
- override def hashCode(): Int = {
- Objects.hash(abbreviatedOid, additions, associatedPullRequests, author, authoredByCommitter, authoredDate, blame, changedFiles, comments, commitResourcePath, commitUrl, committedDate, committedViaWeb, committer, deletions, deployments, history, id, message, messageBody, messageBodyHTML, messageHeadline, messageHeadlineHTML, oid, parents, pushedDate, repository, resourcePath, signature, status, tarballUrl, tree, treeResourcePath, treeUrl, url, viewerCanSubscribe, viewerSubscription, zipballUrl)
- }
-}
-
-object Commit {
-
- def builder(): Commit.Builder = new Builder()
-
- class Builder {
-
- private var abbreviatedOid: String = _
- private var additions: Int = _
- private var associatedPullRequests: PullRequestConnection = _
- private var author: GitActor = _
- private var authoredByCommitter: Boolean = _
- private var authoredDate: String = _
- private var blame: Blame = _
- private var changedFiles: Int = _
- private var comments: CommitCommentConnection = _
- private var commitResourcePath: String = _
- private var commitUrl: String = _
- private var committedDate: String = _
- private var committedViaWeb: Boolean = _
- private var committer: GitActor = _
- private var deletions: Int = _
- private var deployments: DeploymentConnection = _
- private var history: CommitHistoryConnection = _
- private var id: String = _
- private var message: String = _
- private var messageBody: String = _
- private var messageBodyHTML: String = _
- private var messageHeadline: String = _
- private var messageHeadlineHTML: String = _
- private var oid: String = _
- private var parents: CommitConnection = _
- private var pushedDate: String = _
- private var repository: Repository = _
- private var resourcePath: String = _
- private var signature: GitSignature = _
- private var status: Status = _
- private var tarballUrl: String = _
- private var tree: Tree = _
- private var treeResourcePath: String = _
- private var treeUrl: String = _
- private var url: String = _
- private var viewerCanSubscribe: Boolean = _
- private var viewerSubscription: SubscriptionState = _
- private var zipballUrl: String = _
-
- def setAbbreviatedOid(abbreviatedOid: String): Builder = {
- this.abbreviatedOid = abbreviatedOid
- this
- }
-
- def setAdditions(additions: Int): Builder = {
- this.additions = additions
- this
- }
-
- def setAssociatedPullRequests(associatedPullRequests: PullRequestConnection): Builder = {
- this.associatedPullRequests = associatedPullRequests
- this
- }
-
- def setAuthor(author: GitActor): Builder = {
- this.author = author
- this
- }
-
- def setAuthoredByCommitter(authoredByCommitter: Boolean): Builder = {
- this.authoredByCommitter = authoredByCommitter
- this
- }
-
- def setAuthoredDate(authoredDate: String): Builder = {
- this.authoredDate = authoredDate
- this
- }
-
- def setBlame(blame: Blame): Builder = {
- this.blame = blame
- this
- }
-
- def setChangedFiles(changedFiles: Int): Builder = {
- this.changedFiles = changedFiles
- this
- }
-
- def setComments(comments: CommitCommentConnection): Builder = {
- this.comments = comments
- this
- }
-
- def setCommitResourcePath(commitResourcePath: String): Builder = {
- this.commitResourcePath = commitResourcePath
- this
- }
-
- def setCommitUrl(commitUrl: String): Builder = {
- this.commitUrl = commitUrl
- this
- }
-
- def setCommittedDate(committedDate: String): Builder = {
- this.committedDate = committedDate
- this
- }
-
- def setCommittedViaWeb(committedViaWeb: Boolean): Builder = {
- this.committedViaWeb = committedViaWeb
- this
- }
-
- def setCommitter(committer: GitActor): Builder = {
- this.committer = committer
- this
- }
-
- def setDeletions(deletions: Int): Builder = {
- this.deletions = deletions
- this
- }
-
- def setDeployments(deployments: DeploymentConnection): Builder = {
- this.deployments = deployments
- this
- }
-
- def setHistory(history: CommitHistoryConnection): Builder = {
- this.history = history
- this
- }
-
- def setId(id: String): Builder = {
- this.id = id
- this
- }
-
- def setMessage(message: String): Builder = {
- this.message = message
- this
- }
-
- def setMessageBody(messageBody: String): Builder = {
- this.messageBody = messageBody
- this
- }
-
- def setMessageBodyHTML(messageBodyHTML: String): Builder = {
- this.messageBodyHTML = messageBodyHTML
- this
- }
-
- def setMessageHeadline(messageHeadline: String): Builder = {
- this.messageHeadline = messageHeadline
- this
- }
-
- def setMessageHeadlineHTML(messageHeadlineHTML: String): Builder = {
- this.messageHeadlineHTML = messageHeadlineHTML
- this
- }
-
- def setOid(oid: String): Builder = {
- this.oid = oid
- this
- }
-
- def setParents(parents: CommitConnection): Builder = {
- this.parents = parents
- this
- }
-
- def setPushedDate(pushedDate: String): Builder = {
- this.pushedDate = pushedDate
- this
- }
-
- def setRepository(repository: Repository): Builder = {
- this.repository = repository
- this
- }
-
- def setResourcePath(resourcePath: String): Builder = {
- this.resourcePath = resourcePath
- this
- }
-
- def setSignature(signature: GitSignature): Builder = {
- this.signature = signature
- this
- }
-
- def setStatus(status: Status): Builder = {
- this.status = status
- this
- }
-
- def setTarballUrl(tarballUrl: String): Builder = {
- this.tarballUrl = tarballUrl
- this
- }
-
- def setTree(tree: Tree): Builder = {
- this.tree = tree
- this
- }
-
- def setTreeResourcePath(treeResourcePath: String): Builder = {
- this.treeResourcePath = treeResourcePath
- this
- }
-
- def setTreeUrl(treeUrl: String): Builder = {
- this.treeUrl = treeUrl
- this
- }
-
- def setUrl(url: String): Builder = {
- this.url = url
- this
- }
-
- def setViewerCanSubscribe(viewerCanSubscribe: Boolean): Builder = {
- this.viewerCanSubscribe = viewerCanSubscribe
- this
- }
-
- def setViewerSubscription(viewerSubscription: SubscriptionState): Builder = {
- this.viewerSubscription = viewerSubscription
- this
- }
-
- def setZipballUrl(zipballUrl: String): Builder = {
- this.zipballUrl = zipballUrl
- this
- }
-
- def build(): Commit = new Commit(abbreviatedOid, additions, associatedPullRequests, author, authoredByCommitter, authoredDate, blame, changedFiles, comments, commitResourcePath, commitUrl, committedDate, committedViaWeb, committer, deletions, deployments, history, id, message, messageBody, messageBodyHTML, messageHeadline, messageHeadlineHTML, oid, parents, pushedDate, repository, resourcePath, signature, status, tarballUrl, tree, treeResourcePath, treeUrl, url, viewerCanSubscribe, viewerSubscription, zipballUrl)
-
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/Commit_normal_class_var_fields.scala.txt b/src/test/resources/expected-classes/scala/Commit_normal_class_var_fields.scala.txt
deleted file mode 100644
index f4b560c7c..000000000
--- a/src/test/resources/expected-classes/scala/Commit_normal_class_var_fields.scala.txt
+++ /dev/null
@@ -1,412 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import java.util.Objects
-import scala.collection.JavaConverters._
-import SubscriptionState._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class Commit(
- @javax.validation.constraints.NotNull
- override var abbreviatedOid: String,
- var additions: Int,
- var associatedPullRequests: PullRequestConnection,
- var author: GitActor,
- var authoredByCommitter: Boolean,
- @javax.validation.constraints.NotNull
- var authoredDate: String,
- @javax.validation.constraints.NotNull
- var blame: Blame,
- var changedFiles: Int,
- @javax.validation.constraints.NotNull
- var comments: CommitCommentConnection,
- @javax.validation.constraints.NotNull
- override var commitResourcePath: String,
- @javax.validation.constraints.NotNull
- override var commitUrl: String,
- @javax.validation.constraints.NotNull
- var committedDate: String,
- var committedViaWeb: Boolean,
- var committer: GitActor,
- var deletions: Int,
- var deployments: DeploymentConnection,
- @javax.validation.constraints.NotNull
- var history: CommitHistoryConnection,
- @javax.validation.constraints.NotNull
- override var id: String,
- @javax.validation.constraints.NotNull
- var message: String,
- @javax.validation.constraints.NotNull
- var messageBody: String,
- @javax.validation.constraints.NotNull
- var messageBodyHTML: String,
- @javax.validation.constraints.NotNull
- var messageHeadline: String,
- @javax.validation.constraints.NotNull
- var messageHeadlineHTML: String,
- @javax.validation.constraints.NotNull
- override var oid: String,
- @javax.validation.constraints.NotNull
- var parents: CommitConnection,
- var pushedDate: String,
- @javax.validation.constraints.NotNull
- override var repository: Repository,
- @javax.validation.constraints.NotNull
- override var resourcePath: String,
- var signature: GitSignature,
- var status: Status,
- @javax.validation.constraints.NotNull
- var tarballUrl: String,
- @javax.validation.constraints.NotNull
- var tree: Tree,
- @javax.validation.constraints.NotNull
- var treeResourcePath: String,
- @javax.validation.constraints.NotNull
- var treeUrl: String,
- @javax.validation.constraints.NotNull
- override var url: String,
- override var viewerCanSubscribe: Boolean,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.SubscriptionStateTypeRefer])
- override var viewerSubscription: SubscriptionState,
- @javax.validation.constraints.NotNull
- var zipballUrl: String
-) extends Closer with IssueTimelineItem with PullRequestTimelineItem with Subscribable with Node with GitObject with UniformResourceLocatable {
-
- override def toString(): String = {
- scala.Seq(
- if (abbreviatedOid != null) "abbreviatedOid: " + GraphQLRequestSerializer.getEntry(abbreviatedOid) else "",
- "additions: " + GraphQLRequestSerializer.getEntry(additions),
- if (associatedPullRequests != null) "associatedPullRequests: " + GraphQLRequestSerializer.getEntry(associatedPullRequests) else "",
- if (author != null) "author: " + GraphQLRequestSerializer.getEntry(author) else "",
- "authoredByCommitter: " + GraphQLRequestSerializer.getEntry(authoredByCommitter),
- if (authoredDate != null) "authoredDate: " + GraphQLRequestSerializer.getEntry(authoredDate) else "",
- if (blame != null) "blame: " + GraphQLRequestSerializer.getEntry(blame) else "",
- "changedFiles: " + GraphQLRequestSerializer.getEntry(changedFiles),
- if (comments != null) "comments: " + GraphQLRequestSerializer.getEntry(comments) else "",
- if (commitResourcePath != null) "commitResourcePath: " + GraphQLRequestSerializer.getEntry(commitResourcePath) else "",
- if (commitUrl != null) "commitUrl: " + GraphQLRequestSerializer.getEntry(commitUrl) else "",
- if (committedDate != null) "committedDate: " + GraphQLRequestSerializer.getEntry(committedDate) else "",
- "committedViaWeb: " + GraphQLRequestSerializer.getEntry(committedViaWeb),
- if (committer != null) "committer: " + GraphQLRequestSerializer.getEntry(committer) else "",
- "deletions: " + GraphQLRequestSerializer.getEntry(deletions),
- if (deployments != null) "deployments: " + GraphQLRequestSerializer.getEntry(deployments) else "",
- if (history != null) "history: " + GraphQLRequestSerializer.getEntry(history) else "",
- if (id != null) "id: " + GraphQLRequestSerializer.getEntry(id) else "",
- if (message != null) "message: " + GraphQLRequestSerializer.getEntry(message) else "",
- if (messageBody != null) "messageBody: " + GraphQLRequestSerializer.getEntry(messageBody) else "",
- if (messageBodyHTML != null) "messageBodyHTML: " + GraphQLRequestSerializer.getEntry(messageBodyHTML) else "",
- if (messageHeadline != null) "messageHeadline: " + GraphQLRequestSerializer.getEntry(messageHeadline) else "",
- if (messageHeadlineHTML != null) "messageHeadlineHTML: " + GraphQLRequestSerializer.getEntry(messageHeadlineHTML) else "",
- if (oid != null) "oid: " + GraphQLRequestSerializer.getEntry(oid) else "",
- if (parents != null) "parents: " + GraphQLRequestSerializer.getEntry(parents) else "",
- if (pushedDate != null) "pushedDate: " + GraphQLRequestSerializer.getEntry(pushedDate) else "",
- if (repository != null) "repository: " + GraphQLRequestSerializer.getEntry(repository) else "",
- if (resourcePath != null) "resourcePath: " + GraphQLRequestSerializer.getEntry(resourcePath) else "",
- if (signature != null) "signature: " + GraphQLRequestSerializer.getEntry(signature) else "",
- if (status != null) "status: " + GraphQLRequestSerializer.getEntry(status) else "",
- if (tarballUrl != null) "tarballUrl: " + GraphQLRequestSerializer.getEntry(tarballUrl) else "",
- if (tree != null) "tree: " + GraphQLRequestSerializer.getEntry(tree) else "",
- if (treeResourcePath != null) "treeResourcePath: " + GraphQLRequestSerializer.getEntry(treeResourcePath) else "",
- if (treeUrl != null) "treeUrl: " + GraphQLRequestSerializer.getEntry(treeUrl) else "",
- if (url != null) "url: " + GraphQLRequestSerializer.getEntry(url) else "",
- "viewerCanSubscribe: " + GraphQLRequestSerializer.getEntry(viewerCanSubscribe),
- if (viewerSubscription != null) "viewerSubscription: " + GraphQLRequestSerializer.getEntry(viewerSubscription) else "",
- if (zipballUrl != null) "zipballUrl: " + GraphQLRequestSerializer.getEntry(zipballUrl) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[Commit]
- Objects.equals(abbreviatedOid, that.abbreviatedOid) &&
- Objects.equals(additions, that.additions) &&
- Objects.equals(associatedPullRequests, that.associatedPullRequests) &&
- Objects.equals(author, that.author) &&
- Objects.equals(authoredByCommitter, that.authoredByCommitter) &&
- Objects.equals(authoredDate, that.authoredDate) &&
- Objects.equals(blame, that.blame) &&
- Objects.equals(changedFiles, that.changedFiles) &&
- Objects.equals(comments, that.comments) &&
- Objects.equals(commitResourcePath, that.commitResourcePath) &&
- Objects.equals(commitUrl, that.commitUrl) &&
- Objects.equals(committedDate, that.committedDate) &&
- Objects.equals(committedViaWeb, that.committedViaWeb) &&
- Objects.equals(committer, that.committer) &&
- Objects.equals(deletions, that.deletions) &&
- Objects.equals(deployments, that.deployments) &&
- Objects.equals(history, that.history) &&
- Objects.equals(id, that.id) &&
- Objects.equals(message, that.message) &&
- Objects.equals(messageBody, that.messageBody) &&
- Objects.equals(messageBodyHTML, that.messageBodyHTML) &&
- Objects.equals(messageHeadline, that.messageHeadline) &&
- Objects.equals(messageHeadlineHTML, that.messageHeadlineHTML) &&
- Objects.equals(oid, that.oid) &&
- Objects.equals(parents, that.parents) &&
- Objects.equals(pushedDate, that.pushedDate) &&
- Objects.equals(repository, that.repository) &&
- Objects.equals(resourcePath, that.resourcePath) &&
- Objects.equals(signature, that.signature) &&
- Objects.equals(status, that.status) &&
- Objects.equals(tarballUrl, that.tarballUrl) &&
- Objects.equals(tree, that.tree) &&
- Objects.equals(treeResourcePath, that.treeResourcePath) &&
- Objects.equals(treeUrl, that.treeUrl) &&
- Objects.equals(url, that.url) &&
- Objects.equals(viewerCanSubscribe, that.viewerCanSubscribe) &&
- Objects.equals(viewerSubscription, that.viewerSubscription) &&
- Objects.equals(zipballUrl, that.zipballUrl)
- }
-
- override def hashCode(): Int = {
- Objects.hash(abbreviatedOid, additions, associatedPullRequests, author, authoredByCommitter, authoredDate, blame, changedFiles, comments, commitResourcePath, commitUrl, committedDate, committedViaWeb, committer, deletions, deployments, history, id, message, messageBody, messageBodyHTML, messageHeadline, messageHeadlineHTML, oid, parents, pushedDate, repository, resourcePath, signature, status, tarballUrl, tree, treeResourcePath, treeUrl, url, viewerCanSubscribe, viewerSubscription, zipballUrl)
- }
-}
-
-object Commit {
-
- def builder(): Commit.Builder = new Builder()
-
- class Builder {
-
- private var abbreviatedOid: String = _
- private var additions: Int = _
- private var associatedPullRequests: PullRequestConnection = _
- private var author: GitActor = _
- private var authoredByCommitter: Boolean = _
- private var authoredDate: String = _
- private var blame: Blame = _
- private var changedFiles: Int = _
- private var comments: CommitCommentConnection = _
- private var commitResourcePath: String = _
- private var commitUrl: String = _
- private var committedDate: String = _
- private var committedViaWeb: Boolean = _
- private var committer: GitActor = _
- private var deletions: Int = _
- private var deployments: DeploymentConnection = _
- private var history: CommitHistoryConnection = _
- private var id: String = _
- private var message: String = _
- private var messageBody: String = _
- private var messageBodyHTML: String = _
- private var messageHeadline: String = _
- private var messageHeadlineHTML: String = _
- private var oid: String = _
- private var parents: CommitConnection = _
- private var pushedDate: String = _
- private var repository: Repository = _
- private var resourcePath: String = _
- private var signature: GitSignature = _
- private var status: Status = _
- private var tarballUrl: String = _
- private var tree: Tree = _
- private var treeResourcePath: String = _
- private var treeUrl: String = _
- private var url: String = _
- private var viewerCanSubscribe: Boolean = _
- private var viewerSubscription: SubscriptionState = _
- private var zipballUrl: String = _
-
- def setAbbreviatedOid(abbreviatedOid: String): Builder = {
- this.abbreviatedOid = abbreviatedOid
- this
- }
-
- def setAdditions(additions: Int): Builder = {
- this.additions = additions
- this
- }
-
- def setAssociatedPullRequests(associatedPullRequests: PullRequestConnection): Builder = {
- this.associatedPullRequests = associatedPullRequests
- this
- }
-
- def setAuthor(author: GitActor): Builder = {
- this.author = author
- this
- }
-
- def setAuthoredByCommitter(authoredByCommitter: Boolean): Builder = {
- this.authoredByCommitter = authoredByCommitter
- this
- }
-
- def setAuthoredDate(authoredDate: String): Builder = {
- this.authoredDate = authoredDate
- this
- }
-
- def setBlame(blame: Blame): Builder = {
- this.blame = blame
- this
- }
-
- def setChangedFiles(changedFiles: Int): Builder = {
- this.changedFiles = changedFiles
- this
- }
-
- def setComments(comments: CommitCommentConnection): Builder = {
- this.comments = comments
- this
- }
-
- def setCommitResourcePath(commitResourcePath: String): Builder = {
- this.commitResourcePath = commitResourcePath
- this
- }
-
- def setCommitUrl(commitUrl: String): Builder = {
- this.commitUrl = commitUrl
- this
- }
-
- def setCommittedDate(committedDate: String): Builder = {
- this.committedDate = committedDate
- this
- }
-
- def setCommittedViaWeb(committedViaWeb: Boolean): Builder = {
- this.committedViaWeb = committedViaWeb
- this
- }
-
- def setCommitter(committer: GitActor): Builder = {
- this.committer = committer
- this
- }
-
- def setDeletions(deletions: Int): Builder = {
- this.deletions = deletions
- this
- }
-
- def setDeployments(deployments: DeploymentConnection): Builder = {
- this.deployments = deployments
- this
- }
-
- def setHistory(history: CommitHistoryConnection): Builder = {
- this.history = history
- this
- }
-
- def setId(id: String): Builder = {
- this.id = id
- this
- }
-
- def setMessage(message: String): Builder = {
- this.message = message
- this
- }
-
- def setMessageBody(messageBody: String): Builder = {
- this.messageBody = messageBody
- this
- }
-
- def setMessageBodyHTML(messageBodyHTML: String): Builder = {
- this.messageBodyHTML = messageBodyHTML
- this
- }
-
- def setMessageHeadline(messageHeadline: String): Builder = {
- this.messageHeadline = messageHeadline
- this
- }
-
- def setMessageHeadlineHTML(messageHeadlineHTML: String): Builder = {
- this.messageHeadlineHTML = messageHeadlineHTML
- this
- }
-
- def setOid(oid: String): Builder = {
- this.oid = oid
- this
- }
-
- def setParents(parents: CommitConnection): Builder = {
- this.parents = parents
- this
- }
-
- def setPushedDate(pushedDate: String): Builder = {
- this.pushedDate = pushedDate
- this
- }
-
- def setRepository(repository: Repository): Builder = {
- this.repository = repository
- this
- }
-
- def setResourcePath(resourcePath: String): Builder = {
- this.resourcePath = resourcePath
- this
- }
-
- def setSignature(signature: GitSignature): Builder = {
- this.signature = signature
- this
- }
-
- def setStatus(status: Status): Builder = {
- this.status = status
- this
- }
-
- def setTarballUrl(tarballUrl: String): Builder = {
- this.tarballUrl = tarballUrl
- this
- }
-
- def setTree(tree: Tree): Builder = {
- this.tree = tree
- this
- }
-
- def setTreeResourcePath(treeResourcePath: String): Builder = {
- this.treeResourcePath = treeResourcePath
- this
- }
-
- def setTreeUrl(treeUrl: String): Builder = {
- this.treeUrl = treeUrl
- this
- }
-
- def setUrl(url: String): Builder = {
- this.url = url
- this
- }
-
- def setViewerCanSubscribe(viewerCanSubscribe: Boolean): Builder = {
- this.viewerCanSubscribe = viewerCanSubscribe
- this
- }
-
- def setViewerSubscription(viewerSubscription: SubscriptionState): Builder = {
- this.viewerSubscription = viewerSubscription
- this
- }
-
- def setZipballUrl(zipballUrl: String): Builder = {
- this.zipballUrl = zipballUrl
- this
- }
-
- def build(): Commit = new Commit(abbreviatedOid, additions, associatedPullRequests, author, authoredByCommitter, authoredDate, blame, changedFiles, comments, commitResourcePath, commitUrl, committedDate, committedViaWeb, committer, deletions, deployments, history, id, message, messageBody, messageBodyHTML, messageHeadline, messageHeadlineHTML, oid, parents, pushedDate, repository, resourcePath, signature, status, tarballUrl, tree, treeResourcePath, treeUrl, url, viewerCanSubscribe, viewerSubscription, zipballUrl)
-
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/Commit_withPrimitives.scala.txt b/src/test/resources/expected-classes/scala/Commit_withPrimitives.scala.txt
deleted file mode 100644
index 2595aa34f..000000000
--- a/src/test/resources/expected-classes/scala/Commit_withPrimitives.scala.txt
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-import SubscriptionState._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Commit(
- @javax.validation.constraints.NotNull
- override val abbreviatedOid: String,
- additions: Int,
- associatedPullRequests: PullRequestConnection,
- author: GitActor,
- authoredByCommitter: Boolean,
- @javax.validation.constraints.NotNull
- authoredDate: String,
- @javax.validation.constraints.NotNull
- blame: Blame,
- changedFiles: Int,
- @javax.validation.constraints.NotNull
- comments: CommitCommentConnection,
- @javax.validation.constraints.NotNull
- override val commitResourcePath: String,
- @javax.validation.constraints.NotNull
- override val commitUrl: String,
- @javax.validation.constraints.NotNull
- committedDate: String,
- committedViaWeb: Boolean,
- committer: GitActor,
- deletions: Int,
- deployments: DeploymentConnection,
- @javax.validation.constraints.NotNull
- history: CommitHistoryConnection,
- @javax.validation.constraints.NotNull
- override val id: String,
- @javax.validation.constraints.NotNull
- message: String,
- @javax.validation.constraints.NotNull
- messageBody: String,
- @javax.validation.constraints.NotNull
- messageBodyHTML: String,
- @javax.validation.constraints.NotNull
- messageHeadline: String,
- @javax.validation.constraints.NotNull
- messageHeadlineHTML: String,
- @javax.validation.constraints.NotNull
- override val oid: String,
- @javax.validation.constraints.NotNull
- parents: CommitConnection,
- pushedDate: String,
- @javax.validation.constraints.NotNull
- override val repository: Repository,
- @javax.validation.constraints.NotNull
- override val resourcePath: String,
- signature: GitSignature,
- status: Status,
- @javax.validation.constraints.NotNull
- tarballUrl: String,
- @javax.validation.constraints.NotNull
- tree: Tree,
- @javax.validation.constraints.NotNull
- treeResourcePath: String,
- @javax.validation.constraints.NotNull
- treeUrl: String,
- @javax.validation.constraints.NotNull
- override val url: String,
- override val viewerCanSubscribe: Boolean,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.SubscriptionStateTypeRefer])
- override val viewerSubscription: SubscriptionState,
- @javax.validation.constraints.NotNull
- zipballUrl: String
-) extends Closer with IssueTimelineItem with PullRequestTimelineItem with Subscribable with Node with GitObject with UniformResourceLocatable {
-
- override def toString(): String = {
- scala.Seq(
- if (abbreviatedOid != null) "abbreviatedOid: " + GraphQLRequestSerializer.getEntry(abbreviatedOid) else "",
- "additions: " + GraphQLRequestSerializer.getEntry(additions),
- if (associatedPullRequests != null) "associatedPullRequests: " + GraphQLRequestSerializer.getEntry(associatedPullRequests) else "",
- if (author != null) "author: " + GraphQLRequestSerializer.getEntry(author) else "",
- "authoredByCommitter: " + GraphQLRequestSerializer.getEntry(authoredByCommitter),
- if (authoredDate != null) "authoredDate: " + GraphQLRequestSerializer.getEntry(authoredDate) else "",
- if (blame != null) "blame: " + GraphQLRequestSerializer.getEntry(blame) else "",
- "changedFiles: " + GraphQLRequestSerializer.getEntry(changedFiles),
- if (comments != null) "comments: " + GraphQLRequestSerializer.getEntry(comments) else "",
- if (commitResourcePath != null) "commitResourcePath: " + GraphQLRequestSerializer.getEntry(commitResourcePath) else "",
- if (commitUrl != null) "commitUrl: " + GraphQLRequestSerializer.getEntry(commitUrl) else "",
- if (committedDate != null) "committedDate: " + GraphQLRequestSerializer.getEntry(committedDate) else "",
- "committedViaWeb: " + GraphQLRequestSerializer.getEntry(committedViaWeb),
- if (committer != null) "committer: " + GraphQLRequestSerializer.getEntry(committer) else "",
- "deletions: " + GraphQLRequestSerializer.getEntry(deletions),
- if (deployments != null) "deployments: " + GraphQLRequestSerializer.getEntry(deployments) else "",
- if (history != null) "history: " + GraphQLRequestSerializer.getEntry(history) else "",
- if (id != null) "id: " + GraphQLRequestSerializer.getEntry(id) else "",
- if (message != null) "message: " + GraphQLRequestSerializer.getEntry(message) else "",
- if (messageBody != null) "messageBody: " + GraphQLRequestSerializer.getEntry(messageBody) else "",
- if (messageBodyHTML != null) "messageBodyHTML: " + GraphQLRequestSerializer.getEntry(messageBodyHTML) else "",
- if (messageHeadline != null) "messageHeadline: " + GraphQLRequestSerializer.getEntry(messageHeadline) else "",
- if (messageHeadlineHTML != null) "messageHeadlineHTML: " + GraphQLRequestSerializer.getEntry(messageHeadlineHTML) else "",
- if (oid != null) "oid: " + GraphQLRequestSerializer.getEntry(oid) else "",
- if (parents != null) "parents: " + GraphQLRequestSerializer.getEntry(parents) else "",
- if (pushedDate != null) "pushedDate: " + GraphQLRequestSerializer.getEntry(pushedDate) else "",
- if (repository != null) "repository: " + GraphQLRequestSerializer.getEntry(repository) else "",
- if (resourcePath != null) "resourcePath: " + GraphQLRequestSerializer.getEntry(resourcePath) else "",
- if (signature != null) "signature: " + GraphQLRequestSerializer.getEntry(signature) else "",
- if (status != null) "status: " + GraphQLRequestSerializer.getEntry(status) else "",
- if (tarballUrl != null) "tarballUrl: " + GraphQLRequestSerializer.getEntry(tarballUrl) else "",
- if (tree != null) "tree: " + GraphQLRequestSerializer.getEntry(tree) else "",
- if (treeResourcePath != null) "treeResourcePath: " + GraphQLRequestSerializer.getEntry(treeResourcePath) else "",
- if (treeUrl != null) "treeUrl: " + GraphQLRequestSerializer.getEntry(treeUrl) else "",
- if (url != null) "url: " + GraphQLRequestSerializer.getEntry(url) else "",
- "viewerCanSubscribe: " + GraphQLRequestSerializer.getEntry(viewerCanSubscribe),
- if (viewerSubscription != null) "viewerSubscription: " + GraphQLRequestSerializer.getEntry(viewerSubscription) else "",
- if (zipballUrl != null) "zipballUrl: " + GraphQLRequestSerializer.getEntry(zipballUrl) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/Commit_withoutPrimitives.scala.txt b/src/test/resources/expected-classes/scala/Commit_withoutPrimitives.scala.txt
deleted file mode 100644
index 3900ffc57..000000000
--- a/src/test/resources/expected-classes/scala/Commit_withoutPrimitives.scala.txt
+++ /dev/null
@@ -1,125 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-import SubscriptionState._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Commit(
- @javax.validation.constraints.NotNull
- override val abbreviatedOid: String,
- @javax.validation.constraints.NotNull
- additions: Integer,
- associatedPullRequests: PullRequestConnection,
- author: GitActor,
- @javax.validation.constraints.NotNull
- authoredByCommitter: java.lang.Boolean,
- @javax.validation.constraints.NotNull
- authoredDate: String,
- @javax.validation.constraints.NotNull
- blame: Blame,
- @javax.validation.constraints.NotNull
- changedFiles: Integer,
- @javax.validation.constraints.NotNull
- comments: CommitCommentConnection,
- @javax.validation.constraints.NotNull
- override val commitResourcePath: String,
- @javax.validation.constraints.NotNull
- override val commitUrl: String,
- @javax.validation.constraints.NotNull
- committedDate: String,
- @javax.validation.constraints.NotNull
- committedViaWeb: java.lang.Boolean,
- committer: GitActor,
- @javax.validation.constraints.NotNull
- deletions: Integer,
- deployments: DeploymentConnection,
- @javax.validation.constraints.NotNull
- history: CommitHistoryConnection,
- @javax.validation.constraints.NotNull
- override val id: String,
- @javax.validation.constraints.NotNull
- message: String,
- @javax.validation.constraints.NotNull
- messageBody: String,
- @javax.validation.constraints.NotNull
- messageBodyHTML: String,
- @javax.validation.constraints.NotNull
- messageHeadline: String,
- @javax.validation.constraints.NotNull
- messageHeadlineHTML: String,
- @javax.validation.constraints.NotNull
- override val oid: String,
- @javax.validation.constraints.NotNull
- parents: CommitConnection,
- pushedDate: String,
- @javax.validation.constraints.NotNull
- override val repository: Repository,
- @javax.validation.constraints.NotNull
- override val resourcePath: String,
- signature: GitSignature,
- status: Status,
- @javax.validation.constraints.NotNull
- tarballUrl: String,
- @javax.validation.constraints.NotNull
- tree: Tree,
- @javax.validation.constraints.NotNull
- treeResourcePath: String,
- @javax.validation.constraints.NotNull
- treeUrl: String,
- @javax.validation.constraints.NotNull
- override val url: String,
- @javax.validation.constraints.NotNull
- override val viewerCanSubscribe: java.lang.Boolean,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.SubscriptionStateTypeRefer])
- override val viewerSubscription: SubscriptionState,
- @javax.validation.constraints.NotNull
- zipballUrl: String
-) extends Closer with IssueTimelineItem with PullRequestTimelineItem with Subscribable with Node with GitObject with UniformResourceLocatable {
-
- override def toString(): String = {
- scala.Seq(
- if (abbreviatedOid != null) "abbreviatedOid: " + GraphQLRequestSerializer.getEntry(abbreviatedOid) else "",
- if (additions != null) "additions: " + GraphQLRequestSerializer.getEntry(additions) else "",
- if (associatedPullRequests != null) "associatedPullRequests: " + GraphQLRequestSerializer.getEntry(associatedPullRequests) else "",
- if (author != null) "author: " + GraphQLRequestSerializer.getEntry(author) else "",
- if (authoredByCommitter != null) "authoredByCommitter: " + GraphQLRequestSerializer.getEntry(authoredByCommitter) else "",
- if (authoredDate != null) "authoredDate: " + GraphQLRequestSerializer.getEntry(authoredDate) else "",
- if (blame != null) "blame: " + GraphQLRequestSerializer.getEntry(blame) else "",
- if (changedFiles != null) "changedFiles: " + GraphQLRequestSerializer.getEntry(changedFiles) else "",
- if (comments != null) "comments: " + GraphQLRequestSerializer.getEntry(comments) else "",
- if (commitResourcePath != null) "commitResourcePath: " + GraphQLRequestSerializer.getEntry(commitResourcePath) else "",
- if (commitUrl != null) "commitUrl: " + GraphQLRequestSerializer.getEntry(commitUrl) else "",
- if (committedDate != null) "committedDate: " + GraphQLRequestSerializer.getEntry(committedDate) else "",
- if (committedViaWeb != null) "committedViaWeb: " + GraphQLRequestSerializer.getEntry(committedViaWeb) else "",
- if (committer != null) "committer: " + GraphQLRequestSerializer.getEntry(committer) else "",
- if (deletions != null) "deletions: " + GraphQLRequestSerializer.getEntry(deletions) else "",
- if (deployments != null) "deployments: " + GraphQLRequestSerializer.getEntry(deployments) else "",
- if (history != null) "history: " + GraphQLRequestSerializer.getEntry(history) else "",
- if (id != null) "id: " + GraphQLRequestSerializer.getEntry(id) else "",
- if (message != null) "message: " + GraphQLRequestSerializer.getEntry(message) else "",
- if (messageBody != null) "messageBody: " + GraphQLRequestSerializer.getEntry(messageBody) else "",
- if (messageBodyHTML != null) "messageBodyHTML: " + GraphQLRequestSerializer.getEntry(messageBodyHTML) else "",
- if (messageHeadline != null) "messageHeadline: " + GraphQLRequestSerializer.getEntry(messageHeadline) else "",
- if (messageHeadlineHTML != null) "messageHeadlineHTML: " + GraphQLRequestSerializer.getEntry(messageHeadlineHTML) else "",
- if (oid != null) "oid: " + GraphQLRequestSerializer.getEntry(oid) else "",
- if (parents != null) "parents: " + GraphQLRequestSerializer.getEntry(parents) else "",
- if (pushedDate != null) "pushedDate: " + GraphQLRequestSerializer.getEntry(pushedDate) else "",
- if (repository != null) "repository: " + GraphQLRequestSerializer.getEntry(repository) else "",
- if (resourcePath != null) "resourcePath: " + GraphQLRequestSerializer.getEntry(resourcePath) else "",
- if (signature != null) "signature: " + GraphQLRequestSerializer.getEntry(signature) else "",
- if (status != null) "status: " + GraphQLRequestSerializer.getEntry(status) else "",
- if (tarballUrl != null) "tarballUrl: " + GraphQLRequestSerializer.getEntry(tarballUrl) else "",
- if (tree != null) "tree: " + GraphQLRequestSerializer.getEntry(tree) else "",
- if (treeResourcePath != null) "treeResourcePath: " + GraphQLRequestSerializer.getEntry(treeResourcePath) else "",
- if (treeUrl != null) "treeUrl: " + GraphQLRequestSerializer.getEntry(treeUrl) else "",
- if (url != null) "url: " + GraphQLRequestSerializer.getEntry(url) else "",
- if (viewerCanSubscribe != null) "viewerCanSubscribe: " + GraphQLRequestSerializer.getEntry(viewerCanSubscribe) else "",
- if (viewerSubscription != null) "viewerSubscription: " + GraphQLRequestSerializer.getEntry(viewerSubscription) else "",
- if (zipballUrl != null) "zipballUrl: " + GraphQLRequestSerializer.getEntry(zipballUrl) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/GithubAcceptTopicSuggestionInputTO.scala.txt b/src/test/resources/expected-classes/scala/GithubAcceptTopicSuggestionInputTO.scala.txt
deleted file mode 100644
index 84ae4e8a6..000000000
--- a/src/test/resources/expected-classes/scala/GithubAcceptTopicSuggestionInputTO.scala.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class GithubAcceptTopicSuggestionInputTO(
- clientMutationId: String,
- @javax.validation.constraints.NotNull
- name: String,
- @javax.validation.constraints.NotNull
- repositoryId: String
-) {
-
- override def toString(): String = {
- scala.Seq(
- if (clientMutationId != null) "clientMutationId: " + GraphQLRequestSerializer.getEntry(clientMutationId) else "",
- if (name != null) "name: " + GraphQLRequestSerializer.getEntry(name) else "",
- if (repositoryId != null) "repositoryId: " + GraphQLRequestSerializer.getEntry(repositoryId) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/GithubCommitTO.scala.txt b/src/test/resources/expected-classes/scala/GithubCommitTO.scala.txt
deleted file mode 100644
index a2aeaa058..000000000
--- a/src/test/resources/expected-classes/scala/GithubCommitTO.scala.txt
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-import GithubSubscriptionStateTO._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class GithubCommitTO(
- @javax.validation.constraints.NotNull
- override val abbreviatedOid: String,
- additions: Int,
- associatedPullRequests: GithubPullRequestConnectionTO,
- author: GithubGitActorTO,
- authoredByCommitter: Boolean,
- @javax.validation.constraints.NotNull
- authoredDate: String,
- @javax.validation.constraints.NotNull
- blame: GithubBlameTO,
- changedFiles: Int,
- @javax.validation.constraints.NotNull
- comments: GithubCommitCommentConnectionTO,
- @javax.validation.constraints.NotNull
- override val commitResourcePath: String,
- @javax.validation.constraints.NotNull
- override val commitUrl: String,
- @javax.validation.constraints.NotNull
- committedDate: String,
- committedViaWeb: Boolean,
- committer: GithubGitActorTO,
- deletions: Int,
- deployments: GithubDeploymentConnectionTO,
- @javax.validation.constraints.NotNull
- history: GithubCommitHistoryConnectionTO,
- @javax.validation.constraints.NotNull
- override val id: String,
- @javax.validation.constraints.NotNull
- message: String,
- @javax.validation.constraints.NotNull
- messageBody: String,
- @javax.validation.constraints.NotNull
- messageBodyHTML: String,
- @javax.validation.constraints.NotNull
- messageHeadline: String,
- @javax.validation.constraints.NotNull
- messageHeadlineHTML: String,
- @javax.validation.constraints.NotNull
- override val oid: String,
- @javax.validation.constraints.NotNull
- parents: GithubCommitConnectionTO,
- pushedDate: String,
- @javax.validation.constraints.NotNull
- override val repository: GithubRepositoryTO,
- @javax.validation.constraints.NotNull
- override val resourcePath: String,
- signature: GithubGitSignatureTO,
- status: GithubStatusTO,
- @javax.validation.constraints.NotNull
- tarballUrl: String,
- @javax.validation.constraints.NotNull
- tree: GithubTreeTO,
- @javax.validation.constraints.NotNull
- treeResourcePath: String,
- @javax.validation.constraints.NotNull
- treeUrl: String,
- @javax.validation.constraints.NotNull
- override val url: String,
- override val viewerCanSubscribe: Boolean,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.GithubSubscriptionStateTOTypeRefer])
- override val viewerSubscription: GithubSubscriptionStateTO,
- @javax.validation.constraints.NotNull
- zipballUrl: String
-) extends GithubCloserTO with GithubIssueTimelineItemTO with GithubPullRequestTimelineItemTO with GithubGitObjectTO with GithubNodeTO with GithubSubscribableTO with GithubUniformResourceLocatableTO {
-
- override def toString(): String = {
- scala.Seq(
- if (abbreviatedOid != null) "abbreviatedOid: " + GraphQLRequestSerializer.getEntry(abbreviatedOid) else "",
- "additions: " + GraphQLRequestSerializer.getEntry(additions),
- if (associatedPullRequests != null) "associatedPullRequests: " + GraphQLRequestSerializer.getEntry(associatedPullRequests) else "",
- if (author != null) "author: " + GraphQLRequestSerializer.getEntry(author) else "",
- "authoredByCommitter: " + GraphQLRequestSerializer.getEntry(authoredByCommitter),
- if (authoredDate != null) "authoredDate: " + GraphQLRequestSerializer.getEntry(authoredDate) else "",
- if (blame != null) "blame: " + GraphQLRequestSerializer.getEntry(blame) else "",
- "changedFiles: " + GraphQLRequestSerializer.getEntry(changedFiles),
- if (comments != null) "comments: " + GraphQLRequestSerializer.getEntry(comments) else "",
- if (commitResourcePath != null) "commitResourcePath: " + GraphQLRequestSerializer.getEntry(commitResourcePath) else "",
- if (commitUrl != null) "commitUrl: " + GraphQLRequestSerializer.getEntry(commitUrl) else "",
- if (committedDate != null) "committedDate: " + GraphQLRequestSerializer.getEntry(committedDate) else "",
- "committedViaWeb: " + GraphQLRequestSerializer.getEntry(committedViaWeb),
- if (committer != null) "committer: " + GraphQLRequestSerializer.getEntry(committer) else "",
- "deletions: " + GraphQLRequestSerializer.getEntry(deletions),
- if (deployments != null) "deployments: " + GraphQLRequestSerializer.getEntry(deployments) else "",
- if (history != null) "history: " + GraphQLRequestSerializer.getEntry(history) else "",
- if (id != null) "id: " + GraphQLRequestSerializer.getEntry(id) else "",
- if (message != null) "message: " + GraphQLRequestSerializer.getEntry(message) else "",
- if (messageBody != null) "messageBody: " + GraphQLRequestSerializer.getEntry(messageBody) else "",
- if (messageBodyHTML != null) "messageBodyHTML: " + GraphQLRequestSerializer.getEntry(messageBodyHTML) else "",
- if (messageHeadline != null) "messageHeadline: " + GraphQLRequestSerializer.getEntry(messageHeadline) else "",
- if (messageHeadlineHTML != null) "messageHeadlineHTML: " + GraphQLRequestSerializer.getEntry(messageHeadlineHTML) else "",
- if (oid != null) "oid: " + GraphQLRequestSerializer.getEntry(oid) else "",
- if (parents != null) "parents: " + GraphQLRequestSerializer.getEntry(parents) else "",
- if (pushedDate != null) "pushedDate: " + GraphQLRequestSerializer.getEntry(pushedDate) else "",
- if (repository != null) "repository: " + GraphQLRequestSerializer.getEntry(repository) else "",
- if (resourcePath != null) "resourcePath: " + GraphQLRequestSerializer.getEntry(resourcePath) else "",
- if (signature != null) "signature: " + GraphQLRequestSerializer.getEntry(signature) else "",
- if (status != null) "status: " + GraphQLRequestSerializer.getEntry(status) else "",
- if (tarballUrl != null) "tarballUrl: " + GraphQLRequestSerializer.getEntry(tarballUrl) else "",
- if (tree != null) "tree: " + GraphQLRequestSerializer.getEntry(tree) else "",
- if (treeResourcePath != null) "treeResourcePath: " + GraphQLRequestSerializer.getEntry(treeResourcePath) else "",
- if (treeUrl != null) "treeUrl: " + GraphQLRequestSerializer.getEntry(treeUrl) else "",
- if (url != null) "url: " + GraphQLRequestSerializer.getEntry(url) else "",
- "viewerCanSubscribe: " + GraphQLRequestSerializer.getEntry(viewerCanSubscribe),
- if (viewerSubscription != null) "viewerSubscription: " + GraphQLRequestSerializer.getEntry(viewerSubscription) else "",
- if (zipballUrl != null) "zipballUrl: " + GraphQLRequestSerializer.getEntry(zipballUrl) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/ProfileOwner.scala.txt b/src/test/resources/expected-classes/scala/ProfileOwner.scala.txt
deleted file mode 100644
index acd2ac1bc..000000000
--- a/src/test/resources/expected-classes/scala/ProfileOwner.scala.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait ProfileOwner {
-
- val anyPinnableItems: Boolean
-
- val email: String
-
- @javax.validation.constraints.NotNull
- val id: String
-
- @javax.validation.constraints.NotNull
- val itemShowcase: ProfileItemShowcase
-
- val location: String
-
- @javax.validation.constraints.NotNull
- val login: String
-
- val name: String
-
- @javax.validation.constraints.NotNull
- val pinnableItems: PinnableItemConnection
-
- @javax.validation.constraints.NotNull
- val pinnedItems: PinnableItemConnection
-
- val pinnedItemsRemaining: Int
-
- val viewerCanChangePinnedItems: Boolean
-
- val websiteUrl: String
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/QueryINeedQueryRequest.scala.txt b/src/test/resources/expected-classes/scala/QueryINeedQueryRequest.scala.txt
deleted file mode 100644
index 5c21fe3b8..000000000
--- a/src/test/resources/expected-classes/scala/QueryINeedQueryRequest.scala.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.kobylynskyi.graphql.test1
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest
-import java.util.{ LinkedHashMap => JLinkedHashMap }
-import java.util.{ Map => JMap, Set => JSet }
-import scala.collection.mutable
-import scala.collection.JavaConverters._
-import java.util.Objects
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class QueryINeedQueryRequest(alias: String) extends GraphQLOperationRequest {
-
- private final lazy val input = new JLinkedHashMap[String, java.lang.Object]()
- private final lazy val useObjectMapperForInputSerialization: mutable.Set[String] = mutable.Set()
-
- def setInput(input: String): Unit = {
- this.input.put("input", input)
- this.useObjectMapperForInputSerialization.add("input");
- }
-
- override def getOperationType(): GraphQLOperation = QueryINeedQueryRequest.OPERATION_TYPE
-
- override def getOperationName(): String = QueryINeedQueryRequest.OPERATION_NAME
-
- override def getAlias(): String = if (alias != null) alias else QueryINeedQueryRequest.OPERATION_NAME
-
- override def getInput(): JMap[String, java.lang.Object] = input
-
- override def getUseObjectMapperForInputSerialization(): JSet[String] = useObjectMapperForInputSerialization.asJava
-
- override def toString(): String = Objects.toString(input)
-}
-
-object QueryINeedQueryRequest {
-
- final val OPERATION_NAME: String = "queryINeed"
- final val OPERATION_TYPE: GraphQLOperation = GraphQLOperation.QUERY
-
- def apply(alias: String) = new QueryINeedQueryRequest(alias)
-
- def apply() = new QueryINeedQueryRequest(null)
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/QueryINeedQueryRequest_custom_serializer.scala.txt b/src/test/resources/expected-classes/scala/QueryINeedQueryRequest_custom_serializer.scala.txt
deleted file mode 100644
index 164c69480..000000000
--- a/src/test/resources/expected-classes/scala/QueryINeedQueryRequest_custom_serializer.scala.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.kobylynskyi.graphql.test1
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest
-import java.util.{ LinkedHashMap => JLinkedHashMap }
-import java.util.{ Map => JMap, Set => JSet }
-import java.util.Objects
-import scala.collection.mutable
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class QueryINeedQueryRequest(alias: String) extends GraphQLOperationRequest {
-
- private final lazy val input = new JLinkedHashMap[String, java.lang.Object]()
- private final lazy val useObjectMapperForInputSerialization: mutable.Set[String] = mutable.Set()
-
- def setInput(input: ZonedDateTime): Unit = {
- this.input.put("input", input)
- this.useObjectMapperForInputSerialization.add("input");
- }
-
- override def getOperationType(): GraphQLOperation = QueryINeedQueryRequest.OPERATION_TYPE
-
- override def getOperationName(): String = QueryINeedQueryRequest.OPERATION_NAME
-
- override def getAlias(): String = if (alias != null) alias else QueryINeedQueryRequest.OPERATION_NAME
-
- override def getInput(): JMap[String, java.lang.Object] = input
-
- override def getUseObjectMapperForInputSerialization(): JSet[String] = useObjectMapperForInputSerialization.asJava
-
- override def toString(): String = Objects.toString(input)
-}
-
-object QueryINeedQueryRequest {
-
- final val OPERATION_NAME: String = "queryINeed"
- final val OPERATION_TYPE: GraphQLOperation = GraphQLOperation.QUERY
-
- def apply(alias: String) = new QueryINeedQueryRequest(alias)
-
- def apply() = new QueryINeedQueryRequest(null)
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/SearchResultItemConnectionResponseProjection.scala.txt b/src/test/resources/expected-classes/scala/SearchResultItemConnectionResponseProjection.scala.txt
deleted file mode 100644
index 4cfc5a3c9..000000000
--- a/src/test/resources/expected-classes/scala/SearchResultItemConnectionResponseProjection.scala.txt
+++ /dev/null
@@ -1,162 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseField
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseProjection
-import java.util.Objects
-import scala.collection.mutable.HashMap
-import scala.collection.JavaConverters._
-
-/**
- * Response projection for SearchResultItemConnection
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class SearchResultItemConnectionResponseProjection() extends GraphQLResponseProjection() {
-
- def this(projection: SearchResultItemConnectionResponseProjection) = {
- this()
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
-
- def this(projections: scala.Seq[SearchResultItemConnectionResponseProjection]) = {
- this()
- if (projections != null) {
- for (projection <- projections) {
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
- }
- }
-
- private final lazy val projectionDepthOnFields = new HashMap[String, Int]
-
- def all$(): SearchResultItemConnectionResponseProjection = all$(3)
-
- def all$(maxDepth: Int): SearchResultItemConnectionResponseProjection = {
- this.codeCount()
- if (projectionDepthOnFields.getOrElse("SearchResultItemConnectionResponseProjection.SearchResultItemEdgeResponseProjection.edges", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemConnectionResponseProjection.SearchResultItemEdgeResponseProjection.edges", projectionDepthOnFields.getOrElse("SearchResultItemConnectionResponseProjection.SearchResultItemEdgeResponseProjection.edges", 0) + 1)
- this.edges(new SearchResultItemEdgeResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemConnectionResponseProjection.SearchResultItemEdgeResponseProjection.edges", 0)))
- }
- this.issueCount()
- if (projectionDepthOnFields.getOrElse("SearchResultItemConnectionResponseProjection.SearchResultItemResponseProjection.nodes", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemConnectionResponseProjection.SearchResultItemResponseProjection.nodes", projectionDepthOnFields.getOrElse("SearchResultItemConnectionResponseProjection.SearchResultItemResponseProjection.nodes", 0) + 1)
- this.nodes(new SearchResultItemResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemConnectionResponseProjection.SearchResultItemResponseProjection.nodes", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SearchResultItemConnectionResponseProjection.PageInfoResponseProjection.pageInfo", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemConnectionResponseProjection.PageInfoResponseProjection.pageInfo", projectionDepthOnFields.getOrElse("SearchResultItemConnectionResponseProjection.PageInfoResponseProjection.pageInfo", 0) + 1)
- this.pageInfo(new PageInfoResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemConnectionResponseProjection.PageInfoResponseProjection.pageInfo", 0)))
- }
- this.repositoryCount()
- this.userCount()
- this.wikiCount()
- this.typename()
- this
- }
-
- def codeCount(): SearchResultItemConnectionResponseProjection = {
- codeCount(null.asInstanceOf[String])
- }
-
- def codeCount(alias: String): SearchResultItemConnectionResponseProjection = {
- add$(new GraphQLResponseField("codeCount").alias(alias))
- this
- }
-
- def edges(subProjection: SearchResultItemEdgeResponseProjection): SearchResultItemConnectionResponseProjection = {
- edges(null.asInstanceOf[String], subProjection)
- }
-
- def edges(alias: String, subProjection: SearchResultItemEdgeResponseProjection): SearchResultItemConnectionResponseProjection = {
- add$(new GraphQLResponseField("edges").alias(alias).projection(subProjection))
- this
- }
-
- def issueCount(): SearchResultItemConnectionResponseProjection = {
- issueCount(null.asInstanceOf[String])
- }
-
- def issueCount(alias: String): SearchResultItemConnectionResponseProjection = {
- add$(new GraphQLResponseField("issueCount").alias(alias))
- this
- }
-
- def nodes(subProjection: SearchResultItemResponseProjection): SearchResultItemConnectionResponseProjection = {
- nodes(null.asInstanceOf[String], subProjection)
- }
-
- def nodes(alias: String, subProjection: SearchResultItemResponseProjection): SearchResultItemConnectionResponseProjection = {
- add$(new GraphQLResponseField("nodes").alias(alias).projection(subProjection))
- this
- }
-
- def pageInfo(subProjection: PageInfoResponseProjection): SearchResultItemConnectionResponseProjection = {
- pageInfo(null.asInstanceOf[String], subProjection)
- }
-
- def pageInfo(alias: String, subProjection: PageInfoResponseProjection): SearchResultItemConnectionResponseProjection = {
- add$(new GraphQLResponseField("pageInfo").alias(alias).projection(subProjection))
- this
- }
-
- def repositoryCount(): SearchResultItemConnectionResponseProjection = {
- repositoryCount(null.asInstanceOf[String])
- }
-
- def repositoryCount(alias: String): SearchResultItemConnectionResponseProjection = {
- add$(new GraphQLResponseField("repositoryCount").alias(alias))
- this
- }
-
- def userCount(): SearchResultItemConnectionResponseProjection = {
- userCount(null.asInstanceOf[String])
- }
-
- def userCount(alias: String): SearchResultItemConnectionResponseProjection = {
- add$(new GraphQLResponseField("userCount").alias(alias))
- this
- }
-
- def wikiCount(): SearchResultItemConnectionResponseProjection = {
- wikiCount(null.asInstanceOf[String])
- }
-
- def wikiCount(alias: String): SearchResultItemConnectionResponseProjection = {
- add$(new GraphQLResponseField("wikiCount").alias(alias))
- this
- }
-
- def typename(): SearchResultItemConnectionResponseProjection = {
- typename(null.asInstanceOf[String])
- }
-
- def typename(alias: String): SearchResultItemConnectionResponseProjection = {
- add$(new GraphQLResponseField("__typename").alias(alias))
- this
- }
-
- override def deepCopy$(): SearchResultItemConnectionResponseProjection = new SearchResultItemConnectionResponseProjection(this)
-
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[SearchResultItemConnectionResponseProjection]
- Objects.equals(fields, that.fields)
- }
-
- override def hashCode(): Int = Objects.hash(fields)
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/SearchResultItemResponseProjection.scala.txt b/src/test/resources/expected-classes/scala/SearchResultItemResponseProjection.scala.txt
deleted file mode 100644
index 7438706f9..000000000
--- a/src/test/resources/expected-classes/scala/SearchResultItemResponseProjection.scala.txt
+++ /dev/null
@@ -1,164 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseField
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseProjection
-import java.util.Objects
-import scala.collection.mutable.HashMap
-import scala.collection.JavaConverters._
-
-/**
- * Response projection for SearchResultItem
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class SearchResultItemResponseProjection() extends GraphQLResponseProjection() {
-
- def this(projection: SearchResultItemResponseProjection) = {
- this()
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
-
- def this(projections: scala.Seq[SearchResultItemResponseProjection]) = {
- this()
- if (projections != null) {
- for (projection <- projections) {
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
- }
- }
-
- private final lazy val projectionDepthOnFields = new HashMap[String, Int]
-
- def all$(): SearchResultItemResponseProjection = all$(3)
-
- def all$(maxDepth: Int): SearchResultItemResponseProjection = {
- if (projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.AppResponseProjection.onApp", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemResponseProjection.AppResponseProjection.onApp", projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.AppResponseProjection.onApp", 0) + 1)
- this.onApp(new AppResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.AppResponseProjection.onApp", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.RepositoryResponseProjection.onRepository", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemResponseProjection.RepositoryResponseProjection.onRepository", projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.RepositoryResponseProjection.onRepository", 0) + 1)
- this.onRepository(new RepositoryResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.RepositoryResponseProjection.onRepository", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.IssueResponseProjection.onIssue", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemResponseProjection.IssueResponseProjection.onIssue", projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.IssueResponseProjection.onIssue", 0) + 1)
- this.onIssue(new IssueResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.IssueResponseProjection.onIssue", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.OrganizationResponseProjection.onOrganization", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemResponseProjection.OrganizationResponseProjection.onOrganization", projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.OrganizationResponseProjection.onOrganization", 0) + 1)
- this.onOrganization(new OrganizationResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.OrganizationResponseProjection.onOrganization", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.UserResponseProjection.onUser", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemResponseProjection.UserResponseProjection.onUser", projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.UserResponseProjection.onUser", 0) + 1)
- this.onUser(new UserResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.UserResponseProjection.onUser", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.MarketplaceListingResponseProjection.onMarketplaceListing", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemResponseProjection.MarketplaceListingResponseProjection.onMarketplaceListing", projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.MarketplaceListingResponseProjection.onMarketplaceListing", 0) + 1)
- this.onMarketplaceListing(new MarketplaceListingResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.MarketplaceListingResponseProjection.onMarketplaceListing", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.PullRequestResponseProjection.onPullRequest", 0) <= maxDepth) {
- projectionDepthOnFields.put("SearchResultItemResponseProjection.PullRequestResponseProjection.onPullRequest", projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.PullRequestResponseProjection.onPullRequest", 0) + 1)
- this.onPullRequest(new PullRequestResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SearchResultItemResponseProjection.PullRequestResponseProjection.onPullRequest", 0)))
- }
- this.typename()
- this
- }
-
- def onApp(subProjection: AppResponseProjection): SearchResultItemResponseProjection = {
- onApp(null.asInstanceOf[String], subProjection)
- }
-
- def onApp(alias: String, subProjection: AppResponseProjection): SearchResultItemResponseProjection = {
- add$(new GraphQLResponseField("...on App").alias(alias).projection(subProjection))
- this
- }
-
- def onRepository(subProjection: RepositoryResponseProjection): SearchResultItemResponseProjection = {
- onRepository(null.asInstanceOf[String], subProjection)
- }
-
- def onRepository(alias: String, subProjection: RepositoryResponseProjection): SearchResultItemResponseProjection = {
- add$(new GraphQLResponseField("...on Repository").alias(alias).projection(subProjection))
- this
- }
-
- def onIssue(subProjection: IssueResponseProjection): SearchResultItemResponseProjection = {
- onIssue(null.asInstanceOf[String], subProjection)
- }
-
- def onIssue(alias: String, subProjection: IssueResponseProjection): SearchResultItemResponseProjection = {
- add$(new GraphQLResponseField("...on Issue").alias(alias).projection(subProjection))
- this
- }
-
- def onOrganization(subProjection: OrganizationResponseProjection): SearchResultItemResponseProjection = {
- onOrganization(null.asInstanceOf[String], subProjection)
- }
-
- def onOrganization(alias: String, subProjection: OrganizationResponseProjection): SearchResultItemResponseProjection = {
- add$(new GraphQLResponseField("...on Organization").alias(alias).projection(subProjection))
- this
- }
-
- def onUser(subProjection: UserResponseProjection): SearchResultItemResponseProjection = {
- onUser(null.asInstanceOf[String], subProjection)
- }
-
- def onUser(alias: String, subProjection: UserResponseProjection): SearchResultItemResponseProjection = {
- add$(new GraphQLResponseField("...on User").alias(alias).projection(subProjection))
- this
- }
-
- def onMarketplaceListing(subProjection: MarketplaceListingResponseProjection): SearchResultItemResponseProjection = {
- onMarketplaceListing(null.asInstanceOf[String], subProjection)
- }
-
- def onMarketplaceListing(alias: String, subProjection: MarketplaceListingResponseProjection): SearchResultItemResponseProjection = {
- add$(new GraphQLResponseField("...on MarketplaceListing").alias(alias).projection(subProjection))
- this
- }
-
- def onPullRequest(subProjection: PullRequestResponseProjection): SearchResultItemResponseProjection = {
- onPullRequest(null.asInstanceOf[String], subProjection)
- }
-
- def onPullRequest(alias: String, subProjection: PullRequestResponseProjection): SearchResultItemResponseProjection = {
- add$(new GraphQLResponseField("...on PullRequest").alias(alias).projection(subProjection))
- this
- }
-
- def typename(): SearchResultItemResponseProjection = {
- typename(null.asInstanceOf[String])
- }
-
- def typename(alias: String): SearchResultItemResponseProjection = {
- add$(new GraphQLResponseField("__typename").alias(alias))
- this
- }
-
- override def deepCopy$(): SearchResultItemResponseProjection = new SearchResultItemResponseProjection(this)
-
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[SearchResultItemResponseProjection]
- Objects.equals(fields, that.fields)
- }
-
- override def hashCode(): Int = Objects.hash(fields)
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/VersionQueryResponse_int.scala.txt b/src/test/resources/expected-classes/scala/VersionQueryResponse_int.scala.txt
deleted file mode 100644
index bd8f85c74..000000000
--- a/src/test/resources/expected-classes/scala/VersionQueryResponse_int.scala.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.github.graphql
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResult
-import java.util.{ Map => JMap }
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class VersionQueryResponse extends GraphQLResult[JMap[String, Int]] {
-
- def version(): Int = {
- val data: JMap[String, Int] = getData
- data.get(VersionQueryResponse.OPERATION_NAME)
- }
-
-}
-
-object VersionQueryResponse {
-
- private final val OPERATION_NAME: String = "version"
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/annotation/CreateEventMutationResolver.scala.txt b/src/test/resources/expected-classes/scala/annotation/CreateEventMutationResolver.scala.txt
deleted file mode 100644
index 99de67dec..000000000
--- a/src/test/resources/expected-classes/scala/annotation/CreateEventMutationResolver.scala.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.kobylynskyi.graphql.test1
-
-
-/**
- * Create a new event.
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait CreateEventMutationResolver {
-
- /**
- * Create a new event.
- */
- @javax.validation.constraints.NotNull
- @com.example.CustomAnnotation(roles=scala.Array("admin", "moderator"), boo=scala.Array(true, false, true), float=scala.Array("12.0", "null"), int=42, n="null")
- @throws[Exception]
- def createEvent(categoryId: String, createdBy: String): Event
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/annotation/MutationResolver.scala.txt b/src/test/resources/expected-classes/scala/annotation/MutationResolver.scala.txt
deleted file mode 100644
index 4bfa853b3..000000000
--- a/src/test/resources/expected-classes/scala/annotation/MutationResolver.scala.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.kobylynskyi.graphql.test1
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait MutationResolver {
-
- /**
- * Create a new event.
- */
- @javax.validation.constraints.NotNull
- @com.example.CustomAnnotation(roles=scala.Array("admin", "moderator"), boo=scala.Array(true, false, true), float=scala.Array("12.0", "null"), int=42, n="null")
- @throws[Exception]
- def createEvent(categoryId: String, createdBy: String): Event
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/annotation/User.scala.txt b/src/test/resources/expected-classes/scala/annotation/User.scala.txt
deleted file mode 100644
index a8ab13690..000000000
--- a/src/test/resources/expected-classes/scala/annotation/User.scala.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.kobylynskyi.graphql.test1
-
-import scala.collection.JavaConverters._
-
-/**
- * type with directive using enum value
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class User(
- name: String,
- @com.example.Relationship(type = "FRIEND_WITH", direction = OUT)
- friends: scala.Seq[User]
-) {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/builder/CaseQueryRequest.scala.txt b/src/test/resources/expected-classes/scala/builder/CaseQueryRequest.scala.txt
deleted file mode 100644
index f5d9c1768..000000000
--- a/src/test/resources/expected-classes/scala/builder/CaseQueryRequest.scala.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.kobylynskyi.graphql.codegen.prot
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest
-import java.util.{ LinkedHashMap => JLinkedHashMap }
-import java.util.{ Map => JMap, Set => JSet }
-import java.util.Objects
-import scala.collection.mutable
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class CaseQueryRequest(alias: String) extends GraphQLOperationRequest {
-
- private final lazy val input = new JLinkedHashMap[String, java.lang.Object]()
- private final lazy val useObjectMapperForInputSerialization: mutable.Set[String] = mutable.Set()
-
- def setFinal(`final`: scala.Seq[Char]): Unit = {
- this.input.put("final", `final`)
- }
-
- override def getOperationType(): GraphQLOperation = CaseQueryRequest.OPERATION_TYPE
-
- override def getOperationName(): String = CaseQueryRequest.OPERATION_NAME
-
- override def getAlias(): String = if (alias != null) alias else CaseQueryRequest.OPERATION_NAME
-
- override def getInput(): JMap[String, java.lang.Object] = input
-
- override def getUseObjectMapperForInputSerialization(): JSet[String] = useObjectMapperForInputSerialization.asJava
-
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[CaseQueryRequest]
- Objects.equals(getOperationType(), that.getOperationType()) &&
- Objects.equals(getOperationName(), that.getOperationName()) &&
- Objects.equals(input, that.input)
- }
-
- override def hashCode(): Int = Objects.hash(getOperationType(), getOperationName(), input)
-
- override def toString(): String = Objects.toString(input)
-}
-
-object CaseQueryRequest {
-
- final val OPERATION_NAME: String = "case"
- final val OPERATION_TYPE: GraphQLOperation = GraphQLOperation.QUERY
-
- def apply(alias: String) = new CaseQueryRequest(alias)
-
- def apply() = new CaseQueryRequest(null)
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/custom-type/QueryINeedQueryRequest.scala.txt b/src/test/resources/expected-classes/scala/custom-type/QueryINeedQueryRequest.scala.txt
deleted file mode 100644
index b8d16e438..000000000
--- a/src/test/resources/expected-classes/scala/custom-type/QueryINeedQueryRequest.scala.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.kobylynskyi.graphql.test1
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest
-import java.util.{ LinkedHashMap => JLinkedHashMap }
-import java.util.{ Map => JMap, Set => JSet }
-import java.util.Objects
-import scala.collection.mutable
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class QueryINeedQueryRequest(alias: String) extends GraphQLOperationRequest {
-
- private final lazy val input = new JLinkedHashMap[String, java.lang.Object]()
- private final lazy val useObjectMapperForInputSerialization: mutable.Set[String] = mutable.Set()
-
- def setInput(input: String): Unit = {
- this.input.put("input", input)
- }
-
- override def getOperationType(): GraphQLOperation = QueryINeedQueryRequest.OPERATION_TYPE
-
- override def getOperationName(): String = QueryINeedQueryRequest.OPERATION_NAME
-
- override def getAlias(): String = if (alias != null) alias else QueryINeedQueryRequest.OPERATION_NAME
-
- override def getInput(): JMap[String, java.lang.Object] = input
-
- override def getUseObjectMapperForInputSerialization(): JSet[String] = useObjectMapperForInputSerialization.asJava
-
- override def toString(): String = Objects.toString(input)
-}
-
-object QueryINeedQueryRequest {
-
- final val OPERATION_NAME: String = "queryINeed"
- final val OPERATION_TYPE: GraphQLOperation = GraphQLOperation.QUERY
-
- def apply(alias: String) = new QueryINeedQueryRequest(alias)
-
- def apply() = new QueryINeedQueryRequest(null)
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/custom-type/QueryINeedQueryRequest_whole_scalar.scala.txt b/src/test/resources/expected-classes/scala/custom-type/QueryINeedQueryRequest_whole_scalar.scala.txt
deleted file mode 100644
index b8d16e438..000000000
--- a/src/test/resources/expected-classes/scala/custom-type/QueryINeedQueryRequest_whole_scalar.scala.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.kobylynskyi.graphql.test1
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest
-import java.util.{ LinkedHashMap => JLinkedHashMap }
-import java.util.{ Map => JMap, Set => JSet }
-import java.util.Objects
-import scala.collection.mutable
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class QueryINeedQueryRequest(alias: String) extends GraphQLOperationRequest {
-
- private final lazy val input = new JLinkedHashMap[String, java.lang.Object]()
- private final lazy val useObjectMapperForInputSerialization: mutable.Set[String] = mutable.Set()
-
- def setInput(input: String): Unit = {
- this.input.put("input", input)
- }
-
- override def getOperationType(): GraphQLOperation = QueryINeedQueryRequest.OPERATION_TYPE
-
- override def getOperationName(): String = QueryINeedQueryRequest.OPERATION_NAME
-
- override def getAlias(): String = if (alias != null) alias else QueryINeedQueryRequest.OPERATION_NAME
-
- override def getInput(): JMap[String, java.lang.Object] = input
-
- override def getUseObjectMapperForInputSerialization(): JSet[String] = useObjectMapperForInputSerialization.asJava
-
- override def toString(): String = Objects.toString(input)
-}
-
-object QueryINeedQueryRequest {
-
- final val OPERATION_NAME: String = "queryINeed"
- final val OPERATION_TYPE: GraphQLOperation = GraphQLOperation.QUERY
-
- def apply(alias: String) = new QueryINeedQueryRequest(alias)
-
- def apply() = new QueryINeedQueryRequest(null)
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/custom-type/ResponseContainingDate.scala.txt b/src/test/resources/expected-classes/scala/custom-type/ResponseContainingDate.scala.txt
deleted file mode 100644
index 6a447a300..000000000
--- a/src/test/resources/expected-classes/scala/custom-type/ResponseContainingDate.scala.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.kobylynskyi.graphql.test1
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class ResponseContainingDate(
- a: java.time.ZonedDateTime
-) {
-
- override def toString(): String = {
- scala.Seq(
- if (a != null) "a: " + GraphQLRequestSerializer.getEntry(a) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/deprecated/CreateEventMutationResolver.scala.txt b/src/test/resources/expected-classes/scala/deprecated/CreateEventMutationResolver.scala.txt
deleted file mode 100644
index 6fe26224a..000000000
--- a/src/test/resources/expected-classes/scala/deprecated/CreateEventMutationResolver.scala.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait CreateEventMutationResolver {
-
- @deprecated(message = "test deprecated with msg")
- @javax.validation.constraints.NotNull
- @throws[Exception]
- def createEvent(input: EventInput): Event
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/deprecated/Event.scala.txt b/src/test/resources/expected-classes/scala/deprecated/Event.scala.txt
deleted file mode 100644
index a0421ee9c..000000000
--- a/src/test/resources/expected-classes/scala/deprecated/Event.scala.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.github.graphql
-
-import scala.collection.JavaConverters._
-import Status._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Event(
- @deprecated(message = "test deprecated with msg")
- @javax.validation.constraints.NotNull
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.github.graphql.StatusTypeRefer])
- status: Status,
- @deprecated(message = "test deprecated with msg")
- @javax.validation.constraints.NotNull
- createdDateTime: String,
- @deprecated(message = "test deprecated with msg")
- @javax.validation.constraints.NotNull
- override val id: String
-) extends PinnableItem with Node {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/deprecated/EventInput.scala.txt b/src/test/resources/expected-classes/scala/deprecated/EventInput.scala.txt
deleted file mode 100644
index ad774af7b..000000000
--- a/src/test/resources/expected-classes/scala/deprecated/EventInput.scala.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.github.graphql
-
-import scala.collection.JavaConverters._
-import Status._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class EventInput(
- @deprecated(message = "test deprecated with msg")
- @javax.validation.constraints.NotNull
- status: Status
-) {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/deprecated/EventsQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/deprecated/EventsQueryResolver.scala.txt
deleted file mode 100644
index b5979cd1e..000000000
--- a/src/test/resources/expected-classes/scala/deprecated/EventsQueryResolver.scala.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait EventsQueryResolver {
-
- @deprecated(message = "No longer supported")
- @throws[Exception]
- def events(): scala.Seq[Event]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/deprecated/MutationResolver.scala.txt b/src/test/resources/expected-classes/scala/deprecated/MutationResolver.scala.txt
deleted file mode 100644
index eb0c342d1..000000000
--- a/src/test/resources/expected-classes/scala/deprecated/MutationResolver.scala.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait MutationResolver {
-
- @deprecated(message = "test deprecated with msg")
- @javax.validation.constraints.NotNull
- @throws[Exception]
- def createEvent(input: EventInput): Event
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/deprecated/Node.scala.txt b/src/test/resources/expected-classes/scala/deprecated/Node.scala.txt
deleted file mode 100644
index 526dd761c..000000000
--- a/src/test/resources/expected-classes/scala/deprecated/Node.scala.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait Node {
-
- @deprecated(message = "test deprecated with msg")
- @javax.validation.constraints.NotNull
- val id: String
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/deprecated/PinnableItem.scala.txt b/src/test/resources/expected-classes/scala/deprecated/PinnableItem.scala.txt
deleted file mode 100644
index 2f7648368..000000000
--- a/src/test/resources/expected-classes/scala/deprecated/PinnableItem.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait PinnableItem {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/deprecated/QueryResolver.scala.txt b/src/test/resources/expected-classes/scala/deprecated/QueryResolver.scala.txt
deleted file mode 100644
index aee29c591..000000000
--- a/src/test/resources/expected-classes/scala/deprecated/QueryResolver.scala.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait QueryResolver {
-
- @deprecated(message = "No longer supported")
- @throws[Exception]
- def events(): scala.Seq[Event]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/deprecated/Status.scala.txt b/src/test/resources/expected-classes/scala/deprecated/Status.scala.txt
deleted file mode 100644
index f5102e3a2..000000000
--- a/src/test/resources/expected-classes/scala/deprecated/Status.scala.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.github.graphql
-
-import com.fasterxml.jackson.core.`type`.TypeReference
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-object Status extends Enumeration {
-
- type Status = Value
-
- @deprecated(message = "test deprecated with msg")
- val CREATED: Value = Value("CREATED")
- val IN_PROGRESS: Value = Value("IN_PROGRESS")
-
-}
-
-class StatusTypeRefer extends TypeReference[Status.type]
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/empty/Event.scala.txt b/src/test/resources/expected-classes/scala/empty/Event.scala.txt
deleted file mode 100644
index f5571a0a4..000000000
--- a/src/test/resources/expected-classes/scala/empty/Event.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Event(
-) {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/empty/EventInput.scala.txt b/src/test/resources/expected-classes/scala/empty/EventInput.scala.txt
deleted file mode 100644
index c723dc66f..000000000
--- a/src/test/resources/expected-classes/scala/empty/EventInput.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class EventInput(
-) {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/empty/EventResponseProjection.scala.txt b/src/test/resources/expected-classes/scala/empty/EventResponseProjection.scala.txt
deleted file mode 100644
index 37a91a039..000000000
--- a/src/test/resources/expected-classes/scala/empty/EventResponseProjection.scala.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseField
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseProjection
-import scala.collection.mutable.HashMap
-import scala.collection.JavaConverters._
-
-/**
- * Response projection for Event
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class EventResponseProjection() extends GraphQLResponseProjection() {
-
- def this(projection: EventResponseProjection) = {
- this()
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
-
- def this(projections: scala.Seq[EventResponseProjection]) = {
- this()
- if (projections != null) {
- for (projection <- projections) {
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
- }
- }
-
- private final lazy val projectionDepthOnFields = new HashMap[String, Int]
-
- def all$(): EventResponseProjection = all$(3)
-
- def all$(maxDepth: Int): EventResponseProjection = {
- this.typename()
- this
- }
-
- def typename(): EventResponseProjection = {
- typename(null.asInstanceOf[String])
- }
-
- def typename(alias: String): EventResponseProjection = {
- add$(new GraphQLResponseField("__typename").alias(alias))
- this
- }
-
- override def deepCopy$(): EventResponseProjection = new EventResponseProjection(this)
-
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/empty/MutationResolver.scala.txt b/src/test/resources/expected-classes/scala/empty/MutationResolver.scala.txt
deleted file mode 100644
index 70d8d6b4f..000000000
--- a/src/test/resources/expected-classes/scala/empty/MutationResolver.scala.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait MutationResolver {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/empty/Node.scala.txt b/src/test/resources/expected-classes/scala/empty/Node.scala.txt
deleted file mode 100644
index afd7fdf3f..000000000
--- a/src/test/resources/expected-classes/scala/empty/Node.scala.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait Node {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/empty/PinnableItem.scala.txt b/src/test/resources/expected-classes/scala/empty/PinnableItem.scala.txt
deleted file mode 100644
index 8bf2ed4c6..000000000
--- a/src/test/resources/expected-classes/scala/empty/PinnableItem.scala.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait PinnableItem {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/empty/QueryResolver.scala.txt b/src/test/resources/expected-classes/scala/empty/QueryResolver.scala.txt
deleted file mode 100644
index 158f19355..000000000
--- a/src/test/resources/expected-classes/scala/empty/QueryResolver.scala.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait QueryResolver {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/empty/Status.scala.txt b/src/test/resources/expected-classes/scala/empty/Status.scala.txt
deleted file mode 100644
index b719b046b..000000000
--- a/src/test/resources/expected-classes/scala/empty/Status.scala.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-import com.fasterxml.jackson.core.`type`.TypeReference
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-object Status extends Enumeration {
-
- type Status = Value
-
-
-}
-
-class StatusTypeRefer extends TypeReference[Status.type]
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/enum-union/EnumMember1.scala.txt b/src/test/resources/expected-classes/scala/enum-union/EnumMember1.scala.txt
deleted file mode 100644
index 37c781f5a..000000000
--- a/src/test/resources/expected-classes/scala/enum-union/EnumMember1.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.kobylynskyi.graphql.enumunion
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-object EnumMember1 extends Enumeration with EnumUnion {
-
- type EnumMember1 = Value
-
- val VALUE: Value = Value("VALUE")
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/enum-union/EnumMember2.scala.txt b/src/test/resources/expected-classes/scala/enum-union/EnumMember2.scala.txt
deleted file mode 100644
index 36fbc7eec..000000000
--- a/src/test/resources/expected-classes/scala/enum-union/EnumMember2.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.kobylynskyi.graphql.enumunion
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-object EnumMember2 extends Enumeration with EnumUnion {
-
- type EnumMember2 = Value
-
- val OTHER_VALUE: Value = Value("OTHER_VALUE")
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/enum-union/EnumUnion.scala.txt b/src/test/resources/expected-classes/scala/enum-union/EnumUnion.scala.txt
deleted file mode 100644
index 74bc4af86..000000000
--- a/src/test/resources/expected-classes/scala/enum-union/EnumUnion.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.kobylynskyi.graphql.enumunion
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait EnumUnion {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/enum-union/TypeWithEnum.scala.txt b/src/test/resources/expected-classes/scala/enum-union/TypeWithEnum.scala.txt
deleted file mode 100644
index 41bcfc1b8..000000000
--- a/src/test/resources/expected-classes/scala/enum-union/TypeWithEnum.scala.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.kobylynskyi.graphql.enumunion
-
-
-import EnumMember1._
-import EnumUnion._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class TypeWithEnum(
- test1: EnumMember1,
- test2: EnumUnion
-) {
-
-}
-
-object TypeWithEnum {
-
- def builder(): TypeWithEnum.Builder = new Builder()
-
- class Builder {
-
- private var test1: EnumMember1 = _
- private var test2: EnumUnion = _
-
- def setTest1(test1: EnumMember1): Builder = {
- this.test1 = test1
- this
- }
-
- def setTest2(test2: EnumUnion): Builder = {
- this.test2 = test2
- this
- }
-
- def build(): TypeWithEnum = TypeWithEnum(test1, test2)
-
- }
-}
diff --git a/src/test/resources/expected-classes/scala/extend/Asset.scala.txt b/src/test/resources/expected-classes/scala/extend/Asset.scala.txt
deleted file mode 100644
index 6ea300f07..000000000
--- a/src/test/resources/expected-classes/scala/extend/Asset.scala.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-import scala.collection.JavaConverters._
-import Status._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Asset(
- @javax.validation.constraints.NotNull
- name: String,
- @javax.validation.constraints.NotNull
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[StatusTypeRefer])
- status: Status,
- @javax.validation.constraints.NotNull
- override val id: String,
- override val createdBy: String
-) extends PinnableItem with Node {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/AssetInput.scala.txt b/src/test/resources/expected-classes/scala/extend/AssetInput.scala.txt
deleted file mode 100644
index 93294e8f0..000000000
--- a/src/test/resources/expected-classes/scala/extend/AssetInput.scala.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class AssetInput(
- @javax.validation.constraints.NotNull
- name: String
-) {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/AssetsQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/AssetsQueryResolver.scala.txt
deleted file mode 100644
index 616167709..000000000
--- a/src/test/resources/expected-classes/scala/extend/AssetsQueryResolver.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait AssetsQueryResolver {
-
- @throws[Exception]
- def assets(): scala.Seq[Asset]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/CreateAssetMutationResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/CreateAssetMutationResolver.scala.txt
deleted file mode 100644
index 6c89588f1..000000000
--- a/src/test/resources/expected-classes/scala/extend/CreateAssetMutationResolver.scala.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait CreateAssetMutationResolver {
-
- @javax.validation.constraints.NotNull
- @throws[Exception]
- def createAsset(input: AssetInput): Asset
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/CreateEventMutationResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/CreateEventMutationResolver.scala.txt
deleted file mode 100644
index 399030f37..000000000
--- a/src/test/resources/expected-classes/scala/extend/CreateEventMutationResolver.scala.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait CreateEventMutationResolver {
-
- @javax.validation.constraints.NotNull
- @throws[Exception]
- def createEvent(input: EventInput): Event
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/Event.scala.txt b/src/test/resources/expected-classes/scala/extend/Event.scala.txt
deleted file mode 100644
index 65a460330..000000000
--- a/src/test/resources/expected-classes/scala/extend/Event.scala.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-import scala.collection.JavaConverters._
-import Status._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Event(
- @javax.validation.constraints.NotNull
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[StatusTypeRefer])
- status: Status,
- @javax.validation.constraints.NotNull
- createdDateTime: String,
- assets: scala.Seq[Asset],
- @javax.validation.constraints.NotNull
- override val id: String,
- override val createdBy: String
-) extends PinnableItem with Node {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/EventInput.scala.txt b/src/test/resources/expected-classes/scala/extend/EventInput.scala.txt
deleted file mode 100644
index f1c66706a..000000000
--- a/src/test/resources/expected-classes/scala/extend/EventInput.scala.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-import scala.collection.JavaConverters._
-import Status._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class EventInput(
- @javax.validation.constraints.NotNull
- status: Status,
- assets: scala.Seq[AssetInput]
-) {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/EventsQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/EventsQueryResolver.scala.txt
deleted file mode 100644
index 9ec93f5d5..000000000
--- a/src/test/resources/expected-classes/scala/extend/EventsQueryResolver.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait EventsQueryResolver {
-
- @throws[Exception]
- def events(): scala.Seq[Event]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/MutationResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/MutationResolver.scala.txt
deleted file mode 100644
index d95f42830..000000000
--- a/src/test/resources/expected-classes/scala/extend/MutationResolver.scala.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait MutationResolver {
-
- @javax.validation.constraints.NotNull
- @throws[Exception]
- def createEvent(input: EventInput): Event
-
- @javax.validation.constraints.NotNull
- @throws[Exception]
- def createAsset(input: AssetInput): Asset
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/Node.scala.txt b/src/test/resources/expected-classes/scala/extend/Node.scala.txt
deleted file mode 100644
index cf46f1ead..000000000
--- a/src/test/resources/expected-classes/scala/extend/Node.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait Node {
-
- @javax.validation.constraints.NotNull
- val id: String
-
- val createdBy: String
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/PinnableItem.scala.txt b/src/test/resources/expected-classes/scala/extend/PinnableItem.scala.txt
deleted file mode 100644
index 305971259..000000000
--- a/src/test/resources/expected-classes/scala/extend/PinnableItem.scala.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait PinnableItem {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/QueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/QueryResolver.scala.txt
deleted file mode 100644
index ad08adc7e..000000000
--- a/src/test/resources/expected-classes/scala/extend/QueryResolver.scala.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-
-/**
- * Queries related to events
- * Queries related to assets
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait QueryResolver {
-
- @throws[Exception]
- def events(): scala.Seq[Event]
-
- @throws[Exception]
- def assets(): scala.Seq[Asset]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/Status.scala.txt b/src/test/resources/expected-classes/scala/extend/Status.scala.txt
deleted file mode 100644
index 84eeb20b3..000000000
--- a/src/test/resources/expected-classes/scala/extend/Status.scala.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-import com.fasterxml.jackson.core.`type`.TypeReference
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-object Status extends Enumeration {
-
- type Status = Value
-
- val CREATED: Value = Value("CREATED")
- val IN_PROGRESS: Value = Value("IN_PROGRESS")
- val ASSIGNED: Value = Value("ASSIGNED")
-
-}
-
-class StatusTypeRefer extends TypeReference[Status.type]
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullable/Event.scala.txt b/src/test/resources/expected-classes/scala/extend/nullable/Event.scala.txt
deleted file mode 100644
index fc406a8e9..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullable/Event.scala.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Event(
- nullableStatus: scala.Seq[scala.Option[Int]],
- nonullStatus: scala.Seq[Int],
- nullablePrimitive: scala.Option[Int]
-) extends Node {
-
- override def toString(): String = {
- scala.Seq(
- if (nullableStatus != null) "nullableStatus: " + GraphQLRequestSerializer.getEntry(nullableStatus.asJava) else "",
- if (nonullStatus != null) "nonullStatus: " + GraphQLRequestSerializer.getEntry(nonullStatus.asJava) else "",
- if (nullablePrimitive.isDefined) "nullablePrimitive: " + GraphQLRequestSerializer.getEntry(nullablePrimitive.get) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullable/Null1QueryQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/nullable/Null1QueryQueryResolver.scala.txt
deleted file mode 100644
index 0ed3f12c2..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullable/Null1QueryQueryResolver.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait Null1QueryQueryResolver {
-
- @throws[Exception]
- def null1Query(): scala.Option[Int]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullable/Null2QueryQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/nullable/Null2QueryQueryResolver.scala.txt
deleted file mode 100644
index 442e76d45..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullable/Null2QueryQueryResolver.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait Null2QueryQueryResolver {
-
- @throws[Exception]
- def null2Query(): scala.Seq[scala.Option[Int]]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullable/Null3QueryQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/nullable/Null3QueryQueryResolver.scala.txt
deleted file mode 100644
index 22336eddd..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullable/Null3QueryQueryResolver.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait Null3QueryQueryResolver {
-
- @throws[Exception]
- def null3Query(): scala.Seq[Int]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullable/QueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/nullable/QueryResolver.scala.txt
deleted file mode 100644
index 24095ddbd..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullable/QueryResolver.scala.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait QueryResolver {
-
- @throws[Exception]
- def events(): scala.Seq[Event]
-
- @throws[Exception]
- def event(): scala.Option[Event]
-
- @throws[Exception]
- def null1Query(): scala.Option[Int]
-
- @throws[Exception]
- def null2Query(): scala.Seq[scala.Option[Int]]
-
- @throws[Exception]
- def null3Query(): scala.Seq[Int]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullreturn/SimpleEventCountQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/nullreturn/SimpleEventCountQueryResolver.scala.txt
deleted file mode 100644
index 0bcecd3c5..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullreturn/SimpleEventCountQueryResolver.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait SimpleEventCountQueryResolver {
-
- @throws[Exception]
- def simpleEventCount(): Int
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullreturn/SimpleEventCountsQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/nullreturn/SimpleEventCountsQueryResolver.scala.txt
deleted file mode 100644
index c04e8d8ec..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullreturn/SimpleEventCountsQueryResolver.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait SimpleEventCountsQueryResolver {
-
- @throws[Exception]
- def simpleEventCounts(): scala.Option[Int]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResolver.scala.txt
deleted file mode 100644
index 08173a76f..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResolver.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait SimplesQueryResolver {
-
- @throws[Exception]
- def simples(): scala.Option[Event]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResolver_without_option.scala.txt b/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResolver_without_option.scala.txt
deleted file mode 100644
index 710f069ab..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResolver_without_option.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait SimplesQueryResolver {
-
- @throws[Exception]
- def simples(): Event
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResponse.scala.txt b/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResponse.scala.txt
deleted file mode 100644
index 754870d16..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResponse.scala.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResult
-import java.util.{ Map => JMap }
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class SimplesQueryResponse extends GraphQLResult[JMap[String, Event]] {
-
- def simples(): Event = {
- val data: JMap[String, Event] = getData
- if (data != null) data.get(SimplesQueryResponse.OPERATION_NAME) else null
- }
-
-}
-
-object SimplesQueryResponse {
-
- private final val OPERATION_NAME: String = "simples"
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResponse_without_option.scala.txt b/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResponse_without_option.scala.txt
deleted file mode 100644
index 9903c93cc..000000000
--- a/src/test/resources/expected-classes/scala/extend/nullreturn/SimplesQueryResponse_without_option.scala.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResult
-import java.util.{ Map => JMap }
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class SimplesQueryResponse extends GraphQLResult[JMap[String, Event]] {
-
- def simples(): Event = {
- val data: JMap[String, Event] = getData
- if (data != null) data.get(SimplesQueryResponse.OPERATION_NAME) else null
- }
-
-}
-
-object SimplesQueryResponse {
-
- private final val OPERATION_NAME: String = "simples"
-
-}
diff --git a/src/test/resources/expected-classes/scala/extend/request/AssetResponseProjection.scala.txt b/src/test/resources/expected-classes/scala/extend/request/AssetResponseProjection.scala.txt
deleted file mode 100644
index fbbefc84c..000000000
--- a/src/test/resources/expected-classes/scala/extend/request/AssetResponseProjection.scala.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseField
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseProjection
-import scala.collection.mutable.HashMap
-import scala.collection.JavaConverters._
-
-/**
- * Response projection for Asset
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class AssetResponseProjection() extends GraphQLResponseProjection() {
-
- def this(projection: AssetResponseProjection) = {
- this()
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
-
- def this(projections: scala.Seq[AssetResponseProjection]) = {
- this()
- if (projections != null) {
- for (projection <- projections) {
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
- }
- }
-
- private final lazy val projectionDepthOnFields = new HashMap[String, Int]
-
- def all$(): AssetResponseProjection = all$(3)
-
- def all$(maxDepth: Int): AssetResponseProjection = {
- this.name()
- this.status()
- this.id()
- this.createdBy()
- this.typename()
- this
- }
-
- def name(): AssetResponseProjection = {
- name(null.asInstanceOf[String])
- }
-
- def name(alias: String): AssetResponseProjection = {
- add$(new GraphQLResponseField("name").alias(alias))
- this
- }
-
- def status(): AssetResponseProjection = {
- status(null.asInstanceOf[String])
- }
-
- def status(alias: String): AssetResponseProjection = {
- add$(new GraphQLResponseField("status").alias(alias))
- this
- }
-
- def id(): AssetResponseProjection = {
- id(null.asInstanceOf[String])
- }
-
- def id(alias: String): AssetResponseProjection = {
- add$(new GraphQLResponseField("id").alias(alias))
- this
- }
-
- def createdBy(): AssetResponseProjection = {
- createdBy(null.asInstanceOf[String])
- }
-
- def createdBy(alias: String): AssetResponseProjection = {
- add$(new GraphQLResponseField("createdBy").alias(alias))
- this
- }
-
- def typename(): AssetResponseProjection = {
- typename(null.asInstanceOf[String])
- }
-
- def typename(alias: String): AssetResponseProjection = {
- add$(new GraphQLResponseField("__typename").alias(alias))
- this
- }
-
- override def deepCopy$(): AssetResponseProjection = new AssetResponseProjection(this)
-
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/request/EventResponseProjection.scala.txt b/src/test/resources/expected-classes/scala/extend/request/EventResponseProjection.scala.txt
deleted file mode 100644
index 8a8020f3e..000000000
--- a/src/test/resources/expected-classes/scala/extend/request/EventResponseProjection.scala.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseField
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseProjection
-import scala.collection.mutable.HashMap
-import scala.collection.JavaConverters._
-
-/**
- * Response projection for Event
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class EventResponseProjection() extends GraphQLResponseProjection() {
-
- def this(projection: EventResponseProjection) = {
- this()
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
-
- def this(projections: scala.Seq[EventResponseProjection]) = {
- this()
- if (projections != null) {
- for (projection <- projections) {
- if (projection != null) {
- for (field <- projection.fields.values.asScala) {
- add$(field)
- }
- }
- }
- }
- }
-
- private final lazy val projectionDepthOnFields = new HashMap[String, Int]
-
- def all$(): EventResponseProjection = all$(3)
-
- def all$(maxDepth: Int): EventResponseProjection = {
- this.status()
- this.createdDateTime()
- if (projectionDepthOnFields.getOrElse("EventResponseProjection.AssetResponseProjection.assets", 0) <= maxDepth) {
- projectionDepthOnFields.put("EventResponseProjection.AssetResponseProjection.assets", projectionDepthOnFields.getOrElse("EventResponseProjection.AssetResponseProjection.assets", 0) + 1)
- this.assets(new AssetResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("EventResponseProjection.AssetResponseProjection.assets", 0)))
- }
- this.id()
- this.createdBy()
- this.typename()
- this
- }
-
- def status(): EventResponseProjection = {
- status(null.asInstanceOf[String])
- }
-
- def status(alias: String): EventResponseProjection = {
- add$(new GraphQLResponseField("status").alias(alias))
- this
- }
-
- def createdDateTime(): EventResponseProjection = {
- createdDateTime(null.asInstanceOf[String])
- }
-
- def createdDateTime(alias: String): EventResponseProjection = {
- add$(new GraphQLResponseField("createdDateTime").alias(alias))
- this
- }
-
- def assets(subProjection: AssetResponseProjection): EventResponseProjection = {
- assets(null.asInstanceOf[String], subProjection)
- }
-
- def assets(alias: String, subProjection: AssetResponseProjection): EventResponseProjection = {
- add$(new GraphQLResponseField("assets").alias(alias).projection(subProjection))
- this
- }
-
- def id(): EventResponseProjection = {
- id(null.asInstanceOf[String])
- }
-
- def id(alias: String): EventResponseProjection = {
- add$(new GraphQLResponseField("id").alias(alias))
- this
- }
-
- def createdBy(): EventResponseProjection = {
- createdBy(null.asInstanceOf[String])
- }
-
- def createdBy(alias: String): EventResponseProjection = {
- add$(new GraphQLResponseField("createdBy").alias(alias))
- this
- }
-
- def typename(): EventResponseProjection = {
- typename(null.asInstanceOf[String])
- }
-
- def typename(alias: String): EventResponseProjection = {
- add$(new GraphQLResponseField("__typename").alias(alias))
- this
- }
-
- override def deepCopy$(): EventResponseProjection = new EventResponseProjection(this)
-
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountQueryResolver.scala.txt
deleted file mode 100644
index c1903b938..000000000
--- a/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountQueryResolver.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait SimpleEventCountQueryResolver {
-
- @throws[Exception]
- def simpleEventCount(): Int
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountQueryResponse.scala.txt b/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountQueryResponse.scala.txt
deleted file mode 100644
index b16e86693..000000000
--- a/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountQueryResponse.scala.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResult
-import java.util.{ Map => JMap }
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class SimpleEventCountQueryResponse extends GraphQLResult[JMap[String, Int]] {
-
- def simpleEventCount(): Int = {
- val data: JMap[String, Int] = getData
- data.get(SimpleEventCountQueryResponse.OPERATION_NAME)
- }
-
-}
-
-object SimpleEventCountQueryResponse {
-
- private final val OPERATION_NAME: String = "simpleEventCount"
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountsQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountsQueryResolver.scala.txt
deleted file mode 100644
index 5eaee69dd..000000000
--- a/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountsQueryResolver.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait SimpleEventCountsQueryResolver {
-
- @throws[Exception]
- def simpleEventCounts(): scala.Option[Int]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountsQueryResponse.scala.txt b/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountsQueryResponse.scala.txt
deleted file mode 100644
index 65aef63f4..000000000
--- a/src/test/resources/expected-classes/scala/extend/resolver/SimpleEventCountsQueryResponse.scala.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResult
-import java.util.{ Map => JMap }
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class SimpleEventCountsQueryResponse extends GraphQLResult[JMap[String, scala.Option[Int]]] {
-
- def simpleEventCounts(): scala.Option[Int] = {
- val data: JMap[String, scala.Option[Int]] = getData
- if (data != null) data.get(SimpleEventCountsQueryResponse.OPERATION_NAME) else None
- }
-
-}
-
-object SimpleEventCountsQueryResponse {
-
- private final val OPERATION_NAME: String = "simpleEventCounts"
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/GraphqlJacksonTypeIdResolver.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/GraphqlJacksonTypeIdResolver.scala.txt
deleted file mode 100644
index bf5acb8c3..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/GraphqlJacksonTypeIdResolver.scala.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.kobylynskyi.graphql.unionresolver
-
-import com.fasterxml.jackson.annotation.JsonTypeInfo
-import com.fasterxml.jackson.databind.DatabindContext
-import com.fasterxml.jackson.databind.JavaType
-import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class GraphqlJacksonTypeIdResolver extends TypeIdResolverBase {
-
- private var superType: JavaType = _
-
- override def init(baseType: JavaType): Unit = {
- superType = baseType
- }
-
- override def typeFromId(context: DatabindContext, typename: String): JavaType = try {
- val clazz = Class.forName("com.kobylynskyi.graphql.unionresolver." +
- typename)
- context.constructSpecializedType(superType, clazz)
- } catch {
- case e: ClassNotFoundException =>
- Console.err.println(e.getMessage)
- null
- }
-
- override def getMechanism = JsonTypeInfo.Id.NAME
-
- override def idFromValue(obj: Any): String = idFromValueAndType(obj, obj.getClass)
-
- override def idFromValueAndType(obj: Any, subType: Class[_]): String = subType.getSimpleName
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/ResultObject.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/ResultObject.scala.txt
deleted file mode 100644
index 7cc67ab11..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/ResultObject.scala.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.kobylynskyi.graphql.unionresolver
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, property = "__typename")
-@com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver(classOf[com.kobylynskyi.graphql.unionresolver.GraphqlJacksonTypeIdResolver])
-trait ResultObject {
-
- val list: scala.Seq[_ <: UnionToResolve]
-
-}
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/UnionMemberA.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/UnionMemberA.scala.txt
deleted file mode 100644
index da9698d0a..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/UnionMemberA.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.kobylynskyi.graphql.unionresolver
-
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class UnionMemberA(
- someField: scala.Option[Int]
-) extends UnionToResolve {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/UnionMemberB.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/UnionMemberB.scala.txt
deleted file mode 100644
index e592e02c6..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/UnionMemberB.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.kobylynskyi.graphql.unionresolver
-
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class UnionMemberB(
- someField: String
-) extends UnionToResolve {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/UnionToResolve.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/UnionToResolve.scala.txt
deleted file mode 100644
index 7a90bd383..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/UnionToResolve.scala.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.kobylynskyi.graphql.unionresolver
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, property = "__typename")
-@com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver(classOf[com.kobylynskyi.graphql.unionresolver.GraphqlJacksonTypeIdResolver])
-trait UnionToResolve {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/GraphqlJacksonTypeIdResolver.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/GraphqlJacksonTypeIdResolver.scala.txt
deleted file mode 100644
index 3ec995553..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/GraphqlJacksonTypeIdResolver.scala.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-import com.fasterxml.jackson.annotation.JsonTypeInfo
-import com.fasterxml.jackson.databind.DatabindContext
-import com.fasterxml.jackson.databind.JavaType
-import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class GraphqlJacksonTypeIdResolver extends TypeIdResolverBase {
-
- private var superType: JavaType = _
-
- override def init(baseType: JavaType): Unit = {
- superType = baseType
- }
-
- override def typeFromId(context: DatabindContext, typename: String): JavaType = try {
- val clazz = Class.forName("My" +
- typename +
- "Suffix")
- context.constructSpecializedType(superType, clazz)
- } catch {
- case e: ClassNotFoundException =>
- Console.err.println(e.getMessage)
- null
- }
-
- override def getMechanism = JsonTypeInfo.Id.NAME
-
- override def idFromValue(obj: Any): String = idFromValueAndType(obj, obj.getClass)
-
- override def idFromValueAndType(obj: Any, subType: Class[_]): String = subType.getSimpleName
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyResultObjectSuffix.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyResultObjectSuffix.scala.txt
deleted file mode 100644
index b921de8d0..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyResultObjectSuffix.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, property = "__typename")
-@com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver(classOf[GraphqlJacksonTypeIdResolver])
-trait MyResultObjectSuffix {
-
- val list: scala.Seq[_ <: MyUnionToResolveSuffix]
-
-}
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyUnionMemberASuffix.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyUnionMemberASuffix.scala.txt
deleted file mode 100644
index b1c9cdde2..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyUnionMemberASuffix.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class MyUnionMemberASuffix(
- someField: scala.Option[Int]
-) extends MyUnionToResolveSuffix {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyUnionMemberBSuffix.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyUnionMemberBSuffix.scala.txt
deleted file mode 100644
index 27e30272f..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyUnionMemberBSuffix.scala.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class MyUnionMemberBSuffix(
- someField: String
-) extends MyUnionToResolveSuffix {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyUnionToResolveSuffix.scala.txt b/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyUnionToResolveSuffix.scala.txt
deleted file mode 100644
index 36671a4b3..000000000
--- a/src/test/resources/expected-classes/scala/jackson-resolver-union/without-model-package/MyUnionToResolveSuffix.scala.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, property = "__typename")
-@com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver(classOf[GraphqlJacksonTypeIdResolver])
-trait MyUnionToResolveSuffix {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/optional/InterfaceWithOptionalField.scala.txt b/src/test/resources/expected-classes/scala/optional/InterfaceWithOptionalField.scala.txt
deleted file mode 100644
index cddf4f04c..000000000
--- a/src/test/resources/expected-classes/scala/optional/InterfaceWithOptionalField.scala.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait InterfaceWithOptionalField {
-
- val test: Int
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/optional/TypeWithMandatoryField.scala.txt b/src/test/resources/expected-classes/scala/optional/TypeWithMandatoryField.scala.txt
deleted file mode 100644
index 63d3908e7..000000000
--- a/src/test/resources/expected-classes/scala/optional/TypeWithMandatoryField.scala.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class TypeWithMandatoryField(
- override val test: Int
-) extends InterfaceWithOptionalField {
-
- override def toString(): String = {
- scala.Seq(
- "test: " + test
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
-
-object TypeWithMandatoryField {
-
- def builder(): TypeWithMandatoryField.Builder = new Builder()
-
- class Builder {
-
- private var test: Int = _
-
- def setTest(test: Int): Builder = {
- this.test = test
- this
- }
-
- def build(): TypeWithMandatoryField = TypeWithMandatoryField(test)
-
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/relay/Organization.scala.txt b/src/test/resources/expected-classes/scala/relay/Organization.scala.txt
deleted file mode 100644
index bf8d156da..000000000
--- a/src/test/resources/expected-classes/scala/relay/Organization.scala.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Organization(
- @javax.validation.constraints.NotNull
- id: String
-) {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/relay/OrganizationsQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/relay/OrganizationsQueryResolver.scala.txt
deleted file mode 100644
index 884aaf942..000000000
--- a/src/test/resources/expected-classes/scala/relay/OrganizationsQueryResolver.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait OrganizationsQueryResolver {
-
- @throws[Exception]
- def organizations(first: scala.Option[Int], after: String, env: graphql.schema.DataFetchingEnvironment): graphql.relay.Connection[Organization]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/relay/QueryResolver.scala.txt b/src/test/resources/expected-classes/scala/relay/QueryResolver.scala.txt
deleted file mode 100644
index eeb337889..000000000
--- a/src/test/resources/expected-classes/scala/relay/QueryResolver.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait QueryResolver {
-
- @throws[Exception]
- def users(first: Int, after: String, env: graphql.schema.DataFetchingEnvironment): graphql.relay.Connection[User]
-
- @throws[Exception]
- def organizations(first: scala.Option[Int], after: String, env: graphql.schema.DataFetchingEnvironment): graphql.relay.Connection[Organization]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/relay/User.scala.txt b/src/test/resources/expected-classes/scala/relay/User.scala.txt
deleted file mode 100644
index 7da809ee3..000000000
--- a/src/test/resources/expected-classes/scala/relay/User.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class User(
- @javax.validation.constraints.NotNull
- id: String,
- name: String
-) {
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/relay/UsersQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/relay/UsersQueryResolver.scala.txt
deleted file mode 100644
index 0949142ea..000000000
--- a/src/test/resources/expected-classes/scala/relay/UsersQueryResolver.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait UsersQueryResolver {
-
- @throws[Exception]
- def users(first: Int, after: String, env: graphql.schema.DataFetchingEnvironment): graphql.relay.Connection[User]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/relay/UsersQueryResolver_reactive.scala.txt b/src/test/resources/expected-classes/scala/relay/UsersQueryResolver_reactive.scala.txt
deleted file mode 100644
index 619e69bd6..000000000
--- a/src/test/resources/expected-classes/scala/relay/UsersQueryResolver_reactive.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait UsersQueryResolver {
-
- @throws[Exception]
- def users(first: Int, after: String, env: graphql.schema.DataFetchingEnvironment): reactor.core.publisher.Mono[graphql.relay.Connection[User]]
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/tostring/QueryPrivateParametrizedInput.scala.txt b/src/test/resources/expected-classes/scala/tostring/QueryPrivateParametrizedInput.scala.txt
deleted file mode 100644
index ebe9915cb..000000000
--- a/src/test/resources/expected-classes/scala/tostring/QueryPrivateParametrizedInput.scala.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.kobylynskyi.graphql.codegen.prot
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLParametrizedInput
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-import TestEnum._
-
-/**
- * Parametrized input for field private in type Query
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class QueryPrivateParametrizedInput(
- int: Int,
- intOpt: scala.Option[Int],
- seq1: scala.Seq[scala.Option[Int]],
- seq2: scala.Seq[Int],
- `new`: String,
- enum: TestEnum = TestEnum.long,
- createdAfter: java.time.ZonedDateTime
-) extends GraphQLParametrizedInput {
-
- override def deepCopy(): QueryPrivateParametrizedInput = {
- QueryPrivateParametrizedInput(
- this.int,
- this.intOpt,
- this.seq1,
- this.seq2,
- this.`new`,
- this.enum,
- this.createdAfter
- )
- }
-
- override def toString(): String = {
- scala.Seq(
- "int: " + GraphQLRequestSerializer.getEntry(int),
- if (intOpt.isDefined) "intOpt: " + GraphQLRequestSerializer.getEntry(intOpt.get) else "",
- if (seq1 != null) "seq1: " + GraphQLRequestSerializer.getEntry(seq1.asJava) else "",
- if (seq2 != null) "seq2: " + GraphQLRequestSerializer.getEntry(seq2.asJava) else "",
- if (`new` != null) "new: " + GraphQLRequestSerializer.getEntry(`new`) else "",
- if (enum != null) "enum: " + GraphQLRequestSerializer.getEntry(enum) else "",
- if (createdAfter != null) "createdAfter: " + GraphQLRequestSerializer.getEntry(createdAfter, true) else ""
- ).filter(_ != "").mkString("(", ",", ")")
- }
-
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/tostring/SuperQueryResponse.scala.txt b/src/test/resources/expected-classes/scala/tostring/SuperQueryResponse.scala.txt
deleted file mode 100644
index 49f2b7f03..000000000
--- a/src/test/resources/expected-classes/scala/tostring/SuperQueryResponse.scala.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.kobylynskyi.graphql.codegen.prot
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResult
-import java.util.{ Map => JMap }
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class SuperQueryResponse extends GraphQLResult[JMap[String, String]] {
-
- def `super`(): String = {
- val data: JMap[String, String] = getData
- if (data != null) data.get(SuperQueryResponse.OPERATION_NAME) else null
- }
-
-}
-
-object SuperQueryResponse {
-
- private final val OPERATION_NAME: String = "super"
-
-}
diff --git a/src/test/resources/expected-classes/scala/tostring/Synchronized.scala.txt b/src/test/resources/expected-classes/scala/tostring/Synchronized.scala.txt
deleted file mode 100644
index 54e3076b1..000000000
--- a/src/test/resources/expected-classes/scala/tostring/Synchronized.scala.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.kobylynskyi.graphql.codegen.prot
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
-import scala.collection.JavaConverters._
-import TestEnum._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Synchronized(
- void: String,
- Wait: Char,
- `this`: Char,
- `super`: Char,
- `private`: Char,
- native: Char,
- that: Char,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.kobylynskyi.graphql.codegen.prot.TestEnumTypeRefer])
- enum: TestEnum,
- Synchronized: Synchronized,
- date: java.time.ZonedDateTime
-) {
-
- override def toString(): String = {
- scala.Seq(
- if (void != null) "void: " + GraphQLRequestSerializer.getEntry(void) else "",
- "wait: " + GraphQLRequestSerializer.getEntry(Wait),
- "this: " + GraphQLRequestSerializer.getEntry(`this`),
- "super: " + GraphQLRequestSerializer.getEntry(`super`),
- "private: " + GraphQLRequestSerializer.getEntry(`private`),
- "native: " + GraphQLRequestSerializer.getEntry(native),
- "that: " + GraphQLRequestSerializer.getEntry(that),
- if (enum != null) "enum: " + GraphQLRequestSerializer.getEntry(enum) else "",
- if (Synchronized != null) "Synchronized: " + GraphQLRequestSerializer.getEntry(Synchronized) else "",
- if (date != null) "date: " + GraphQLRequestSerializer.getEntry(date, true) else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
-
-object Synchronized {
-
- def builder(): Synchronized.Builder = new Builder()
-
- class Builder {
-
- private var void: String = _
- private var Wait: Char = _
- private var `this`: Char = _
- private var `super`: Char = _
- private var `private`: Char = _
- private var native: Char = _
- private var that: Char = _
- private var enum: TestEnum = _
- private var Synchronized: Synchronized = _
- private var date: java.time.ZonedDateTime = _
-
- def setVoid(void: String): Builder = {
- this.void = void
- this
- }
-
- def setWait(Wait: Char): Builder = {
- this.Wait = Wait
- this
- }
-
- def setThis(`this`: Char): Builder = {
- this.`this` = `this`
- this
- }
-
- def setSuper(`super`: Char): Builder = {
- this.`super` = `super`
- this
- }
-
- def setPrivate(`private`: Char): Builder = {
- this.`private` = `private`
- this
- }
-
- def setNative(native: Char): Builder = {
- this.native = native
- this
- }
-
- def setThat(that: Char): Builder = {
- this.that = that
- this
- }
-
- def setEnum(enum: TestEnum): Builder = {
- this.enum = enum
- this
- }
-
- def setSynchronized(Synchronized: Synchronized): Builder = {
- this.Synchronized = Synchronized
- this
- }
-
- def setDate(date: java.time.ZonedDateTime): Builder = {
- this.date = date
- this
- }
-
- def build(): Synchronized = Synchronized(void, Wait, `this`, `super`, `private`, native, that, enum, Synchronized, date)
-
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/tostring/SynchronizedResponseProjection.scala.txt b/src/test/resources/expected-classes/scala/tostring/SynchronizedResponseProjection.scala.txt
deleted file mode 100644
index 4ea404349..000000000
--- a/src/test/resources/expected-classes/scala/tostring/SynchronizedResponseProjection.scala.txt
+++ /dev/null
@@ -1,169 +0,0 @@
-package com.kobylynskyi.graphql.codegen.prot
-
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseField
-import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLResponseProjection
-import java.util.Objects
-import scala.collection.mutable.HashMap
-
-/**
- * Response projection for Synchronized
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-class SynchronizedResponseProjection extends GraphQLResponseProjection {
-
- private final lazy val projectionDepthOnFields = new HashMap[String, Int]
-
- def all$(): SynchronizedResponseProjection = all$(3)
-
- def all$(maxDepth: Int): SynchronizedResponseProjection = {
- this.void()
- if (projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.Wait", 0) <= maxDepth) {
- projectionDepthOnFields.put("SynchronizedResponseProjection.CharResponseProjection.Wait", projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.Wait", 0) + 1)
- this.Wait(new CharResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.Wait", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.`this`", 0) <= maxDepth) {
- projectionDepthOnFields.put("SynchronizedResponseProjection.CharResponseProjection.`this`", projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.`this`", 0) + 1)
- this.`this`(new CharResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.`this`", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.`super`", 0) <= maxDepth) {
- projectionDepthOnFields.put("SynchronizedResponseProjection.CharResponseProjection.`super`", projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.`super`", 0) + 1)
- this.`super`(new CharResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.`super`", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.`private`", 0) <= maxDepth) {
- projectionDepthOnFields.put("SynchronizedResponseProjection.CharResponseProjection.`private`", projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.`private`", 0) + 1)
- this.`private`(new CharResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.`private`", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.native", 0) <= maxDepth) {
- projectionDepthOnFields.put("SynchronizedResponseProjection.CharResponseProjection.native", projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.native", 0) + 1)
- this.native(new CharResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.native", 0)))
- }
- if (projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.that", 0) <= maxDepth) {
- projectionDepthOnFields.put("SynchronizedResponseProjection.CharResponseProjection.that", projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.that", 0) + 1)
- this.that(new CharResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.CharResponseProjection.that", 0)))
- }
- this.enum()
- if (projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.SynchronizedResponseProjection.Synchronized", 0) <= maxDepth) {
- projectionDepthOnFields.put("SynchronizedResponseProjection.SynchronizedResponseProjection.Synchronized", projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.SynchronizedResponseProjection.Synchronized", 0) + 1)
- this.Synchronized(new SynchronizedResponseProjection().all$(maxDepth - projectionDepthOnFields.getOrElse("SynchronizedResponseProjection.SynchronizedResponseProjection.Synchronized", 0)))
- }
- this.date()
- this.typename()
- this
- }
-
- def void(): SynchronizedResponseProjection = {
- void(null.asInstanceOf[String])
- }
-
- def void(alias: String): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("void").alias(alias))
- this
- }
-
- def Wait(subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- Wait(null.asInstanceOf[String], subProjection)
- }
-
- def Wait(alias: String, subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("wait").alias(alias).projection(subProjection))
- this
- }
-
- def `this`(subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- `this`(null.asInstanceOf[String], subProjection)
- }
-
- def `this`(alias: String, subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("this").alias(alias).projection(subProjection))
- this
- }
-
- def `super`(subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- `super`(null.asInstanceOf[String], subProjection)
- }
-
- def `super`(alias: String, subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("super").alias(alias).projection(subProjection))
- this
- }
-
- def `private`(subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- `private`(null.asInstanceOf[String], subProjection)
- }
-
- def `private`(alias: String, subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("private").alias(alias).projection(subProjection))
- this
- }
-
- def native(subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- native(null.asInstanceOf[String], subProjection)
- }
-
- def native(alias: String, subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("native").alias(alias).projection(subProjection))
- this
- }
-
- def that(subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- that(null.asInstanceOf[String], subProjection)
- }
-
- def that(alias: String, subProjection: CharResponseProjection): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("that").alias(alias).projection(subProjection))
- this
- }
-
- def enum(): SynchronizedResponseProjection = {
- enum(null.asInstanceOf[String])
- }
-
- def enum(alias: String): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("enum").alias(alias))
- this
- }
-
- def Synchronized(subProjection: SynchronizedResponseProjection): SynchronizedResponseProjection = {
- Synchronized(null.asInstanceOf[String], subProjection)
- }
-
- def Synchronized(alias: String, subProjection: SynchronizedResponseProjection): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("Synchronized").alias(alias).projection(subProjection))
- this
- }
-
- def date(): SynchronizedResponseProjection = {
- date(null.asInstanceOf[String])
- }
-
- def date(alias: String): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("date").alias(alias))
- this
- }
-
- def typename(): SynchronizedResponseProjection = {
- typename(null.asInstanceOf[String])
- }
-
- def typename(alias: String): SynchronizedResponseProjection = {
- fields.add(new GraphQLResponseField("__typename").alias(alias))
- this
- }
-
- override def equals(obj: Any): Boolean = {
- if (this == obj) {
- return true
- }
- if (obj == null || getClass != obj.getClass) {
- return false
- }
- val that = obj.asInstanceOf[SynchronizedResponseProjection]
- Objects.equals(fields, that.fields)
- }
-
- override def hashCode(): Int = Objects.hash(fields)
-
-}
diff --git a/src/test/resources/expected-classes/scala/tostring/TOSTRING_Synchronized.scala.txt b/src/test/resources/expected-classes/scala/tostring/TOSTRING_Synchronized.scala.txt
deleted file mode 100644
index 00bdfd6bb..000000000
--- a/src/test/resources/expected-classes/scala/tostring/TOSTRING_Synchronized.scala.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.kobylynskyi.graphql.codegen.prot
-
-import scala.collection.JavaConverters._
-import TestEnum._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Synchronized(
- void: String,
- Wait: Char,
- `this`: Char,
- `super`: Char,
- `private`: Char,
- native: Char,
- that: Char,
- @com.fasterxml.jackson.module.scala.JsonScalaEnumeration(classOf[com.kobylynskyi.graphql.codegen.prot.TestEnumTypeRefer])
- enum: TestEnum,
- Synchronized: Synchronized,
- date: java.time.ZonedDateTime
-) {
-
- override def toString(): String = {
- scala.Seq(
- if (void != null) "void: \"void\"" else "",
- "wait: " + Wait,
- "this: " + `this`,
- "super: " + `super`,
- "private: " + `private`,
- "native: " + native,
- "that: " + that,
- if (enum != null) "enum: enum" else "",
- if (Synchronized != null) "Synchronized: Synchronized" else "",
- if (date != null) "date: date" else ""
- ).filter(_ != "").mkString("{", ",", "}")
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/Node.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/Node.scala.txt
deleted file mode 100644
index ff924075c..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/Node.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait Node {
-
-}
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/Profile.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/Profile.scala.txt
deleted file mode 100644
index 9fab54115..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/Profile.scala.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.github.graphql
-
-import scala.collection.JavaConverters._
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-case class Profile(
- @javax.validation.constraints.NotNull
- firstName: String,
- @javax.validation.constraints.NotNull
- lastName: String
-) {
-
-}
-
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/QueryResolver.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/QueryResolver.scala.txt
deleted file mode 100644
index f6c3a7ebf..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/QueryResolver.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait QueryResolver {
-
- @throws[Exception]
- def userCurrent(): User
-
-}
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/User.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/User.scala.txt
deleted file mode 100644
index 392a9cf7a..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/User.scala.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait User extends Node {
-
- @javax.validation.constraints.NotNull
- val username: String
-
- @javax.validation.constraints.NotNull
- val email: String
-
- val profile: Profile
-
-}
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/UserCurrentQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/UserCurrentQueryResolver.scala.txt
deleted file mode 100644
index 5d5ad4bb9..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces-extends-interface/UserCurrentQueryResolver.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait UserCurrentQueryResolver {
-
- @throws[Exception]
- def userCurrent(): User
-
-}
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces/Order.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces/Order.scala.txt
deleted file mode 100644
index 81938ce2d..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces/Order.scala.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait Order {
-
- @javax.validation.constraints.NotNull
- val number: String
-
- @javax.validation.constraints.NotNull
- val price: String
-
-}
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces/QueryResolver.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces/QueryResolver.scala.txt
deleted file mode 100644
index f6c3a7ebf..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces/QueryResolver.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait QueryResolver {
-
- @throws[Exception]
- def userCurrent(): User
-
-}
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces/User.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces/User.scala.txt
deleted file mode 100644
index a20e2cade..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces/User.scala.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait User {
-
- @javax.validation.constraints.NotNull
- val username: String
-
- @javax.validation.constraints.NotNull
- val email: String
-
-}
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces/UserCurrentQueryResolver.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces/UserCurrentQueryResolver.scala.txt
deleted file mode 100644
index 5d5ad4bb9..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces/UserCurrentQueryResolver.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.github.graphql
-
-
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait UserCurrentQueryResolver {
-
- @throws[Exception]
- def userCurrent(): User
-
-}
diff --git a/src/test/resources/expected-classes/scala/types-as-interfaces/UserResolver.scala.txt b/src/test/resources/expected-classes/scala/types-as-interfaces/UserResolver.scala.txt
deleted file mode 100644
index ed31fa316..000000000
--- a/src/test/resources/expected-classes/scala/types-as-interfaces/UserResolver.scala.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.github.graphql
-
-
-/**
- * Resolver for User
- */
-@javax.annotation.Generated(
- value = Array("com.kobylynskyi.graphql.codegen.GraphQLCodegen"),
- date = "2020-12-31T23:59:59-0500"
-)
-trait UserResolver {
-
- @javax.validation.constraints.NotNull
- @throws[Exception]
- def orders(user: User): scala.Seq[Order]
-
-}
From 25e23b49cd17cccb5af68744da8e6b4ab7c4e83c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?D=C3=A1vid=20Besenyei?=
<37157280+Besi97@users.noreply.github.com>
Date: Sat, 6 Jun 2026 16:13:15 +0200
Subject: [PATCH 002/115] chore: update Gradle wrapper (#2)
Update Gradle wrapper to latest pre-9 version. Unfortunately, the repository is not yet compatible with Gradle 9.
---
gradle/wrapper/gradle-wrapper.jar | Bin 59203 -> 43764 bytes
gradle/wrapper/gradle-wrapper.properties | 4 +-
gradlew | 286 ++++++++++++++---------
gradlew.bat | 41 ++--
4 files changed, 202 insertions(+), 129 deletions(-)
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index e708b1c023ec8b20f512888fe07c5bd3ff77bb8f..1b33c55baabb587c669f562ae36f953de2481846 100644
GIT binary patch
literal 43764
zcma&OWmKeVvL#I6?i3D%6z=Zs?ofE*?rw#G$eqJB
ziT4y8-Y@s9rkH0Tz>ll(^xkcTl)CY?rS&9VNd66Yc)g^6)JcWaY(5$5gt
z8gr3SBXUTN;~cBgz&})qX%#!Fxom2Yau_`&8)+6aSN7YY+pS410rRUU*>J}qL0TnJ
zRxt*7QeUqTh8j)Q&iavh<}L+$Jqz))<`IfKussVk%%Ah-Ti?Eo0hQH!rK%K=#EAw0
zwq@@~XNUXRnv8$;zv<6rCRJ6fPD^hfrh;0K?n
z=p!u^3xOgWZ%f3+?+>H)9+w^$Tn1e;?UpVMJb!!;f)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