swagger-api / swagger-api/swagger-codegen

Generate file(s) per api-operation

Open
#5,233 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: TypeScript General: Suggestion
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

We are currently using swagger-codegen to generate custom typescript for an Angular application which uses ngrx/store & ngrx/effects.

Besides the regular api related stuff, the custom generated typescript includes per operation (among other things) an effect-class and actionCreator-class.

These are currently included in the api-template/file, but it would be nice to have them separately: be able to generate file(s) per api-operation.

e.g.:

/api/xxxApi/xxxApi.ts
/api/xxxApi/operations/aaa.effect.ts
/api/xxxApi/operations/aaa.actions.ts
/api/xxxApi/operations/bbb.effect.ts
/api/xxxApi/operations/bbb.actions.ts
/api/yyyApi/yyyApi.ts
/api/yyyApi/operations/aaa.effect.ts
/api/yyyApi/operations/aaa.actions.ts

Swagger-codegen version

2.2.1

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 by examining the api-template/file and the existing generated API layout described in the issue. Determine how the TypeScript Angular templates represent per-operation effects and action creators, then define the template and output changes needed to produce separate operation files while preserving the API file; done means the requested structure is generated for each operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
tooling
Issue type
Feature
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.