Class ConfigSchema

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

@Entity public class ConfigSchema extends io.quarkus.hibernate.orm.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
      Primary key: the generated unique schema ID.
    • serviceName

      public String serviceName
      Name of the service this schema belongs to.
    • schemaVersion

      public String schemaVersion
      Version of the schema.
    • jsonSchema

      public String jsonSchema
      The JSON schema content, stored as a JSONB column.
    • createdAt

      public LocalDateTime createdAt
      Timestamp when the row was created (set on insert).
    • createdBy

      public String createdBy
      Identifier of the principal that created the schema, if known.
    • apicurioArtifactId

      public String apicurioArtifactId
      Apicurio artifact ID once the schema has been synced to the registry.
    • apicurioGlobalId

      public Long apicurioGlobalId
      Apicurio global ID once the schema has been synced to the registry.
    • syncStatus

      public ConfigSchema.SyncStatus syncStatus
      Current synchronization state with Apicurio; defaults to ConfigSchema.SyncStatus.PENDING.
    • lastSyncAttempt

      public LocalDateTime lastSyncAttempt
      Timestamp of the most recent sync attempt.
    • syncError

      public String syncError
      Error message from the most recent failed sync, or null when none.
  • Constructor Details

  • 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