Skip to content

Commit 2c9fc55

Browse files
docs: Add missing subcommand to manual CLI invocation example (#76)
### Motivation While I was doing some changes to other parts of the code, I had to manually run the CLI to obtain the generated code, however, the command was not working. Only after did I realize that the `generate` keyword was missing! ### Modifications Modified the `Manually-invoking-the-generator-CLI.md` file to fix the CLI command instruction. ### Result Users now know how to properly manually execute the CLI. ### Test Plan As of now I didn't add any tests for this. I'm not really sure where to start. My idea was to check if the function `createBuildCommands` from the `Plugins/OpenAPIGenerator/plugin.swift` file was returning the correct command with the `generate` argument. I was not able to import the `SwiftOpenAPIGeneratorPlugin` struct from a test file, meaning that I was not able to do this. Co-authored-by: Miguel Ferreira <[email protected]>
1 parent 2c52179 commit 2c9fc55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/swift-openapi-generator/Documentation.docc/Articles/Manually-invoking-the-generator-CLI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you need to commit the generated code to your source repository (for example,
2121
To generate Swift code to a specific directory, clone the generator repository and run the following command from the checkout directory:
2222

2323
```console
24-
% swift run swift-openapi-generator \
24+
% swift run swift-openapi-generator generate \
2525
--mode types --mode client \
2626
--output-directory path/to/desired/output-dir \
2727
path/to/openapi.yaml

0 commit comments

Comments
 (0)