Azure / Azure/typespec-azure

Phase out client.tsp separate entrypoint

Open
#4,564 3 comments 0 reactions 0 assignees View on GitHub
eng feature
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 21h
Merged PRs (30d)
164

Description

Phase 1: Import client.tsp from main.tsp
- a. First services that need no changes apart from adding `import "./client.tsp"`
- https://github.com/Azure/azure-rest-api-specs/pull/43749
- https://github.com/Azure/azure-rest-api-specs-pr/pull/28819
- b. Second services that might need simple tweaking (adding !autorest to scope)
- https://github.com/Azure/azure-rest-api-specs/pull/43751
- https://github.com/Azure/azure-rest-api-specs-pr/pull/28820
- https://github.com/Azure/azure-rest-api-specs/pull/44009
- c. more complex services
- https://github.com/Azure/azure-rest-api-specs/pull/44027
```
specification/applink/AppLink.Management
specification/edge/Microsoft.Edge.DisconnectedOperations.Management
specification/frontdoor/resource-manager/Microsoft.Network/FrontDoor
specification/migrate/resource-manager/Microsoft.Migrate/Waves
specification/monitoringservice/resource-manager/Microsoft.Monitor/Agents
specification/napster/Napster.CompanionAPI.Management
specification/programenrollment/resource-manager/Microsoft.ProgramEnrollment/ProgramEnrollment
specification/purviewdatagovernance/data-plane/DataAccess
specification/relationships/Relationships.Management
specification/resources/resource-manager/Microsoft.Authorization/policy
specification/resources/resource-manager/Microsoft.Resources/deploymentStacks
specification/search/resource-manager/Microsoft.Search/Search
specification/storagecache/resource-manager/Microsoft.StorageCache/StorageCache
```

Phase 2: Enforce client.tsp import
- Add tsv validation to make sure client.tsp is imported https://github.com/Azure/azure-rest-api-specs/pull/43762/

Phase 3: Update tooling
- Linting rule to prevent bad pattern in client.tsp https://github.com/Azure/typespec-azure/issues/4652
- Update tsp client and logic in emitters
- https://github.com/Azure/azure-sdk-tools/issues/15955
- cleanup/fix test in typespec-azure reproing the structure
- Documentation
- https://github.com/Azure/typespec-azure/pull/4677
- Should we relax restriction about tcgc needing to be imported in client.tsp only??

Phase 4: Cleanup
- Remove import main.tsp from client.tsp

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the listed specification directories and the linked Phase 1 pull requests to understand the client.tsp migration pattern. Then read the Phase 2 validation work and the Phase 3 tooling, emitter, test, and documentation links. Done means the phased migration, enforced import, tooling updates, documentation, and final cleanup are complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.