mittwald / mittwald/api-client-js

Generator: Operations without Tags are not included

Open
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2
Forks
0
Avg merge
4d 16h
Merged PRs (30d)
4

Description

The behavior of the generator concerning the tags is very unusual.

Operations are only included in the output if both of these criteria are fulfilled:

  • The operation itself must have a tag. (A tag for the path is not sufficient.)
  • The tag must be listet on root level of the document.
    openApiDoc.tags = [{ name: "MyTag" }]; 
    

Expected behaviour:

  • Operations or paths without a tag should be included in a default namespace. The default namespace might be overwritten by an option.
  • Operations with a tag that is not listed in the document should be included. At least there should be an option to do this. I’d say the default should be to include such operations and by setting a flag strictTagValidation such operations can be excluded.

Here are some references to the code:

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 reading the referenced logic in packages/generator/src/generation/model/paths/Paths.ts, Operation.ts, and CodeGenerationModel.ts. Trace how operation tags and root-level tags determine inclusion, then define how the default namespace and strictTagValidation option should affect generation. Done means untagged and unlisted-tag operations are included according to the chosen defaults, with strict validation able to exclude them.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.