Skip to content
This repository was archived by the owner on Nov 11, 2025. It is now read-only.

Commit 48d714c

Browse files
Copilotbaywet
andcommitted
Complete implementation with reference support and test fixes
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
1 parent 855a4a8 commit 48d714c

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/Microsoft.OpenApi/Models/References/OpenApiResponseReference.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.OpenApi
88
/// <summary>
99
/// Response Object Reference.
1010
/// </summary>
11-
public class OpenApiResponseReference : BaseOpenApiReferenceHolder<OpenApiResponse, IOpenApiResponse, OpenApiReferenceWithDescription>, IOpenApiResponse
11+
public class OpenApiResponseReference : BaseOpenApiReferenceHolder<OpenApiResponse, IOpenApiResponse, OpenApiReferenceWithDescription>, IOpenApiResponse, IOpenApiSummarizedElement
1212
{
1313
/// <summary>
1414
/// Constructor initializing the reference object.
@@ -32,6 +32,13 @@ private OpenApiResponseReference(OpenApiResponseReference openApiResponseReferen
3232

3333
}
3434

35+
/// <inheritdoc/>
36+
public string? Summary
37+
{
38+
get => (Target as IOpenApiSummarizedElement)?.Summary;
39+
set { if (Target is IOpenApiSummarizedElement summarizedTarget) summarizedTarget.Summary = value; }
40+
}
41+
3542
/// <inheritdoc/>
3643
public string? Description
3744
{

test/Microsoft.OpenApi.Readers.Tests/ReferenceService/TryLoadReferenceV2Tests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public async Task LoadResponseReference()
6767
Assert.Equivalent(
6868
new OpenApiResponse
6969
{
70+
Summary = null,
7071
Description = "Entity not found.",
7172
Content = new Dictionary<string, OpenApiMediaType>()
7273
{

0 commit comments

Comments
 (0)