ProbablyClem / utoipauto

Rust Macros to automate the addition of Paths/Schemas to Utoipa crate, simulating Reflection during the compilation phase
Apache License 2.0
108 stars 10 forks source link

skip module path segments #31

Closed joaquin041 closed 1 month ago

joaquin041 commented 1 month ago

Paths like this:

[utoipauto(paths = "(./src/lib/bin/module from crate::bin)"]

Are getting resolved like: crate::lib::bin::module::etc

And it should look like: crate::bin::module::etc -> removing "lib" as we know that the module starts in "bin", same thing that is done with "src"

DenuxPlays commented 1 month ago

@ProbablyClem Can you also take a look at it.

The tests are my fault I am working on a pr to introduce a fix and some other feature.

DenuxPlays commented 1 month ago

@joaquin041

Couldn't we simply create a new folder in the tests folder that represents the issue you have and use this as an acceptance test? Should be possible right?

joaquin041 commented 1 month ago

I think that would do the trick, let me create another commit with that.

joaquin041 commented 1 month ago

There it is. I am not sure if this will do. In order to properly test this, I needed to create another lib with a non-default "src" path. Let me know if this works.

DenuxPlays commented 1 month ago

@joaquin041 Could you rebase this onto master to see if the chekcs no succeed