You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See swagger-api/swagger-codegen#8201 (comment) - if the swagger spec has more than 32 regexes, we generate invalid Rust. This is because we generate a tuple/fixed length slice(?), and the Rust standard library only copes with tuples/fixed length slices(?) up to size 32.
We should fix this and then add a test.
(Note: this part of a set of issues from swagger-codegen. I didn't fix this as part of the move to openapi-generator. Thus I strongly suspect rust-server in openapi-generator also suffers the same problem. I'm not planning on working on this at the moment - contributions gratefully welcomed)
openapi-generator version
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
I suspect the fix will be to stop using tuples/fixed length slices. Instead, maybe a Vec might work? It'll be a bit less efficient, but I don't think that will have a significant effect.
Testing this may be fun. I'd recommend starting to split up the test samples for rust-server. That way, we can have a spec that just tests for this issue, without ending up with a single test spec of absurd length.
The text was updated successfully, but these errors were encountered:
Description
See swagger-api/swagger-codegen#8201 (comment) - if the swagger spec has more than 32 regexes, we generate invalid Rust. This is because we generate a tuple/fixed length slice(?), and the Rust standard library only copes with tuples/fixed length slices(?) up to size 32.
We should fix this and then add a test.
(Note: this part of a set of issues from swagger-codegen. I didn't fix this as part of the move to openapi-generator. Thus I strongly suspect rust-server in openapi-generator also suffers the same problem. I'm not planning on working on this at the moment - contributions gratefully welcomed)
openapi-generator version
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
I suspect the fix will be to stop using tuples/fixed length slices. Instead, maybe a
Vec
might work? It'll be a bit less efficient, but I don't think that will have a significant effect.Testing this may be fun. I'd recommend starting to split up the test samples for
rust-server
. That way, we can have a spec that just tests for this issue, without ending up with a single test spec of absurd length.The text was updated successfully, but these errors were encountered: