Azure / Azure/azure-functions-openapi-extension
Interfaces don't inform properties of base interfaces
- Dominant language
- C#
- Stars
- 388
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the issue**
When implementing from another interface, the openapi specification doesn't inform the user of the interfaces base properties.
The following interface `IPersonWithAccess` as shown in the figure below implements `IPersonWithId` which implements `IPersonWithoutId`.

When we have the following record class in our project...
```csharp
public record PersonsWithAccessBook
{
public PersonWithAccess BookOwner { get; set; }
public IEnumerable PersonsWithAccess
{
get;
set;
}
}
```
one would expect `IPersonWithAccess` to inform the user in the specification of it's base properties as well. But right now this isn't the case.

An example repo can be found [here](https://github.com/sinantutan/openapi-extension-interfaces-base-symbols-bug).
**To Reproduce**
Steps to reproduce the behavior:
1. Create two or more interfaces and implement them hierarchically.
2. In another class create a property as a collection of the interface which implements.
3. Create an openapi example class and add it to your openapi function.
4. See error in the swagger ui.
**Expected behavior**
Interfaces inform user of their base properties in the openapi specification.
**Environment:**
- OS: Windows 11 Enterprise (10.0, Build 22621)
- Browser: Microsoft Edge, Version 109.0.1518.55 (Official build) (64-bit)
- Microsoft.Azure.WebJobs.Extensions.OpenApi (1.5.0)
- Microsoft.NET.Sdk.Functions (4.1.3)
Contributor guide
Research direction
Start with the linked example repository and reproduce the issue using the documented interface hierarchy, collection property, and OpenAPI example class. Inspect the generated specification in Swagger UI and compare it with the inherited properties described in the issue. Done means the specification exposes the base properties for hierarchically implemented interfaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100