Skip to content

Cannot generate resources if provider is not defined #154

@remyleone

Description

@remyleone

tfplugingen-openapi CLI version

$ tfplugingen-openapi --version
tfplugingen-openapi module: v0.3.0

OpenAPI Spec File

Not useful

Generator Config

resources:
  container:
    create:
      path: /containers/v1beta1/regions/{region}/containers
      method: post
    read:
      path: /containers/v1beta1/regions/{region}/containers/{container_id}
      method: get

Expected Behavior

I would expect only the resource files to be created

Actual Behavior

tfplugingen-openapi generate --config terraform_generator_config.yml --output ./generated/terraform/scaleway.containers.v1beta1.Api.json ./generated/scaleway-openapi/openapi/scaleway.containers.v1beta1.Api.yml
time=2024-03-28T16:42:15.314+01:00 level=ERROR msg="error executing command" err="error parsing generator config file: config validation error(s):\n\tprovider must have a 'name' property"
make: *** [tf-schemas] Error 1

Additional Information

I would like to have different files, that are targeting different part of the generation. We have many APIs and having everything bundled in a single file is not very interesting.
Also if we are forced to declare provider definition while not being interested in the output it seems to be inefficient

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions