Azure / Azure/azure-functions-openapi-extension

Complex properties not showing within example

Open
#586 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
388
Forks
202
PR merge metrics
No merged PRs in 30d

Description

Using version 1.5.1 (same issue with 1.4.0) within an inprocess .net 6 function I am not seeing my complex property within the example of Swagger UI that is generated.

Here is my example:

`public class CalculatorRequestExample : OpenApiExample
{
public override IOpenApiExample Build(NamingStrategy namingStrategy = null)
{
Examples.Add(
OpenApiExampleResolver.Resolve(
"ParametersExample",
new CalculatorParameters
{
Carbon = 0.2,
Chromium = 0.01,
SectionDetails = new List
{
new SectionDetail { A = 0, B = 0.10054, C = 0 },
new SectionDetail { A = 3000, B = 0.10054, C = 0 }
}
},
namingStrategy
));

return this;
}
}`

All properties but for SectionDetails are visible.

If anyone has been able to achieve this I would really appreciate some guidance

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.