Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #7450
Closed
Open
Issue created Sep 18, 2020 by Administrator@rootContributor

Can't get Templates to work

Created by: AndyMedtronic

I think this is more of a problem with documentation or my stupidity, and I apologize if this has been answered before, (but my search didn't reveal an easy answer) but I can't get Templates noticed with my AspNetCore project

I installed OpenApi-generator with NPM and I can see the openapi-generator jar file in C:\Users\robera22\AppData\Roaming\npm\node_modules@openapitools\openapi-generator-cli\bin.

If I make changes to this (WinZip, don't unpack, change e.g. aspnetcore/3.0/Controller.mustache, save mustache, save zip) then generation works with my command line and I can see the changes I have made.

openapi-generator generate ^ -i Planning\OpenApi\ToolboxV3\MmtBatchWizard.v1.yaml ^ -g aspnetcore ^ -o Servers\v30Local4 ^ -t Servers\Templates ^ --additional-properties=^ aspnetCoreVersion=3.0,^ operationIsAsync=true,^ packageName=Medtronic.Toolbox.MmtBatchWizard,^ packageTitle=MedtronicToolboxSandbox,^ packageVersion=3.0

However this is horribly cumbersome, and takes forever to re-jar the large openapi-generator file

The documentation suggests that I should be able to specify single templates so I set up a Template folder.

First I placed a single amended Mustache File in there (Controller.mustache), no effect Then I copied the whole aspnetcore/3.0 folder there Then the aspnetcore Then the openapi-generator folder Then the openapi-generator.jar file

None of these had any effect. Still picking up the amendments in the npm/@OpenAPITools

What am I doing wrong in what should be a very simple use case

Assignee
Assign to
Time tracking