swagger-api / swagger-api/swagger-codegen
[PYTHON] Server Stub codegen for OpenAPI 3.0
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I am trying to generate python-flask server stub for OpenAPI 3.0. but unable to do so as the latest 3.0.3 as well as 3.0.4-SNAPSHOT doesn't support python for server stub generation.
Swagger-codegen version
swagger-codegen-cli-3.0.3
Also tested with : swagger-codegen-cli-3.0.4-20181226.135851-18.jar
Command line used for generation
java -jar swagger-codegen-cli-3.0.3.jar generate -i project.yaml -l python-flask -o ./project
Output:
Exception in thread "main" java.lang.RuntimeException: Can't load config class with name python Available: aspnetcore
csharp
csharp-dotnet2
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
spring
openapi
openapi-yaml
kotlin-client
kotlin-server
php
scala
scala-akka-http-server
swift3
swift4
typescript-angular
at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:31)
at io.swagger.codegen.v3.cli.SwaggerCodegen.main(SwaggerCodegen.java:96)
Caused by: java.lang.ClassNotFoundException: python
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at io.swagger.codegen.v3.CodegenConfigLoader.forName(CodegenConfigLoader.java:29)
... 1 more
Are there any plans to add python server stub codegen to upcoming release? If yes, what is ETA? If not, is there any beta in which this development is going on ?
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
Reproduce the report with the stated Java command and project.yaml, then inspect the generator entry point in SwaggerCodegen.java and configuration loading in CodegenConfigLoader.java. Done would mean the project exposes a Python Flask server-stub generator for OpenAPI 3.0 and the command completes successfully; no test location is named in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, openapi, python
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100