Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrays are not supported #454

Closed
ManevilleF opened this issue Aug 2, 2022 · 4 comments · Fixed by #531
Closed

Arrays are not supported #454

ManevilleF opened this issue Aug 2, 2022 · 4 comments · Fixed by #531

Comments

@ManevilleF
Copy link

With version 0.7.1:

i have a response struct like:

#[derive(Debug, Serialize, Clone, Apiv2Schema)]
struct TestResponse {
      // Some data
      position: [f32; 3],
}

With a fixed size array field called position. When I build my application I get the following errors:

error[E0425]: cannot find crate `raw_schema` in the list of imported crates
 --> my_crate/src/responses/test.rs
  |
6 | #[derive(Debug, Serialize, Clone, Apiv2Schema)]
  |                                   ^^^^^^^^^^^ not found in the list of imported crates
  |
  = note: this error originates in the derive macro `Apiv2Schema` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find crate `required` in the list of imported crates
 --> my_crate/src/responses/test.rs
  |
6 | #[derive(Debug, Serialize, Clone, Apiv2Schema)]
  |                                   ^^^^^^^^^^^ not found in the list of imported crates
  |
  = note: this error originates in the derive macro `Apiv2Schema` (in Nightly builds, run with -Z macro-backtrace for more info)

Removing the position field fixes compilation

@sireaev
Copy link

sireaev commented Aug 22, 2024

same problem here, what's the fix for this?

@tiagolobocastro
Copy link
Collaborator

Indeed I can hit the same... I'll take a look

@tiagolobocastro
Copy link
Collaborator

Since we release just a few days ago and this was missed, I shall create a patch release tonight or tomorrow.

@tiagolobocastro
Copy link
Collaborator

Alright, v0.9.1 is out with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants