Skip to content

Commit

Permalink
refactor: Added SchemaContext.Links.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Sep 20, 2024
1 parent 7bbdebf commit 7262bfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/AutoSDK/Models/SchemaContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class SchemaContext
public bool IsReference => ReferenceId != null;
public SchemaContext? ResolvedReference { get; set; }

public IList<SchemaContext> Links { get; set; } = [];

public Hint? Hint { get; init; }
public int? Index { get; init; }
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions src/libs/AutoSDK/Sources/Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public static Models.Data Prepare(
context.ResolvedReference = componentSchemas[context.ReferenceId!];
context.Id = context.ResolvedReference.Id;
context.TypeData = context.ResolvedReference.TypeData;

context.ResolvedReference.Links.Add(context);
}

resolveReferencesTime.Stop();
Expand Down

0 comments on commit 7262bfe

Please sign in to comment.