Repository: typesafegithub/github-workflows-kt
Pull request #1025 (2023-10-14 19:53:56)

[#941] refactor: remove needed parts of typing module to abg
Another step towards making action-binding-generator a deployable library.
After this step, action-binding-generator doesn't depend on any internal module.


Patch:
diff --git a/automation/action-binding-generator/api/action-binding-generator.api b/automation/action-binding-generator/api/action-binding-generator.api
index 0f853e22a..3ce3de4b6 100644
--- a/automation/action-binding-generator/api/action-binding-generator.api
+++ b/automation/action-binding-generator/api/action-binding-generator.api
@@ -15,9 +15,32 @@ public final class io/github/typesafegithub/workflows/actionbindinggenerator/Act
 	public fun toString ()Ljava/lang/String;
 }
 
+public final class io/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords {
+	public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
+	public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
+	public final fun component1 ()Ljava/lang/String;
+	public final fun component2 ()Ljava/lang/String;
+	public final fun component3 ()Ljava/lang/String;
+	public final fun component4 ()Ljava/lang/String;
+	public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords;
+	public static synthetic fun copy$default (Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords;
+	public fun equals (Ljava/lang/Object;)Z
+	public final fun getDeprecatedByVersion ()Ljava/lang/String;
+	public final fun getName ()Ljava/lang/String;
+	public final fun getOwner ()Ljava/lang/String;
+	public final fun getVersion ()Ljava/lang/String;
+	public fun hashCode ()I
+	public fun toString ()Ljava/lang/String;
+}
+
+public final class io/github/typesafegithub/workflows/actionbindinggenerator/ActionCoordsKt {
+	public static final fun getPrettyPrint (Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords;)Ljava/lang/String;
+	public static final fun isTopLevel (Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords;)Z
+}
+
 public final class io/github/typesafegithub/workflows/actionbindinggenerator/GenerationKt {
-	public static final fun generateBinding (Lio/github/typesafegithub/workflows/actionsmetadata/model/ActionCoords;Ljava/lang/String;ZLio/github/typesafegithub/workflows/actionbindinggenerator/Metadata;Ljava/util/Map;)Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionBinding;
-	public static synthetic fun generateBinding$default (Lio/github/typesafegithub/workflows/actionsmetadata/model/ActionCoords;Ljava/lang/String;ZLio/github/typesafegithub/workflows/actionbindinggenerator/Metadata;Ljava/util/Map;ILjava/lang/Object;)Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionBinding;
+	public static final fun generateBinding (Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords;Ljava/lang/String;ZLio/github/typesafegithub/workflows/actionbindinggenerator/Metadata;Ljava/util/Map;)Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionBinding;
+	public static synthetic fun generateBinding$default (Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords;Ljava/lang/String;ZLio/github/typesafegithub/workflows/actionbindinggenerator/Metadata;Ljava/util/Map;ILjava/lang/Object;)Lio/github/typesafegithub/workflows/actionbindinggenerator/ActionBinding;
 }
 
 public final class io/github/typesafegithub/workflows/actionbindinggenerator/Input {
@@ -132,3 +155,6 @@ public final class io/github/typesafegithub/workflows/actionbindinggenerator/Typ
 	public static final fun deleteActionTypesYamlCacheIfObsolete ()V
 }
 
+public abstract interface class io/github/typesafegithub/workflows/actionbindinggenerator/Typing {
+}
+
diff --git a/automation/action-binding-generator/build.gradle.kts b/automation/action-binding-generator/build.gradle.kts
index 32c217bcc..880887e22 100644
--- a/automation/action-binding-generator/build.gradle.kts
+++ b/automation/action-binding-generator/build.gradle.kts
@@ -8,7 +8,6 @@ plugins {
 }
 
 dependencies {
-    implementation(projects.automation.typings)
     implementation("com.squareup:kotlinpoet:1.14.2")
     implementation("com.charleskorn.kaml:kaml:0.55.0")
 
diff --git a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionCoords.kt b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords.kt
similarity index 53%
rename from automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionCoords.kt
rename to automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords.kt
index 788989239..b98371acc 100644
--- a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionCoords.kt
+++ b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ActionCoords.kt
@@ -1,6 +1,6 @@
-package io.github.typesafegithub.workflows.actionsmetadata.model
+package io.github.typesafegithub.workflows.actionbindinggenerator
 
-data class ActionCoords(
+public data class ActionCoords(
     val owner: String,
     val name: String,
     val version: String,
@@ -11,6 +11,6 @@ data class ActionCoords(
  * A top-level action is an action with its `action.y(a)ml` file in the repository root, as opposed to actions stored
  * in subdirectories.
  */
-val ActionCoords.isTopLevel: Boolean get() = "/" !in name
+public val ActionCoords.isTopLevel: Boolean get() = "/" !in name
 
-val ActionCoords.prettyPrint: String get() = "$owner/$name@$version"
+public val ActionCoords.prettyPrint: String get() = "$owner/$name@$version"
diff --git a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionTypes.kt b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ActionTypes.kt
similarity index 84%
rename from automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionTypes.kt
rename to automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ActionTypes.kt
index 869d5f113..34d942cd7 100644
--- a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionTypes.kt
+++ b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ActionTypes.kt
@@ -1,16 +1,16 @@
-package io.github.typesafegithub.workflows.actionsmetadata.model
+package io.github.typesafegithub.workflows.actionbindinggenerator
 
 import kotlinx.serialization.SerialName
 import kotlinx.serialization.Serializable
 
 @Serializable
-data class ActionTypes(
+internal data class ActionTypes(
     val inputs: Map<String, ActionType> = emptyMap(),
     val outputs: Map<String, ActionType> = emptyMap(),
 )
 
 @Serializable
-data class ActionType(
+internal data class ActionType(
     val type: ActionTypeEnum,
     val name: String? = null,
     @SerialName("named-values")
@@ -27,7 +27,7 @@ data class ActionType(
 }
 
 @Serializable
-enum class ActionTypeEnum {
+internal enum class ActionTypeEnum {
     @SerialName("string")
     String,
 
@@ -47,7 +47,7 @@ enum class ActionTypeEnum {
     Enum,
 }
 
-fun ActionType.validateType() {
+internal fun ActionType.validateType() {
     if (type == ActionTypeEnum.List) {
         check(separator.isNotEmpty() && listItem != null) {
             "Invalid type $this: needs a separator and a listItem"
diff --git a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ClassNaming.kt b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ClassNaming.kt
index 3b3960700..5a78011d6 100644
--- a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ClassNaming.kt
+++ b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ClassNaming.kt
@@ -1,6 +1,5 @@
 package io.github.typesafegithub.workflows.actionbindinggenerator
 
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
 import java.util.Locale
 
 internal fun ActionCoords.buildActionClassName(): String {
diff --git a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/Generation.kt b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/Generation.kt
index 5825e14e6..ab795ef13 100644
--- a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/Generation.kt
+++ b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/Generation.kt
@@ -16,9 +16,6 @@ import com.squareup.kotlinpoet.asClassName
 import com.squareup.kotlinpoet.asTypeName
 import io.github.typesafegithub.workflows.actionbindinggenerator.Properties.CUSTOM_INPUTS
 import io.github.typesafegithub.workflows.actionbindinggenerator.Properties.CUSTOM_VERSION
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
-import io.github.typesafegithub.workflows.actionsmetadata.model.StringTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.Typing
 import java.nio.file.Path
 
 public data class ActionBinding(
@@ -293,7 +290,7 @@ private fun TypeSpec.Builder.addMaybeDeprecated(coords: ActionCoords): TypeSpec.
     if (coords.deprecatedByVersion == null) {
         return this
     }
-    val newerClass = coords.copy(version = coords.deprecatedByVersion!!)
+    val newerClass = coords.copy(version = coords.deprecatedByVersion)
     addAnnotation(
         AnnotationSpec.builder(Deprecated::class)
             .addMember("message = %S", "This action has a newer major version: ${newerClass.buildActionClassName()}")
diff --git a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/MetadataReading.kt b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/MetadataReading.kt
index 45da19695..a4ef65b71 100644
--- a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/MetadataReading.kt
+++ b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/MetadataReading.kt
@@ -1,7 +1,6 @@
 package io.github.typesafegithub.workflows.actionbindinggenerator
 
 import com.charleskorn.kaml.Yaml
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
 import kotlinx.serialization.Serializable
 import kotlinx.serialization.decodeFromString
 import java.io.File
@@ -49,8 +48,6 @@ internal val ActionCoords.releasesUrl: String get() = "$gitHubUrl/releases"
 
 internal val ActionCoords.gitHubUrl: String get() = "https://github.com/$owner/$name"
 
-internal val ActionCoords.prettyPrint: String get() = "$owner/$name@$version"
-
 internal fun ActionCoords.fetchMetadata(
     commitHash: String = getCommitHashFromFileSystem(),
     useCache: Boolean = true,
diff --git a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesProviding.kt b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesProviding.kt
index ff8f3e87d..44f398f2e 100644
--- a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesProviding.kt
+++ b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesProviding.kt
@@ -1,18 +1,6 @@
 package io.github.typesafegithub.workflows.actionbindinggenerator
 
 import com.charleskorn.kaml.Yaml
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionType
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionTypeEnum
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionTypes
-import io.github.typesafegithub.workflows.actionsmetadata.model.BooleanTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.EnumTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.FloatTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerWithSpecialValueTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.ListOfTypings
-import io.github.typesafegithub.workflows.actionsmetadata.model.StringTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.Typing
 import kotlinx.serialization.decodeFromString
 import java.io.File
 import java.io.IOException
diff --git a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesYamlReading.kt b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesYamlReading.kt
new file mode 100644
index 000000000..e9588415a
--- /dev/null
+++ b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesYamlReading.kt
@@ -0,0 +1,21 @@
+package io.github.typesafegithub.workflows.actionbindinggenerator
+
+private fun ActionType.toTyping(fieldName: String): Typing =
+    when (this.type) {
+        ActionTypeEnum.String -> StringTyping
+        ActionTypeEnum.Boolean -> BooleanTyping
+        ActionTypeEnum.Integer -> {
+            if (this.namedValues.isEmpty()) {
+                IntegerTyping
+            } else {
+                IntegerWithSpecialValueTyping(typeName = name, specialValues = namedValues)
+            }
+        }
+        ActionTypeEnum.Float -> FloatTyping
+        ActionTypeEnum.List ->
+            ListOfTypings(
+                delimiter = separator,
+                typing = listItem?.toTyping(fieldName) ?: error("Lists should have list-item set!"),
+            )
+        ActionTypeEnum.Enum -> EnumTyping(typeName = name, items = allowedValues)
+    }
diff --git a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/Typing.kt b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/Typing.kt
similarity index 69%
rename from automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/Typing.kt
rename to automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/Typing.kt
index 6558f273a..279d58300 100644
--- a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/Typing.kt
+++ b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/Typing.kt
@@ -1,10 +1,10 @@
-package io.github.typesafegithub.workflows.actionsmetadata.model
+package io.github.typesafegithub.workflows.actionbindinggenerator
 
-sealed interface Typing
+public sealed interface Typing
 
-object BooleanTyping : Typing
+internal object BooleanTyping : Typing
 
-data class EnumTyping(
+internal data class EnumTyping(
     /**
      * Custom type name when used in Kotlin code.
      * Null means that the type name should be inferred from the input name.
@@ -21,11 +21,11 @@ data class EnumTyping(
     val itemsNames: List<String>? = null,
 ) : Typing
 
-object FloatTyping : Typing
+internal object FloatTyping : Typing
 
-object IntegerTyping : Typing
+internal object IntegerTyping : Typing
 
-data class IntegerWithSpecialValueTyping(
+internal data class IntegerWithSpecialValueTyping(
     /**
      * Custom type name when used in Kotlin code.
      * Null means that the type name should be inferred from the input name.
@@ -34,9 +34,9 @@ data class IntegerWithSpecialValueTyping(
     val specialValues: Map<String, Int>,
 ) : Typing
 
-data class ListOfTypings(
+internal data class ListOfTypings(
     val delimiter: String,
     val typing: Typing = StringTyping,
 ) : Typing
 
-object StringTyping : Typing
+internal object StringTyping : Typing
diff --git a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypingGeneration.kt b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypingGeneration.kt
index 2d29c73d3..9868a19dd 100644
--- a/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypingGeneration.kt
+++ b/automation/action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypingGeneration.kt
@@ -10,15 +10,6 @@ import com.squareup.kotlinpoet.TypeName
 import com.squareup.kotlinpoet.TypeSpec
 import com.squareup.kotlinpoet.asClassName
 import com.squareup.kotlinpoet.asTypeName
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
-import io.github.typesafegithub.workflows.actionsmetadata.model.BooleanTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.EnumTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.FloatTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerWithSpecialValueTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.ListOfTypings
-import io.github.typesafegithub.workflows.actionsmetadata.model.StringTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.Typing
 
 internal fun Typing.getClassName(
     actionPackageName: String,
diff --git a/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/GenerationEntryPoint.kt b/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/GenerationEntryPoint.kt
index b05c0fbec..90498e874 100644
--- a/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/GenerationEntryPoint.kt
+++ b/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/GenerationEntryPoint.kt
@@ -1,15 +1,15 @@
 package io.github.typesafegithub.workflows.codegenerator
 
 import io.github.typesafegithub.workflows.actionbindinggenerator.ActionBinding
+import io.github.typesafegithub.workflows.actionbindinggenerator.ActionCoords
 import io.github.typesafegithub.workflows.actionbindinggenerator.deleteActionTypesYamlCacheIfObsolete
 import io.github.typesafegithub.workflows.actionbindinggenerator.deleteActionYamlCacheIfObsolete
 import io.github.typesafegithub.workflows.actionbindinggenerator.generateBinding
+import io.github.typesafegithub.workflows.actionbindinggenerator.prettyPrint
 import io.github.typesafegithub.workflows.actionsmetadata.bindingsToGenerate
 import io.github.typesafegithub.workflows.actionsmetadata.model.ActionBindingRequest
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
 import io.github.typesafegithub.workflows.actionsmetadata.model.TypingsSource
 import io.github.typesafegithub.workflows.actionsmetadata.model.Version
-import io.github.typesafegithub.workflows.actionsmetadata.model.prettyPrint
 import io.github.typesafegithub.workflows.dsl.expressions.generateEventPayloads
 import java.nio.file.Path
 import java.nio.file.Paths
diff --git a/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/updating/CreateActionUpdatePRs.kt b/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/updating/CreateActionUpdatePRs.kt
index de11b465c..b8ff5cce0 100644
--- a/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/updating/CreateActionUpdatePRs.kt
+++ b/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/updating/CreateActionUpdatePRs.kt
@@ -1,12 +1,12 @@
 package io.github.typesafegithub.workflows.codegenerator.updating
 
 import io.github.typesafegithub.workflows.actionbindinggenerator.ActionBinding
+import io.github.typesafegithub.workflows.actionbindinggenerator.ActionCoords
 import io.github.typesafegithub.workflows.actionbindinggenerator.generateBinding
+import io.github.typesafegithub.workflows.actionbindinggenerator.isTopLevel
+import io.github.typesafegithub.workflows.actionbindinggenerator.prettyPrint
 import io.github.typesafegithub.workflows.actionsmetadata.bindingsToGenerate
 import io.github.typesafegithub.workflows.actionsmetadata.model.ActionBindingRequest
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
-import io.github.typesafegithub.workflows.actionsmetadata.model.isTopLevel
-import io.github.typesafegithub.workflows.actionsmetadata.model.prettyPrint
 import io.github.typesafegithub.workflows.codegenerator.versions.GithubRef
 import io.github.typesafegithub.workflows.codegenerator.versions.GithubTag
 import io.github.typesafegithub.workflows.codegenerator.versions.getGithubToken
diff --git a/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/versions/Http.kt b/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/versions/Http.kt
index 423f5369e..f58cdfda1 100644
--- a/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/versions/Http.kt
+++ b/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/versions/Http.kt
@@ -1,6 +1,6 @@
 package io.github.typesafegithub.workflows.codegenerator.versions
 
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
+import io.github.typesafegithub.workflows.actionbindinggenerator.ActionCoords
 import io.github.typesafegithub.workflows.actionsmetadata.model.Version
 import io.ktor.client.HttpClient
 import io.ktor.client.call.body
diff --git a/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/versions/SuggestVersions.kt b/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/versions/SuggestVersions.kt
index 23a3bba47..7afeb7866 100644
--- a/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/versions/SuggestVersions.kt
+++ b/automation/code-generator/src/main/kotlin/io/github/typesafegithub/workflows/codegenerator/versions/SuggestVersions.kt
@@ -1,10 +1,10 @@
 package io.github.typesafegithub.workflows.codegenerator.versions
 
+import io.github.typesafegithub.workflows.actionbindinggenerator.ActionCoords
+import io.github.typesafegithub.workflows.actionbindinggenerator.isTopLevel
+import io.github.typesafegithub.workflows.actionbindinggenerator.prettyPrint
 import io.github.typesafegithub.workflows.actionsmetadata.bindingsToGenerate
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
 import io.github.typesafegithub.workflows.actionsmetadata.model.Version
-import io.github.typesafegithub.workflows.actionsmetadata.model.isTopLevel
-import io.github.typesafegithub.workflows.actionsmetadata.model.prettyPrint
 import java.io.File
 
 /**
diff --git a/automation/typings/build.gradle.kts b/automation/typings/build.gradle.kts
index d9b409cac..28288e009 100644
--- a/automation/typings/build.gradle.kts
+++ b/automation/typings/build.gradle.kts
@@ -1,8 +1,7 @@
 plugins {
     buildsrc.convention.`kotlin-jvm`
-    kotlin("plugin.serialization")
 }
 
 dependencies {
-    implementation("com.charleskorn.kaml:kaml:0.55.0")
+    implementation(projects.automation.actionBindingGenerator)
 }
diff --git a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/ActionsMetadataReading.kt b/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/ActionsMetadataReading.kt
index e2e83ab99..0712fa1c4 100644
--- a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/ActionsMetadataReading.kt
+++ b/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/ActionsMetadataReading.kt
@@ -1,17 +1,13 @@
 package io.github.typesafegithub.workflows.actionsmetadata
 
-import com.charleskorn.kaml.Yaml
+import io.github.typesafegithub.workflows.actionbindinggenerator.ActionCoords
+import io.github.typesafegithub.workflows.actionbindinggenerator.prettyPrint
 import io.github.typesafegithub.workflows.actionsmetadata.model.ActionBindingRequest
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionTypes
 import io.github.typesafegithub.workflows.actionsmetadata.model.TypingsSource
-import io.github.typesafegithub.workflows.actionsmetadata.model.prettyPrint
-import kotlinx.serialization.decodeFromString
 import java.nio.file.Files
 import java.nio.file.Path
 import kotlin.io.path.isRegularFile
 import kotlin.io.path.name
-import kotlin.io.path.readText
 import kotlin.streams.asSequence
 
 internal fun readActionsMetadata(): List<ActionBindingRequest> =
@@ -44,7 +40,6 @@ private fun readLocalActionTypings(): List<ActionBindingRequest> {
                     ),
                 typingsSource =
                     buildTypingsSource(
-                        path = it,
                         fileName = file,
                         actionTypingsDirectory = actionTypingsDirectory,
                     ),
@@ -53,29 +48,14 @@ private fun readLocalActionTypings(): List<ActionBindingRequest> {
 }
 
 private fun buildTypingsSource(
-    path: Path,
     fileName: String,
     actionTypingsDirectory: Path,
 ) = when (fileName) {
     "action-types.yml" -> {
-        val typings =
-            try {
-                myYaml.decodeFromString<ActionTypes>(path.readText())
-            } catch (e: Exception) {
-                println("There was a problem parsing action typing: $path")
-                throw e
-            }
-        TypingsSource.CodeGenerator(inputTypings = typings.toTypesMap())
+        // TODO: the empty map is just a placeholder value - the typings are fetched in another place.
+        //  It should be eventually removed.
+        TypingsSource.CodeGenerator(inputTypings = emptyMap())
     }
     "typings-hosted-by-action" -> TypingsSource.ActionTypes
     else -> error("An unexpected file found in $actionTypingsDirectory: '$fileName'")
 }
-
-private val myYaml =
-    Yaml(
-        configuration =
-            Yaml.default.configuration.copy(
-                // Don't allow any unknown keys, to keep the YAMLs minimal.
-                strictMode = true,
-            ),
-    )
diff --git a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/TypesYamlReading.kt b/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/TypesYamlReading.kt
deleted file mode 100644
index b74aee7df..000000000
--- a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/TypesYamlReading.kt
+++ /dev/null
@@ -1,39 +0,0 @@
-package io.github.typesafegithub.workflows.actionsmetadata
-
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionType
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionTypeEnum
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionTypes
-import io.github.typesafegithub.workflows.actionsmetadata.model.BooleanTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.EnumTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.FloatTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerWithSpecialValueTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.ListOfTypings
-import io.github.typesafegithub.workflows.actionsmetadata.model.StringTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.Typing
-
-internal fun ActionTypes.toTypesMap(): Map<String, Typing> {
-    return inputs.mapValues { (key, value) ->
-        value.toTyping(key)
-    }
-}
-
-private fun ActionType.toTyping(fieldName: String): Typing =
-    when (this.type) {
-        ActionTypeEnum.String -> StringTyping
-        ActionTypeEnum.Boolean -> BooleanTyping
-        ActionTypeEnum.Integer -> {
-            if (this.namedValues.isEmpty()) {
-                IntegerTyping
-            } else {
-                IntegerWithSpecialValueTyping(typeName = name, specialValues = namedValues)
-            }
-        }
-        ActionTypeEnum.Float -> FloatTyping
-        ActionTypeEnum.List ->
-            ListOfTypings(
-                delimiter = separator,
-                typing = listItem?.toTyping(fieldName) ?: error("Lists should have list-item set!"),
-            )
-        ActionTypeEnum.Enum -> EnumTyping(typeName = name, items = allowedValues)
-    }
diff --git a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionBindingRequest.kt b/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionBindingRequest.kt
index b67651d64..ec43f9759 100644
--- a/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionBindingRequest.kt
+++ b/automation/typings/src/main/kotlin/io/github/typesafegithub/workflows/actionsmetadata/model/ActionBindingRequest.kt
@@ -1,5 +1,8 @@
 package io.github.typesafegithub.workflows.actionsmetadata.model
 
+import io.github.typesafegithub.workflows.actionbindinggenerator.ActionCoords
+import io.github.typesafegithub.workflows.actionbindinggenerator.Typing
+
 sealed interface TypingsSource {
     data class CodeGenerator(val inputTypings: Map<String, Typing> = emptyMap()) : TypingsSource
     object ActionTypes : TypingsSource


Test patch:
diff --git a/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ClassNamingTest.kt b/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ClassNamingTest.kt
index e0091dc52..3f5c75ee4 100644
--- a/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ClassNamingTest.kt
+++ b/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/ClassNamingTest.kt
@@ -1,6 +1,5 @@
 package io.github.typesafegithub.workflows.actionbindinggenerator
 
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
 import io.kotest.core.spec.style.FunSpec
 import io.kotest.matchers.shouldBe
 
diff --git a/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/GenerationTest.kt b/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/GenerationTest.kt
index a64d9345b..cacc975c9 100644
--- a/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/GenerationTest.kt
+++ b/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/GenerationTest.kt
@@ -1,13 +1,5 @@
 package io.github.typesafegithub.workflows.actionbindinggenerator
 
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
-import io.github.typesafegithub.workflows.actionsmetadata.model.BooleanTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.EnumTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.FloatTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerWithSpecialValueTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.ListOfTypings
-import io.github.typesafegithub.workflows.actionsmetadata.model.StringTyping
 import io.kotest.assertions.throwables.shouldThrowAny
 import io.kotest.core.spec.style.FunSpec
 import io.kotest.matchers.throwable.shouldHaveMessage
diff --git a/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesProvidingTest.kt b/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesProvidingTest.kt
index 3f0de0a16..56189eefc 100644
--- a/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesProvidingTest.kt
+++ b/automation/action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/TypesProvidingTest.kt
@@ -1,13 +1,5 @@
 package io.github.typesafegithub.workflows.actionbindinggenerator
 
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
-import io.github.typesafegithub.workflows.actionsmetadata.model.BooleanTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.EnumTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.FloatTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.IntegerWithSpecialValueTyping
-import io.github.typesafegithub.workflows.actionsmetadata.model.ListOfTypings
-import io.github.typesafegithub.workflows.actionsmetadata.model.StringTyping
 import io.kotest.core.spec.style.FunSpec
 import io.kotest.matchers.shouldBe
 
diff --git a/automation/typings/src/test/kotlin/io/github/typesafegithub/workflows/actionsmetadata/AddDeprecationInfoTest.kt b/automation/typings/src/test/kotlin/io/github/typesafegithub/workflows/actionsmetadata/AddDeprecationInfoTest.kt
index 0ea583a8f..d38966974 100644
--- a/automation/typings/src/test/kotlin/io/github/typesafegithub/workflows/actionsmetadata/AddDeprecationInfoTest.kt
+++ b/automation/typings/src/test/kotlin/io/github/typesafegithub/workflows/actionsmetadata/AddDeprecationInfoTest.kt
@@ -1,7 +1,7 @@
 package io.github.typesafegithub.workflows.actionsmetadata
 
+import io.github.typesafegithub.workflows.actionbindinggenerator.ActionCoords
 import io.github.typesafegithub.workflows.actionsmetadata.model.ActionBindingRequest
-import io.github.typesafegithub.workflows.actionsmetadata.model.ActionCoords
 import io.kotest.core.spec.style.FunSpec
 import io.kotest.matchers.shouldBe