swagger-api / swagger-api/swagger-codegen

Can't load config class with name rust

Open
#12,554 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

OS: macOS

to Reproduce:

brew install swagger-codegen

swagger-codegen generate -i /path/to/openapi.yaml -l rust -o .

output

22:41:59.073 [main] INFO  i.s.c.v.g.t.AbstractTypeScriptClientCodegen - Template folder: null
22:41:59.073 [main] INFO  i.s.c.v.g.t.AbstractTypeScriptClientCodegen - Template engine: io.swagger.codegen.v3.templates.HandlebarTemplateEngine@3276732
Exception in thread "main" java.lang.RuntimeException: Can't load config class with name rust Available: dart
aspnetcore
csharp
csharp-dotnet2
go
go-server
dynamic-html
html
html2
java
jaxrs-cxf-client
jaxrs-cxf
inflector
jaxrs-cxf-cdi
jaxrs-spec
jaxrs-jersey
jaxrs-di
jaxrs-resteasy-eap
jaxrs-resteasy
java-vertx
micronaut
spring
nodejs-server
openapi
openapi-yaml
kotlin-client
kotlin-server
php
python
python-flask
r
ruby
scala
scala-akka-http-server
swift3
swift4
swift5
typescript-angular
typescript-axios
typescript-fetch
javascript

	at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:42)
	at io.swagger.codegen.v3.cli.SwaggerCodegen.main(SwaggerCodegen.java:96)
Caused by: java.lang.ClassNotFoundException: rust
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:528)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:462)
	at java.base/java.lang.Class.forName(Class.java:453)
	at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:40)
	... 1 more

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduced swagger-codegen command and the failure at CodegenConfigLoader.java:42, then trace the entry from SwaggerCodegen.main that resolves generator names. Done means selecting rust no longer reports it as unavailable and the command reaches generation successfully; add or run a repository test covering this selection if one is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, rust
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.