Skip to content

Why does returning UUID lead to a compilation error? #534

Closed Answered by finlaydotb
finlaydotb asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, the problem was trying to return a blanket Uuid. The way to go is to return poem_openapi::Json<Uuid> instead and not just a blanket Uuid.

so this worked

#[derive(ApiResponse)]
enum Response {
    #[oai(status = 200)]
    Ok(poem_openapi::Json<Uuid>),
    #[oai(status = 500)]
    InternalError,
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by finlaydotb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant