What are you wanting to achieve?
.net 9 Using the following code, the enumeration can be displayed in a dropdown box below the interface, with the content of the dropdown box being the enumeration's Name
opt.MapType<OnnxType>(() => new OpenApiSchema { Type = "string", Enum = Enum.GetNames(typeof(OnnxType)) .Select(n => new OpenApiString(n)) .Cast<IOpenApiAny>() .ToList() });
.net 10 Unable to use, the reason is that Microsoft has removed OpenApiString IOpenApiAny. How to synchronize updates on. net10
What code or approach do you have so far?
opt.MapType<Dictionary<OnnxType, List<string>>>(() => new OpenApiSchema() { Type = JsonSchemaType.String, Enum = Enum.GetNames(typeof(OnnxType)).Select(n => new JsonNodeExtension(n)).Cast<JsonNode>().ToList() });
The above code was obtained by searching for your source code updates, but the dropdown menu on the interface displays value data instead of names
Additional context
No response
What are you wanting to achieve?
.net 9 Using the following code, the enumeration can be displayed in a dropdown box below the interface, with the content of the dropdown box being the enumeration's Name
opt.MapType<OnnxType>(() => new OpenApiSchema { Type = "string", Enum = Enum.GetNames(typeof(OnnxType)) .Select(n => new OpenApiString(n)) .Cast<IOpenApiAny>() .ToList() });.net 10 Unable to use, the reason is that Microsoft has removed OpenApiString IOpenApiAny. How to synchronize updates on. net10
What code or approach do you have so far?
opt.MapType<Dictionary<OnnxType, List<string>>>(() => new OpenApiSchema() { Type = JsonSchemaType.String, Enum = Enum.GetNames(typeof(OnnxType)).Select(n => new JsonNodeExtension(n)).Cast<JsonNode>().ToList() });The above code was obtained by searching for your source code updates, but the dropdown menu on the interface displays value data instead of names
Additional context
No response