mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 10:10:48 +01:00
16 lines
440 B
C#
16 lines
440 B
C#
using Microsoft.OpenApi.Any;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Needlework.Net.ViewModels.Pages.Endpoints;
|
|
|
|
public class PropertyEnumViewModel
|
|
{
|
|
public string Type { get; } = "Enum";
|
|
public string Values { get; }
|
|
|
|
public PropertyEnumViewModel(IList<IOpenApiAny> enumValue)
|
|
{
|
|
Values = $"[{string.Join(", ", enumValue.Select(x => $"\"{((OpenApiString)x).Value}\"").ToList())}]";
|
|
}
|
|
} |