Is there a way to not skip Enum(Struct) or Enum(Enum)?
Author: RaulTrombinCreated Sep 11, 2024Updated Oct 13, 2024
Currently paperclip skips the Enum{ Something ( something_else ) } fields.
Is there a way to make the inner structure shows as a parameter? example
#[derive(Debug, Clone, Serialize, Deserialize, Apiv2Schema)]
pub enum DeviceManagerGetOptionsV1 {
AutoCreate,
List,
Search,
Request(some structure)
}
#[api_v2_operation(tags("Device Manager"))]
#[get("device_manager/{selection}")]
async fn device_manager_get(
manager_handler: web::Data<ManagerActorHandler>,
selection: web::Path<DeviceManagerGetOptionsV1>,
) -> Result<Json<crate::device::manager::Answer>, Error> {
.....
}
Then, APIspec only shows the simple enums. Is there a way to how the 'Request', and if it's selected, shows the strcuture field?
Source: paperclip-rs/paperclip