Default to generating directory and package per data source, provider and resource #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References: #20
The changes in this PR implement the following behaviour:
--package
flag is omitted when executing thegenerate
command, a directory and package will be generated for each data source, provider and resource that is defined within the intermediate representation / spec.--package
flag is included when executing thegenerate
command, all generated code will be placed in the same directory and package.Default Behaviour (--package flag omitted)
For example, if we have an intermediate representation / spec that defines the following data source, provider, and resource:
Executing the following generate command:
Generates the following output:
The package within each of the three files is then:
package datasource_example
package provider_example
package resource_example
Package Specified (--package flag defined)
Conversely, if the same intermediate representation / spec illustrated above is passed to the generate command, and the
--package
flag is specified, for instance:The following output is generated:
The package in all three files is then:
package specified