OpenAPITools / OpenAPITools/openapi-generator
PowerShell Generator creates code snippets but the apiNamePrefix is ignored in the code snippets
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Version is 7.4.0
Description
Using the following command line:
java -jar .\openapi-generator-cli-7.4.0.jar generate -i .\openapi.json -o .\Module_Name -g powershell -c .\psopenapi.yaml
generatorName: powershell
inputSpec: openapi.json
outputDir: OutputDir
skipValidateSpec: true
removeOperationIdPrefix: true
minimalUpdate: true
packageName: Module_Name
packageVersion: 0.0.1
apiNamePrefix: LE
powershellVersion: "5.1"
powershellGalleryUrl: https://www.powershellgallery.com/packages/Module_Name
The PowerShell Module is created and has the necessary Markdown files for documentation purposes.
The documentation files are fantastic and comprehensive; the only issue is the code snippets.
You'll see in this code snippet that some of the commands are missing the apiNamePrefix.
- Get-Configuration is actually Get-LEConfiguration
- Initialize-AccountField is actually Initialize-LEAccountField
- Initialize-AccountCreate is actually Initialize-LEAccountCreate
The OpenAPISpec attached.
openapiv6.json
Suggest a fix
Has the apiNamePrefix be consistent in the documentation too
PS. Thank you to everyone involved for all the hard work!
Contributor guide
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.
Research direction
Start with the PowerShell generator templates or entry points that produce the Markdown code snippets, using the supplied openapiv6.json and psopenapi.yaml configuration. Regenerate the module with the shown command and compare snippet names with generated commands such as Get-LEConfiguration. Done means the documented snippets consistently include the configured LE apiNamePrefix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, powershell
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100