Invalid schema reference when using tuple struct
#[derive(Deserialize, ToSchema)]
#[allow(non_snake_case)]
pub(crate) enum DriveEncryptionType {
AllowUserToChoose = 0,
FullEncryption = 1,
UsedSpaceOnlyEncryption = 2,
}
#[derive(Deserialize, ToSchema)]
#[allow(non_snake_case)]
pub(crate) struct FixedDrivesEncryptionType(DriveEncryptionType);
Above is the example rust code.
"FixedDrivesEncryptionType": "AllowUserToChoose",
If I use this json field the schema validator complains
JSON doesn't match expected schema: Invalid reference: json-schema:///#/components/schemas/DriveEncryptionType
I have made sure the schema reference exists in swagger ui.
Edited by Ghost User