microsoft / microsoft/typespec

Separate Model and Interface Templates from the instantianted lists

Open
#223 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

- [ ] add new property to NamespaceType 'modelTemplates' and 'interfaceTemplates'
- [ ] Move model Templates into this new property and out of the 'models' property
- [ ] Move interface Templates into this new property and out of the 'interfaces' property
- [ ] Add new optional property to ModelType/InterfaceType, 'templateType' that references the template used to instantiate the model
- [ ] `derivedModels` should maybe be seperated with `derivedModelTemplates`
- [ ] Add a flag `includeTemplates` in semantic walker
- [ ] When enabled, visit the template in 'templateType' when present
- [ ] `mapChildModels` should also have an `includeTemplates`, currently they are always excluded.
- [ ] Validate change in existing emitters and adjust as appropriate (openapi3, cadl-autorest, cadl-rpaas-controller)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.