OpenAPITools / OpenAPITools/openapi-generator
[REQ] Support TypeScript Server generation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I want to make a server generator of Node using typescript with koa.js.
There is a very nice useful class AbstructTypeScriptClientCodegen for clients, but not for servers.
Describe the solution you'd like
- Rename
AbstructTypeScriptClientCodegentoAbstructTypeScriptCodegen, and removegetTag()from this - Create
AbstructTypeScriptClientCodegenagain, addgetTag()to this. - Create
AbstructTypeScriptServerCodegen, addgetTag()to this.
Provably this is a minimal impact and maintainable solution because there are some client generators.
(And we need to change TypeScriptNodeClientCodegen to extends AbstractTypeScriptServerCodegen from AbstractTypeScriptClientCodegen maybe.)
Describe alternatives you've considered
Have only AbstractTypeScriptCodegen
- Need to add
getTag()to all typescript client generators. - If increase method for typescript client, we need to change all typescript client generators.
Copy AbstractTypeScriptServerCodegen from AbstructTypeScriptClientCodegen.
- Almost all functions will overlap with those of client.
- There are many codes that dependencies TypeScript. It's pretty hard to maintain both codes, I think.
Create AbstractTypeScriptServerCodegen that extends AbstructTypeScriptClientCodegen.
- if new medhod added to
AbstractTypeScriptClientCodegen, it may occur probrem in server.- But difficult to notice those problems when working because the name is misleading.
Additional context
TypeScript is used by clients and servers. But other Languages also can have servers and clients.
I would be happy to discuss the good balance of abstraction in this nice project.
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
Start by reading AbstractTypeScriptClientCodegen and TypeScriptNodeClientCodegen, then trace their inheritance and getTag() behavior. The issue is done when the shared TypeScript codegen abstraction supports both client and server generators without breaking existing clients, and a TypeScript Node/Koa server generator can use it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, nodejs, typescript
- Domain
- backend, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100