Azure / Azure/bicep-types-az

Some object type definitions are repeated in generated markdown files

Open
#895 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

In the markdown type files, object types are sometimes included multiple times (such as [`FoosResponse` in the plugin integration test](https://github.com/Azure/bicep-types-az/blob/1937f344494cb7c38d0e22454f24edb8e1da7c54/src/autorest.bicep/test/integration/generated/basic/test.rp1/2021-10-31/types.md?plain=1#L35-L41). I believe this is happening because the markdown writer adds [function inputs](https://github.com/Azure/bicep-types-az/blob/1937f344494cb7c38d0e22454f24edb8e1da7c54/src/autorest.bicep/src/writers/markdown.ts#L198) and [outputs](https://github.com/Azure/bicep-types-az/blob/1937f344494cb7c38d0e22454f24edb8e1da7c54/src/autorest.bicep/src/writers/markdown.ts#L201) to the list of types to write w/o pruning duplicates. This does not appear to affect JSON type files.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect src/autorest.bicep/src/writers/markdown.ts around the function input and output handling referenced in the issue, then compare it with the generated integration file linked above. Confirm that duplicate object types are emitted in markdown while JSON files are unaffected. Done means generated markdown type files contain each object type only once.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.