Skip to content

Commit 08f50dc

Browse files
committed
chore: break down parameters
1 parent 7b6ba19 commit 08f50dc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Atc.Rest.ApiGenerator.Framework.Minimal/Factories/ContentGeneratorServerResultParametersFactory.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ public static ContentGeneratorServerResultParameters Create(
3535
var okResponseModel = responseModels.Find(x => x.StatusCode == HttpStatusCode.OK) ??
3636
responseModels.Find(x => x.StatusCode == HttpStatusCode.Created);
3737

38-
if (ShouldAppendImplicitOperatorContent(httpStatusCodes, okResponseModel?.DataType, openApiOperation.Responses.IsSchemaUsingBinaryFormatForOkResponse()))
38+
if (ShouldAppendImplicitOperatorContent(
39+
httpStatusCodes,
40+
okResponseModel?.DataType,
41+
openApiOperation.Responses.IsSchemaUsingBinaryFormatForOkResponse()))
3942
{
4043
var collectionDataType = okResponseModel?.CollectionDataType;
4144
var dataType = okResponseModel?.DataType;
@@ -76,8 +79,8 @@ private static bool ShouldAppendImplicitOperatorContent(
7679
httpStatusCode = HttpStatusCode.Created;
7780
}
7881

79-
if (string.IsNullOrEmpty(modelName) &&
80-
httpStatusCode == HttpStatusCode.Created)
82+
if (httpStatusCode == HttpStatusCode.Created &&
83+
string.IsNullOrEmpty(modelName))
8184
{
8285
return false;
8386
}

0 commit comments

Comments
 (0)