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

Flag -t (template directory) not workin in docker #11861

Open
RussianDragon opened this issue Mar 13, 2022 · 3 comments
Open

Flag -t (template directory) not workin in docker #11861

RussianDragon opened this issue Mar 13, 2022 · 3 comments

Comments

@RussianDragon
Copy link

RussianDragon commented Mar 13, 2022

Hi.
I try create custom template, but having a problem with template folder.

For beginning i just copy template typescript-fetch and try use it my local folder.
docker run --rm -v C:\generatortest:/local openapitools/openapi-generator-cli:v5.4.0 generate -i /local/swagger_api.json -g typescript-custom -o /local/out/typescript8 --skip-validate-spec -t /local/template
In the console I see.

Can't load config class with name 'typescript-custom'
Available:
ada
ada-server
android
apache2
apex
asciidoc
aspnetcore
avro-schema
bash
crystal
c
clojure
cwiki
cpp-qt-client
cpp-qt-qhttpengine-server
cpp-pistache-server
cpp-restbed-server
cpp-restsdk
cpp-tiny
cpp-tizen
cpp-ue4
csharp
csharp-netcore
csharp-dotnet2
csharp-nancyfx-deprecated
csharp-netcore-functions
dart
dart-dio
dart-dio-next
dart-jaguar
eiffel
elixir
elm
erlang-client
erlang-proper
erlang-server
flash-deprecated
fsharp-functions
fsharp-giraffe-server
go
go-deprecated
go-echo-server
go-server
go-gin-server
graphql-schema
graphql-nodejs-express-server
groovy
kotlin
kotlin-server
kotlin-server-deprecated
kotlin-spring
kotlin-vertx
ktorm-schema
haskell-http-client
haskell
haskell-yesod
java
jaxrs-cxf-client
java-inflector
java-micronaut-client
java-micronaut-server
java-msf4j
java-pkmst
java-play-framework
java-undertow-server
java-vertx
java-vertx-web
java-camel
jaxrs-cxf
jaxrs-cxf-extended
jaxrs-cxf-cdi
jaxrs-jersey
jaxrs-resteasy
jaxrs-resteasy-eap
jaxrs-spec
javascript
javascript-apollo
javascript-flowtyped
javascript-closure-angular
jmeter
k6
lua
markdown
mysql-schema
nim
nodejs-express-server
objc
ocaml
openapi
openapi-yaml
plantuml
perl
php
php-laravel
php-lumen
php-slim-deprecated
php-slim4
php-silex-deprecated
php-symfony
php-mezzio-ph
php-dt
powershell
protobuf-schema
python-legacy
python
python-fastapi
python-experimental
python-flask
python-aiohttp
python-blueplanet
r
ruby
ruby-on-rails
ruby-sinatra
rust
rust-server
scalatra
scala-akka
scala-akka-http-server
scala-finch
scala-httpclient-deprecated
scala-gatling
scala-lagom-server
scala-play-server
scala-sttp
scalaz
spring
dynamic-html
html
html2
swift5
typescript
typescript-angular
typescript-angularjs-deprecated
typescript-aurelia
typescript-axios
typescript-fetch
typescript-inversify
typescript-jquery
typescript-nestjs
typescript-node
typescript-redux-query
typescript-rxjs
wsdl-schema

[error] Check the spelling of the generator's name and try again.

I don't understand why not working special template folder...
Problem persists on the latest version docker container.

@RussianDragon RussianDragon changed the title template directory not workin in docker Flag -t (template directory) not workin in docker Mar 13, 2022
@wing328
Copy link
Member

wing328 commented Mar 14, 2022

Can't load config class with name 'typescript-custom'

looks like that's the issue. it can't find the generator "typescript-custom"

@adrianwix
Copy link

Unless you are implementing your own generator by extending the class you have to use the same typescript-axios generator but with another template

@RussianDragon
Copy link
Author

RussianDragon commented Nov 20, 2022

I need create new specific generator.
But I don't find a simple guide.
On this page
There doesn't say how to set the templates directory. And "-t" doesn't work.

I don't understand how to run the test template created after the command:
meta -o out/generators/my-codegen -n my-codegen -p com.my.company.codegen


I use next command for generate:
docker run --rm -v C:\generatortest:/local openapitools/openapi-generator-cli:v6.2.1 generate
-i /local/swagger.json
-g my-codegen
-t /local/template
-o /local/out/typescript_2

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

3 participants