-
Notifications
You must be signed in to change notification settings - Fork 0
Open
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
defaultnamespace. 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
strictTagValidationsuch operations can be excluded.
Here are some references to the code:
for (const tag of operation.tags) { api-client-js/packages/generator/src/generation/model/paths/operation/Operation.ts
Line 32 in 6285d6f
?.map((name) => path.paths.model.tags.find((t) => t.name.raw === name)) this.tags = this.doc.tags?.map((doc) => Tag.fromDoc(doc)) ?? [];
Metadata
Metadata
Assignees
Labels
No labels