hashicorp / terraform-plugin-codegen-openapi

OpenAPI to Terraform Provider Code Generation Specification
Mozilla Public License 2.0
49 stars 9 forks source link

output does not seem to be taken into account #74

Closed remyleone closed 10 months ago

remyleone commented 10 months ago

tfplugingen-openapi generate openapi.yml --output ./foobar.json

I get a provider_code_spec.jsoncreated but no foobar.json are created

austinvalle commented 10 months ago

Hey there @remyleone 👋🏻,

I believe the --output argument is being ignored (and then defaulted to provider_code_spec.json) because it's after the positional argument openapi.yml.

Should be something like:

tfplugingen-openapi generate --output ./foobar.json openapi.yml
austinvalle commented 10 months ago

If future readers come across this issue, you can see the expectations of the command using --help:

 $ tfplugingen-openapi --help
Usage: tfplugingen-openapi [--version] [--help] <command> [<args>]

Available commands are:
    generate    Generates Provider Code Specification from an OpenAPI 3.x Specification

 $ tfplugingen-openapi generate --help

Usage: tfplugingen-openapi generate [<args>] </path/to/oas_file.yml>

    --config <ARG>   path to generator config file (YAML)                             (default: "./generator_config.yml")
    --output <ARG>   destination file path for generated provider code spec (JSON)    (default: "./provider_code_spec.json")
github-actions[bot] commented 3 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.