Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align the client type shape from TCGC in our emitter #6179

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/main' into align-tcgc-client-models
  • Loading branch information
ArcturusZhang committed Mar 4, 2025
commit e13128c1098786ce08c28e55d4742548e7c9d0a7

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -113,17 +113,96 @@
"Clients": [
{
"$id": "14",
"kind": "client",
"name": "RenamedOperationClient",
"namespace": "Client.Structure.RenamedOperation",
"parameters": [
"Name": "RenamedOperationClient",
"Namespace": "Client.Structure.RenamedOperation",
"Operations": [
{
"$id": "15",
"Name": "renamedOne",
"ResourceName": "RenamedOperation",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "16",
"StatusCodes": [
204
],
"Headers": [],
"IsErrorResponse": false
}
],
"HttpMethod": "POST",
"Uri": "{endpoint}/client/structure/{client}",
"Path": "/one",
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.renamedOne",
"Decorators": []
},
{
"$id": "17",
"Name": "renamedThree",
"ResourceName": "RenamedOperation",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "18",
"StatusCodes": [
204
],
"Headers": [],
"IsErrorResponse": false
}
],
"HttpMethod": "POST",
"Uri": "{endpoint}/client/structure/{client}",
"Path": "/three",
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.renamedThree",
"Decorators": []
},
{
"$id": "19",
"Name": "renamedFive",
"ResourceName": "RenamedOperation",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "20",
"StatusCodes": [
204
],
"Headers": [],
"IsErrorResponse": false
}
],
"HttpMethod": "POST",
"Uri": "{endpoint}/client/structure/{client}",
"Path": "/five",
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.renamedFive",
"Decorators": []
}
],
"Protocol": {
"$id": "21"
},
"Parameters": [
{
"$id": "22",
"Name": "endpoint",
"NameInRequest": "endpoint",
"Doc": "Need to be set as 'http://localhost:3000' in client.",
"Type": {
"$id": "16",
"$id": "23",
"kind": "url",
"name": "url",
"crossLanguageDefinitionId": "TypeSpec.url"
@@ -139,7 +218,7 @@
"Kind": "Client"
},
{
"$id": "17",
"$id": "24",
"Name": "client",
"NameInRequest": "client",
"Doc": "Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client.",
@@ -157,16 +236,23 @@
"Kind": "Client"
}
],
"operations": [
"Decorators": [],
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation"
},
{
"$id": "25",
"Name": "Group",
"Namespace": "Client.Structure.RenamedOperation",
"Operations": [
{
"$id": "18",
"Name": "renamedOne",
"ResourceName": "RenamedOperation",
"$id": "26",
"Name": "renamedTwo",
"ResourceName": "Group",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "19",
"$id": "27",
"StatusCodes": [
204
],
@@ -176,22 +262,22 @@
],
"HttpMethod": "POST",
"Uri": "{endpoint}/client/structure/{client}",
"Path": "/one",
"Path": "/two",
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.renamedOne",
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.Group.renamedTwo",
"Decorators": []
},
{
"$id": "20",
"Name": "renamedThree",
"ResourceName": "RenamedOperation",
"$id": "28",
"Name": "renamedFour",
"ResourceName": "Group",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "21",
"$id": "29",
"StatusCodes": [
204
],
@@ -201,22 +287,22 @@
],
"HttpMethod": "POST",
"Uri": "{endpoint}/client/structure/{client}",
"Path": "/three",
"Path": "/four",
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.renamedThree",
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.Group.renamedFour",
"Decorators": []
},
{
"$id": "22",
"Name": "renamedFive",
"ResourceName": "RenamedOperation",
"$id": "30",
"Name": "renamedSix",
"ResourceName": "Group",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "23",
"$id": "31",
"StatusCodes": [
204
],
@@ -226,153 +312,61 @@
],
"HttpMethod": "POST",
"Uri": "{endpoint}/client/structure/{client}",
"Path": "/five",
"Path": "/six",
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.renamedFive",
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.Group.renamedSix",
"Decorators": []
}
],
"apiVersions": [],
"crossLanguageDefinitionId": "Client.Structure.RenamedOperation",
"children": [
"Protocol": {
"$id": "32"
},
"Parent": "RenamedOperationClient",
"Parameters": [
{
"$id": "24",
"kind": "client",
"name": "Group",
"namespace": "Client.Structure.RenamedOperation",
"parameters": [
{
"$id": "25",
"Name": "endpoint",
"NameInRequest": "endpoint",
"Doc": "Need to be set as 'http://localhost:3000' in client.",
"Type": {
"$id": "26",
"kind": "url",
"name": "url",
"crossLanguageDefinitionId": "TypeSpec.url"
},
"Location": "Uri",
"IsApiVersion": false,
"IsResourceParameter": false,
"IsContentType": false,
"IsRequired": true,
"IsEndpoint": true,
"SkipUrlEncoding": false,
"Explode": false,
"Kind": "Client"
},
{
"$id": "27",
"Name": "client",
"NameInRequest": "client",
"Doc": "Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client.",
"Type": {
"$ref": "2"
},
"Location": "Uri",
"IsApiVersion": false,
"IsResourceParameter": false,
"IsContentType": false,
"IsRequired": true,
"IsEndpoint": false,
"SkipUrlEncoding": false,
"Explode": false,
"Kind": "Client"
}
],
"operations": [
{
"$id": "28",
"Name": "renamedTwo",
"ResourceName": "Group",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "29",
"StatusCodes": [
204
],
"BodyMediaType": "Json",
"Headers": [],
"IsErrorResponse": false
}
],
"HttpMethod": "POST",
"RequestBodyMediaType": "None",
"Uri": "{endpoint}/client/structure/{client}",
"Path": "/two",
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.Group.renamedTwo",
"Decorators": []
},
{
"$id": "30",
"Name": "renamedFour",
"ResourceName": "Group",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "31",
"StatusCodes": [
204
],
"BodyMediaType": "Json",
"Headers": [],
"IsErrorResponse": false
}
],
"HttpMethod": "POST",
"RequestBodyMediaType": "None",
"Uri": "{endpoint}/client/structure/{client}",
"Path": "/four",
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.Group.renamedFour",
"Decorators": []
},
{
"$id": "32",
"Name": "renamedSix",
"ResourceName": "Group",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "33",
"StatusCodes": [
204
],
"BodyMediaType": "Json",
"Headers": [],
"IsErrorResponse": false
}
],
"HttpMethod": "POST",
"RequestBodyMediaType": "None",
"Uri": "{endpoint}/client/structure/{client}",
"Path": "/six",
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.Group.renamedSix",
"Decorators": []
}
],
"apiVersions": [],
"crossLanguageDefinitionId": "Client.Structure.RenamedOperation.Group",
"parent": {
"$ref": "14"
}
"$id": "33",
"Name": "endpoint",
"NameInRequest": "endpoint",
"Doc": "Need to be set as 'http://localhost:3000' in client.",
"Type": {
"$id": "34",
"kind": "url",
"name": "url",
"crossLanguageDefinitionId": "TypeSpec.url"
},
"Location": "Uri",
"IsApiVersion": false,
"IsResourceParameter": false,
"IsContentType": false,
"IsRequired": true,
"IsEndpoint": true,
"SkipUrlEncoding": false,
"Explode": false,
"Kind": "Client"
},
{
"$id": "35",
"Name": "client",
"NameInRequest": "client",
"Doc": "Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client.",
"Type": {
"$ref": "2"
},
"Location": "Uri",
"IsApiVersion": false,
"IsResourceParameter": false,
"IsContentType": false,
"IsRequired": true,
"IsEndpoint": false,
"SkipUrlEncoding": false,
"Explode": false,
"Kind": "Client"
}
]
],
"Decorators": [],
"CrossLanguageDefinitionId": "Client.Structure.RenamedOperation.Group"
}
]
}
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.
You are viewing a condensed version of this merge commit. You can view the full changes here.