We have an API in our .Net Core 3.1 project that has a controller which returns a model that is documented by Swagger (Generated by Swashbuckle). The consumer of the endpoint would like to see the options that a given property may return. For several reasons this for now at least is not just an Enum which would make the process a lot easier. It is a string that can return two different values.
Is there any way to decorate the property so that the options are available in Swagger just as if it had been an Enum? For Enums we can use the MapType on startup, but this is just a string so it's not a type we can map perse.
This is how we have done it with Enums previously:
c.MapType<PaginationSessionType>(() => new OpenApiSchema
{
Type = "string",
Enum = typeof(PaginationSessionType).GetEnumNames()
.Select(name => new OpenApiString(name)).Cast<IOpenApiAny>().ToList()
});

