schema_registry_api/domain/schema/reference.rs
1use crate::SchemaVersion;
2
3/// A schema reference
4#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
5pub struct SchemaReference {
6 /// A name for the reference.
7 ///
8 /// For Avro, the reference name is the fully qualified schema name,
9 /// for JSON Schema it is a URL,
10 /// and for Protobuf, it is the name of another Protobuf file.
11 pub name: String,
12
13 /// A subject
14 ///
15 /// representing the subject under which the referenced schema is registered.
16 pub subject: String,
17
18 /// Version of the schema
19 pub version: SchemaVersion,
20}