Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Parsing arguments fails #30

Open
RReverser opened this issue Sep 28, 2022 · 3 comments
Open

Parsing arguments fails #30

RReverser opened this issue Sep 28, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@RReverser
Copy link

I'm trying to use it as per docs, but getting error at the stage of parsing arguments:

> cargo swagg ./AlpacaDeviceAPI_v1.yaml --out-file src/api.rs
error: Found argument './AlpacaDeviceAPI_v1.yaml' which wasn't expected, or isn't valid in this context

USAGE:
    cargo-swagg.exe [OPTIONS] <source>

For more information try --help

Am I missing something?

@hjizettle
Copy link

I get this as well. How is the command supposed to be run?

@sergeysova sergeysova added the bug Something isn't working label Nov 17, 2022
@FlipWarthog
Copy link

I've run into the same thing (on Windows).
It looks like running as cargo swag ./api.yaml --out-file ./src/api.rs is interpreted as swag being the source path. If I run it as cargo-swag.exe ./api.yaml --out-file ./src/api.rs then the program runs correctly. Hopefully this workaround helps!

@RReverser
Copy link
Author

@FlipWarthog Ohhh thanks. I've moved on and wrote my own generator for the specific usecase I had, but this would've been helpful before 😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants