Skip to content

Commit d0f8753

Browse files
authored
Mark some deprecated properties as obsolete in Schema (#2359)
These properties will be removed in a future major release. These were actually marked as obsolete in the past, but were temporarily removed. This just re-adds the annotations.
1 parent 4fe8bbd commit d0f8753

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/Confluent.SchemaRegistry/Rest/DataContracts/RegisteredSchema.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ public class RegisteredSchema : Schema, IComparable<RegisteredSchema>, IEquatabl
4141
/// The subject the schema is registered against.
4242
/// </summary>
4343
[DataMember(Name = "subject")]
44-
public override string Subject { get; set; }
44+
public new string Subject { get; set; }
4545

4646
/// <summary>
4747
/// The schema version.
4848
/// </summary>
4949
[DataMember(Name = "version")]
50-
public override int Version { get; set; }
50+
public new int Version { get; set; }
5151

5252
/// <summary>
5353
/// Unique identifier of the schema.
5454
/// </summary>
5555
[DataMember(Name = "id")]
56-
public override int Id { get; set; }
56+
public new int Id { get; set; }
5757

5858
/// <summary>
5959
/// The unregistered schema corresponding to this schema.

src/Confluent.SchemaRegistry/Rest/DataContracts/Schema.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,22 @@ public class Schema : IComparable<Schema>, IEquatable<Schema>
3030
#region API backwards-compatibility hack
3131

3232
/// <summary>
33-
/// The subject the schema is registered against.
33+
/// DEPRECATED. The subject the schema is registered against.
3434
/// </summary>
35-
public virtual string Subject { get; set; }
35+
[Obsolete("Included to maintain API backwards compatibility only. Use RegisteredSchema instead. This property will be removed in a future version of the library.")]
36+
public string Subject { get; set; }
3637

3738
/// <summary>
38-
/// The schema version.
39+
/// DEPRECATED. The schema version.
3940
/// </summary>
40-
public virtual int Version { get; set; }
41+
[Obsolete("Included to maintain API backwards compatibility only. Use RegisteredSchema instead. This property will be removed in a future version of the library.")]
42+
public int Version { get; set; }
4143

4244
/// <summary>
43-
/// Unique identifier of the schema.
45+
/// DEPRECATED. Unique identifier of the schema.
4446
/// </summary>
45-
public virtual int Id { get; set; }
47+
[Obsolete("Included to maintain API backwards compatibility only. Use RegisteredSchema instead. This property will be removed in a future version of the library.")]
48+
public int Id { get; set; }
4649

4750
/// <summary>
4851
/// DEPRECATED. Initializes a new instance of the Schema class.

0 commit comments

Comments
 (0)