Class ConfigSchema

java.lang.Object
io.quarkus.hibernate.reactive.panache.PanacheEntityBase
ai.pipestream.registration.entity.ConfigSchema

@Entity public class ConfigSchema extends io.quarkus.hibernate.reactive.panache.PanacheEntityBase
Entity representing a configuration schema for a service. This is the system of record, with Apicurio Registry as a secondary store.
  • Field Details

    • schemaId

      public String schemaId
    • serviceName

      public String serviceName
    • schemaVersion

      public String schemaVersion
    • jsonSchema

      public String jsonSchema
    • createdAt

      public LocalDateTime createdAt
    • createdBy

      public String createdBy
    • apicurioArtifactId

      public String apicurioArtifactId
    • apicurioGlobalId

      public Long apicurioGlobalId
    • syncStatus

      public ConfigSchema.SyncStatus syncStatus
    • lastSyncAttempt

      public LocalDateTime lastSyncAttempt
    • syncError

      public String syncError
  • Constructor Details

    • ConfigSchema

      public ConfigSchema()
  • Method Details

    • create

      public static ConfigSchema create(String serviceName, String version, String jsonSchema)
      Factory method to create a new ConfigSchema.
      Parameters:
      serviceName - the service name
      version - the schema version
      jsonSchema - the JSON schema string
      Returns:
      the created ConfigSchema
    • generateSchemaId

      public static String generateSchemaId(String serviceName, String version)
      Generates a unique schema ID.
      Parameters:
      serviceName - the service name
      version - the schema version
      Returns:
      the generated schema ID
    • markSynced

      public void markSynced(String artifactId, Long globalId)
      Marks the schema as synced to Apicurio.
      Parameters:
      artifactId - the Apicurio artifact ID
      globalId - the Apicurio global ID
    • markSyncFailed

      public void markSyncFailed(String error)
      Marks the schema sync as failed.
      Parameters:
      error - the error message