Add Variants to Templates

This commit is contained in:
2023-01-16 18:44:05 +00:00
parent 83feedb59e
commit 99122bf508
2 changed files with 5 additions and 1 deletions

View File

@@ -111,7 +111,8 @@ public static partial class ImageManager
return GenerationEndpoints.Select(e => new ImageGenerationEndpointRead
{
Name = e.Name,
SourcesRequired = e.SourcesRequired
SourcesRequired = e.SourcesRequired,
Variants = e.Variants.Select(v => v.Name)
});
}
}

View File

@@ -21,6 +21,9 @@ public class ImageGenerationEndpointRead
[JsonPropertyName("sources"), ConfigurationKeyName("sources")]
public int SourcesRequired { get; set; }
[JsonPropertyName("variants"), ConfigurationKeyName("variants")]
public IEnumerable<string> Variants { get; set; }
}
public class ImageGenerationEndpoint : ImageGenerationImage