Some object type definitions are repeated in generated markdown files
- 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