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

refactor(http-client-csharp): remove BodyMediaType #6119

Merged
Merged
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
Merge branch 'main' into http-client-csharp/cleanup-media-type
# Conflicts:
#	packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/tspCodeModel.json
  • Loading branch information
Mingzhe Huang (from Dev Box) committed Mar 4, 2025
commit 6092c6d5042c6256cbdcb55ca50517308ebb7061
Original file line number Diff line number Diff line change
@@ -3258,222 +3258,6 @@
"ResourceName": "UnbrandedTypeSpec",
"Doc": "top level patch",
"Accessibility": "public",
"Parameters": [
{
"$id": "365",
"Name": "contentType",
"NameInRequest": "Content-Type",
"Doc": "Body parameter's content type. Known values are application/json",
"Type": {
"$id": "366",
"kind": "constant",
"valueType": {
"$id": "367",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string",
"decorators": []
},
"value": "application/json",
"decorators": []
},
"Location": "Header",
"IsApiVersion": false,
"IsContentType": true,
"IsEndpoint": false,
"Explode": false,
"IsRequired": true,
"Kind": "Constant",
"Decorators": [],
"SkipUrlEncoding": false
},
{
"$id": "368",
"Name": "accept",
"NameInRequest": "Accept",
"Type": {
"$id": "369",
"kind": "constant",
"valueType": {
"$id": "370",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string",
"decorators": []
},
"value": "application/json",
"decorators": []
},
"Location": "Header",
"IsApiVersion": false,
"IsContentType": false,
"IsEndpoint": false,
"Explode": false,
"IsRequired": true,
"Kind": "Constant",
"Decorators": [],
"SkipUrlEncoding": false
},
{
"$id": "371",
"Name": "body",
"NameInRequest": "body",
"Type": {
"$ref": "90"
},
"Location": "Body",
"IsApiVersion": false,
"IsContentType": false,
"IsEndpoint": false,
"Explode": false,
"IsRequired": true,
"Kind": "Method",
"Decorators": [],
"SkipUrlEncoding": false
}
],
"Responses": [
{
"$id": "372",
"StatusCodes": [
200
],
"BodyType": {
"$ref": "90"
},
"Headers": [],
"IsErrorResponse": false,
"ContentTypes": [
"application/json"
]
}
],
"HttpMethod": "PATCH",
"Uri": "{unbrandedTypeSpecUrl}",
"Path": "/patch",
"RequestMediaTypes": [
"application/json"
],
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": false,
"CrossLanguageDefinitionId": "UnbrandedTypeSpec.patchAction",
"Decorators": []
},
{
"$id": "373",
"Name": "anonymousBody",
"ResourceName": "UnbrandedTypeSpec",
"Doc": "body parameter without body decorator",
"Accessibility": "public",
"Parameters": [
{
"$id": "374",
"Name": "contentType",
"NameInRequest": "Content-Type",
"Doc": "Body parameter's content type. Known values are application/json",
"Type": {
"$id": "375",
"kind": "constant",
"valueType": {
"$id": "376",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string",
"decorators": []
},
"value": "application/json",
"decorators": []
},
"Location": "Header",
"IsApiVersion": false,
"IsContentType": true,
"IsEndpoint": false,
"Explode": false,
"IsRequired": true,
"Kind": "Constant",
"Decorators": [],
"SkipUrlEncoding": false
},
{
"$id": "377",
"Name": "accept",
"NameInRequest": "Accept",
"Type": {
"$id": "378",
"kind": "constant",
"valueType": {
"$id": "379",
"kind": "string",
"name": "string",
"crossLanguageDefinitionId": "TypeSpec.string",
"decorators": []
},
"value": "application/json",
"decorators": []
},
"Location": "Header",
"IsApiVersion": false,
"IsContentType": false,
"IsEndpoint": false,
"Explode": false,
"IsRequired": true,
"Kind": "Constant",
"Decorators": [],
"SkipUrlEncoding": false
},
{
"$id": "380",
"Name": "thing",
"NameInRequest": "thing",
"Type": {
"$ref": "90"
},
"Location": "Body",
"IsApiVersion": false,
"IsContentType": false,
"IsEndpoint": false,
"Explode": false,
"IsRequired": true,
"Kind": "Spread",
"Decorators": [],
"SkipUrlEncoding": false
}
],
"Responses": [
{
"$id": "381",
"StatusCodes": [
200
],
"BodyType": {
"$ref": "90"
},
"Headers": [],
"IsErrorResponse": false,
"ContentTypes": [
"application/json"
]
}
],
"HttpMethod": "POST",
"Uri": "{unbrandedTypeSpecUrl}",
"Path": "/anonymousBody",
"RequestMediaTypes": [
"application/json"
],
"BufferResponse": true,
"GenerateProtocolMethod": true,
"GenerateConvenienceMethod": true,
"CrossLanguageDefinitionId": "UnbrandedTypeSpec.anonymousBody",
"Decorators": []
},
{
"$id": "382",
"Name": "friendlyModel",
"ResourceName": "UnbrandedTypeSpec",
"Doc": "Model can have its friendly name",
"Accessibility": "public",
"Parameters": [
{
"$id": "383",
@@ -3557,7 +3341,6 @@
"BodyType": {
"$ref": "90"
},
"BodyMediaType": "Json",
"Headers": [],
"IsErrorResponse": false,
"ContentTypes": [
@@ -3566,7 +3349,6 @@
}
],
"HttpMethod": "PATCH",
"RequestBodyMediaType": "Json",
"Uri": "{unbrandedTypeSpecUrl}",
"Path": "/patch",
"RequestMediaTypes": [
@@ -3667,7 +3449,6 @@
"BodyType": {
"$ref": "90"
},
"BodyMediaType": "Json",
"Headers": [],
"IsErrorResponse": false,
"ContentTypes": [
@@ -3676,7 +3457,6 @@
}
],
"HttpMethod": "POST",
"RequestBodyMediaType": "Json",
"Uri": "{unbrandedTypeSpecUrl}",
"Path": "/anonymousBody",
"RequestMediaTypes": [
@@ -4395,7 +4175,6 @@
"BodyType": {
"$ref": "285"
},
"BodyMediaType": "Json",
"Headers": [],
"IsErrorResponse": false,
"ContentTypes": [
@@ -4404,7 +4183,6 @@
}
],
"HttpMethod": "GET",
"RequestBodyMediaType": "None",
"Uri": "{unbrandedTypeSpecUrl}",
"Path": "/link",
"BufferResponse": true,
@@ -4491,7 +4269,6 @@
"BodyType": {
"$ref": "294"
},
"BodyMediaType": "Json",
"Headers": [],
"IsErrorResponse": false,
"ContentTypes": [
@@ -4500,7 +4277,6 @@
}
],
"HttpMethod": "GET",
"RequestBodyMediaType": "None",
"Uri": "{unbrandedTypeSpecUrl}",
"Path": "/continuation",
"BufferResponse": true,
Loading
Oops, something went wrong.
You are viewing a condensed version of this merge commit. You can view the full changes here.