Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] new.sh does not specify gen-type in templateDir path #9320

Closed
6 tasks done
AndersSpringborg opened this issue Apr 22, 2021 · 0 comments
Closed
6 tasks done

[BUG] new.sh does not specify gen-type in templateDir path #9320

AndersSpringborg opened this issue Apr 22, 2021 · 0 comments

Comments

@AndersSpringborg
Copy link
Contributor

AndersSpringborg commented Apr 22, 2021

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When generating a new template, the standard config do not specify the correct templateDir
Let's say you created a new client with

./new.sh -n test -c

The config created have this templateDir specified in the standard config

generatorName: test
outputDir: samples/client/petstore/test
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/test
additionalProperties:
  hideGenerationTimestamp: "true"

The template should have been:

templateDir: modules/openapi-generator/src/main/resources/test-client

As the template as named test-client in resources

openapi-generator version

5.1.1 (source-master)

OpenAPI declaration file content or url

templateDir: modules/openapi-generator/src/main/resources/${gen_name_camel}

Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix

#9321

wing328 pushed a commit that referenced this issue Apr 29, 2021
* generation type on  template dir path

* remove gen_type from template and resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant