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
regen
  • Loading branch information
ArcturusZhang committed Mar 3, 2025
commit f8e1f8156d0734dda542c8a0847f46e00ac93dd5
Original file line number Diff line number Diff line change
@@ -45,20 +45,54 @@
"Clients": [
{
"$id": "7",
"Name": "ApiKeyClient",
"Namespace": "Authentication.ApiKey",
"Doc": "Illustrates clients generated with ApiKey authentication.",
"Operations": [
"kind": "client",
"name": "ApiKeyClient",
"namespace": "Authentication.ApiKey",
"doc": "Illustrates clients generated with ApiKey authentication.",
"parameters": [
{
"$id": "8",
"Name": "endpoint",
"NameInRequest": "endpoint",
"Doc": "Service host",
"Type": {
"$id": "9",
"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",
"DefaultValue": {
"$id": "10",
"Type": {
"$id": "11",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string"
},
"Value": "http://localhost:3000"
}
}
],
"operations": [
{
"$id": "12",
"Name": "valid",
"ResourceName": "ApiKey",
"Doc": "Check whether client is authenticated",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "9",
"$id": "13",
"StatusCodes": [
204
],
@@ -78,21 +112,21 @@
"Decorators": []
},
{
"$id": "10",
"$id": "14",
"Name": "invalid",
"ResourceName": "ApiKey",
"Doc": "Check whether client is authenticated.",
"Accessibility": "public",
"Parameters": [
{
"$id": "11",
"$id": "15",
"Name": "accept",
"NameInRequest": "Accept",
"Type": {
"$id": "12",
"$id": "16",
"kind": "constant",
"valueType": {
"$id": "13",
"$id": "17",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string",
@@ -114,7 +148,7 @@
],
"Responses": [
{
"$id": "14",
"$id": "18",
"StatusCodes": [
204
],
@@ -134,50 +168,14 @@
"Decorators": []
}
],
"Protocol": {
"$id": "15"
},
"Parameters": [
{
"$id": "16",
"Name": "endpoint",
"NameInRequest": "endpoint",
"Doc": "Service host",
"Type": {
"$id": "17",
"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",
"DefaultValue": {
"$id": "18",
"Type": {
"$id": "19",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string"
},
"Value": "http://localhost:3000"
}
}
],
"Decorators": [],
"CrossLanguageDefinitionId": "Authentication.ApiKey"
"apiVersions": [],
"crossLanguageDefinitionId": "Authentication.ApiKey"
}
],
"Auth": {
"$id": "20",
"$id": "19",
"ApiKey": {
"$id": "21",
"$id": "20",
"Name": "x-ms-api-key",
"In": "header"
}
Original file line number Diff line number Diff line change
@@ -45,20 +45,54 @@
"Clients": [
{
"$id": "7",
"Name": "CustomClient",
"Namespace": "Authentication.Http.Custom",
"Doc": "Illustrates clients generated with generic HTTP auth.",
"Operations": [
"kind": "client",
"name": "CustomClient",
"namespace": "Authentication.Http.Custom",
"doc": "Illustrates clients generated with generic HTTP auth.",
"parameters": [
{
"$id": "8",
"Name": "endpoint",
"NameInRequest": "endpoint",
"Doc": "Service host",
"Type": {
"$id": "9",
"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",
"DefaultValue": {
"$id": "10",
"Type": {
"$id": "11",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string"
},
"Value": "http://localhost:3000"
}
}
],
"operations": [
{
"$id": "12",
"Name": "valid",
"ResourceName": "Custom",
"Doc": "Check whether client is authenticated",
"Accessibility": "public",
"Parameters": [],
"Responses": [
{
"$id": "9",
"$id": "13",
"StatusCodes": [
204
],
@@ -78,21 +112,21 @@
"Decorators": []
},
{
"$id": "10",
"$id": "14",
"Name": "invalid",
"ResourceName": "Custom",
"Doc": "Check whether client is authenticated.",
"Accessibility": "public",
"Parameters": [
{
"$id": "11",
"$id": "15",
"Name": "accept",
"NameInRequest": "Accept",
"Type": {
"$id": "12",
"$id": "16",
"kind": "constant",
"valueType": {
"$id": "13",
"$id": "17",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string",
@@ -114,7 +148,7 @@
],
"Responses": [
{
"$id": "14",
"$id": "18",
"StatusCodes": [
204
],
@@ -134,50 +168,14 @@
"Decorators": []
}
],
"Protocol": {
"$id": "15"
},
"Parameters": [
{
"$id": "16",
"Name": "endpoint",
"NameInRequest": "endpoint",
"Doc": "Service host",
"Type": {
"$id": "17",
"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",
"DefaultValue": {
"$id": "18",
"Type": {
"$id": "19",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string"
},
"Value": "http://localhost:3000"
}
}
],
"Decorators": [],
"CrossLanguageDefinitionId": "Authentication.Http.Custom"
"apiVersions": [],
"crossLanguageDefinitionId": "Authentication.Http.Custom"
}
],
"Auth": {
"$id": "20",
"$id": "19",
"ApiKey": {
"$id": "21",
"$id": "20",
"Name": "Authorization",
"In": "header",
"Prefix": "SharedAccessKey"
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.