Skip to content

Commit

Permalink
Change order of introspection fields to alphabetical order
Browse files Browse the repository at this point in the history
  • Loading branch information
KiKoS0 committed Sep 12, 2024
1 parent ad202cc commit c2804ef
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions inngest/src/main/kotlin/com/inngest/Introspection.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,41 @@ package com.inngest
import com.beust.klaxon.Json

abstract class Introspection(
@Json("authentication_succeeded") open val authenticationSucceeded: Boolean?,
open val functionCount: Int,
open val hasEventKey: Boolean,
open val hasSigningKey: Boolean,
open val mode: String,
@Json("authentication_succeeded") open val authenticationSucceeded: Boolean?,
@Json("schema_version") val schemaVersion: String = "2024-05-24",
)

internal data class InsecureIntrospection(
@Json("authentication_succeeded") override var authenticationSucceeded: Boolean? = null,
@Json("function_count") override val functionCount: Int,
@Json("has_event_key") override val hasEventKey: Boolean,
@Json("has_signing_key") override val hasSigningKey: Boolean,
override val mode: String,
@Json("authentication_succeeded") override var authenticationSucceeded: Boolean? = null,
) : Introspection(functionCount, hasEventKey, hasSigningKey, mode, authenticationSucceeded)
) : Introspection(authenticationSucceeded, functionCount, hasEventKey, hasSigningKey, mode)

internal data class SecureIntrospection(
@Json("authentication_succeeded") override val authenticationSucceeded: Boolean?,
@Json("function_count") override val functionCount: Int,
@Json("has_event_key") override val hasEventKey: Boolean,
@Json("has_signing_key") override val hasSigningKey: Boolean,
override val mode: String,
@Json("api_origin") val apiOrigin: String,
@Json("app_id") val appId: String,
@Json("authentication_succeeded") override val authenticationSucceeded: Boolean?,
// TODO: Add capabilities when adding the trust probe
// @Json("capabilities") val capabilities: Capabilities,
val env: String?,
// @Json("capabilities") val capabilities: Capabilities,
@Json("event_api_origin") val eventApiOrigin: String,
@Json("event_key_hash") val eventKeyHash: String?,
val env: String?,
val framework: String,
@Json("function_count") override val functionCount: Int,
@Json("has_event_key") override val hasEventKey: Boolean,
@Json("has_signing_key") override val hasSigningKey: Boolean,
@Json("has_signing_key_fallback") val hasSigningKeyFallback: Boolean = false,
override val mode: String,
@Json("sdk_language") val sdkLanguage: String,
@Json("sdk_version") val sdkVersion: String,
@Json("serve_origin") val serveOrigin: String?,
@Json("serve_path") val servePath: String?,
// TODO: Remove the default value when implementing signing key fallback
@Json("signing_key_fallback_hash") val signingKeyFallbackHash: String? = null,
@Json("has_signing_key_fallback") val hasSigningKeyFallback: Boolean = false,
@Json("signing_key_hash") val signingKeyHash: String?,
) : Introspection(functionCount, hasEventKey, hasSigningKey, mode, authenticationSucceeded)
) : Introspection(authenticationSucceeded, functionCount, hasEventKey, hasSigningKey, mode)

0 comments on commit c2804ef

Please sign in to comment.