Skip to content

Commit 3566a6f

Browse files
committed
fix: Fixed missing descriptions in CLI generation.
1 parent f4462a4 commit 3566a6f

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

src/libs/AutoSDK/Models/EndPoint.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public static EndPoint FromSchema(OperationContext operation)
140140
Settings = requestProperty.Settings,
141141
Summary = requestProperty.Summary,
142142
ConverterType = requestProperty.ConverterType,
143+
Description = requestProperty.Description,
143144
});
144145
}
145146

src/libs/AutoSDK/Models/MethodParameter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ public static MethodParameter FromSchemaContext(SchemaContext context)
9797
IsDeprecated: context.Schema.Deprecated,
9898
DefaultValue: context.GetDefaultValue(),
9999
Summary: context.Schema.GetSummary(),
100-
Description: context.Schema.Description ?? string.Empty,
100+
Description:
101+
context.Parameter?.Description ??
102+
context.Schema.Description ??
103+
string.Empty,
101104
ConverterType: type.ConverterType,
102105
Properties: context.ClassData?.Properties ?? []);
103106
}

src/libs/AutoSDK/Models/ModelData.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public record struct ModelData(
1414
ImmutableArray<PropertyData> Properties,
1515
ImmutableArray<PropertyData> EnumValues,
1616
string Summary,
17+
string Description,
1718
bool IsDeprecated,
1819
string BaseClass,
1920
bool IsBaseClass,
@@ -62,6 +63,7 @@ public static ModelData FromSchemaContext(
6263
? context.ComputeEnum().Values.ToImmutableArray()
6364
: [],
6465
Summary: context.Schema.GetSummary(),
66+
Description: context.Schema.Description ?? string.Empty,
6567
IsDeprecated: context.Schema.Deprecated,
6668
BaseClass: context.IsDerivedClass
6769
? context.BaseClassContext.Id

src/libs/AutoSDK/Models/PropertyData.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public record struct PropertyData(
1717
string? Example,
1818
bool IsDeprecated,
1919
string Summary,
20+
string Description,
2021
string ConverterType,
2122
string DiscriminatorValue)
2223
{
@@ -33,6 +34,7 @@ public record struct PropertyData(
3334
IsDeprecated: false,
3435
Settings: Settings.Default,
3536
Summary: string.Empty,
37+
Description: string.Empty,
3638
ConverterType: string.Empty,
3739
DiscriminatorValue: string.Empty);
3840

@@ -87,6 +89,7 @@ public static PropertyData FromSchemaContext(SchemaContext context)
8789
? example.ClearForXml()
8890
: null,
8991
Summary: context.Schema.GetSummary(),
92+
Description: context.Schema.Description ?? string.Empty,
9093
ConverterType: type.ConverterType,
9194
DiscriminatorValue: string.Empty);
9295
}

0 commit comments

Comments
 (0)