Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

Emit decorator lists - #4940

Merged
Crystal YU (chunyu3) merged 19 commits into
Azure:feature/v3from
chunyu3:SyncMGC4031
Aug 16, 2024
Merged

Emit decorator lists#4940
Crystal YU (chunyu3) merged 19 commits into
Azure:feature/v3from
chunyu3:SyncMGC4031

Conversation

@chunyu3

@chunyu3 Crystal YU (chunyu3) commented Jul 26, 2024

Copy link
Copy Markdown
Member

Description

Fix #4887

When we specify the allowed-emit-decorators in emitter, TCGC will help to emit out decoration information for each item (client, property, operation), e.g final-state-var, our .NET input-Model need to contain this information.

This PR will

  • emit decorators to all kind of models, operations and operations
  • add reference resolve strategy in TypeSpecInputDecoratorInfoConverter to support parse by reference

Checklist

To ensure a quick review and merge, please ensure:

  • The PR has a understandable title and description explaining the why and what.
  • The PR is opened in draft if not ready for review yet.
    • If opened in draft, please allocate sufficient time (24 hours) after moving out of draft for review
  • The branch is recent enough to not have merge conflicts upon creation.

Ready to Land?

  • Build is completely green
    • Submissions with test failures require tracking issue and approval of a CODEOWNER
  • At least one +1 review by a CODEOWNER
  • All -1 reviews are confirmed resolved by the reviewer
    • Override/Marking reviews stale must be discussed with CODEOWNERS first

Comment thread src/TypeSpec.Extension/Emitter.Csharp/src/constants.ts Outdated
Comment thread src/AutoRest.CSharp/Common/Input/InputTypes/InputDecoratedType.cs Outdated
Comment thread src/TypeSpec.Extension/Emitter.Csharp/src/sdk-context-options.ts Outdated
@ArcturusZhang

Copy link
Copy Markdown
Member

Please update the title to show the purpose of this PR. Sync MGC4031 is very ambiguous.
For instance yours could be Implement decorator list or just use the same name as the PR in MGC.

@chunyu3 Crystal YU (chunyu3) changed the title Sync mgc4031 Emit decorator lists Aug 15, 2024
@chunyu3
Crystal YU (chunyu3) marked this pull request as ready for review August 15, 2024 09:13
@chunyu3
Crystal YU (chunyu3) merged commit 6157a71 into Azure:feature/v3 Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add decorator fields in every Input types in tspCodeModel.json

2 participants