Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Corniel committed Nov 5, 2024
1 parent 1cc3f62 commit b096647
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ private Class ResolveObject(ResolveOpenApiSchema schema)

data.Register(@class);

// Store directly to allow self reference.
if (schema.ReferenceId is { })
{
ResolvedTypes.TryAdd(schema.ReferenceId, @class);
}

schema = schema with { Model = @class };

data.AddProperties(schema.Properties.Select(p => ResolveProperty(p, schema.Required)));
Expand Down

0 comments on commit b096647

Please sign in to comment.