Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
  • Loading branch information
live1206 committed Feb 20, 2025
commit dfe069eaefab48e6fa0d64978e2f7de9db4baa25
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ internal class ResourceVisitor : ScmLibraryVisitor
{
protected override ModelProvider? Visit(InputModelType model, ModelProvider? type)
{
base.Visit(model, type);
if (type is not null)
{
TransformResource(type);
Expand All @@ -22,7 +21,6 @@ internal class ResourceVisitor : ScmLibraryVisitor

protected override TypeProvider? Visit(TypeProvider type)
{
base.Visit(type);
TransformResource(type);
return type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ internal class RestClientVisitor : ScmLibraryVisitor
/// <inheritdoc/>
protected override TypeProvider? Visit(TypeProvider type)
{
var result = base.Visit(type);

if (result is ClientProvider)
if (type is not null && type is ClientProvider)
{
result.DeclarationModifiers = TransfromPublicModifiersToInternal(result);
result.RelativeFilePath = TransformRelativeFilePathForClient(result);
type.DeclarationModifiers = TransfromPublicModifiersToInternal(type);
type.RelativeFilePath = TransformRelativeFilePathForClient(type);
}
// TODO: uncomment this once resources are generated
//if (type is RestClientProvider)
//{
// type.Update(modifiers: TransfromPublicModifiersToInternal(type), relativeFilePath: TransformRelativeFilePathForRestClient(type));
//}
return result;
return type;
}

private static string TransformRelativeFilePathForClient(TypeProvider type)
Expand Down
Loading