OpenAPITools / OpenAPITools/openapi-generator-cli
[Question] How are placeholders passed to config?
@kay-schecker is already working on this.
Since Apr 27, 2022.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 208
- Avg merge
- 7h 12m
- Merged PRs (30d)
- 6
Description
Hi.
When using config via openapitools.json, the documentation states that placeholders are in use, e.g for. cwd and name:
{
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "5.1.1",
"generators": { // optional
"my-generator":
"generatorName": "typescript-angular",
"inputSpec": "#{cwd}/specs/${name}.json",
"output": "#{cwd}/output/#{name}",
}
}
}
}
My question is how do I pass the placeholders in the command? Ive tried
yarn run openapi-generator-cli generate --generator-key my-generator --name my-spec, but the name property doesnt get through to the generator:
[error] The spec file is not found: {..this path is correct (cwd)....}/specs/.json <---- name is missing
I could use something like envsubst, but that seems unnecessary?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.