-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
If a function returns Enum resulting schema is not wrapped but instead represented as enum itself.
Assemblies affected
Microsoft.OpenApi.OData 1.7.4
Steps to reproduce
I have a function that returns enum. It goes like this:
<Function Name="GetRemoteAccessStatus" IsBound="true">
<ReturnType Type="RemoteAccessStatus" Nullable="false"/>
</Function>
<EnumType Name="RemoteAccessStatus">
<Member Name="None" Value="0"/>
<Member Name="Requested" Value="1"/>
<Member Name="Active" Value="2"/>
</EnumType>
Expected result
In the resulting schema I want to see something like this:
schema:
type: object
properties:
value:
anyOf:
- $ref: '#/components/schemas/RemoteAccessStatus'
Actual result
Actually I get (skipped value):
schema:
$ref: '#/components/schemas/Pbx.RemoteAccessStatus'
Additional information
I thinks the issue is in OpenApiResponseGenerator.cs
where for collection and primitive types it wraps the responses but not for Enum
Metadata
Metadata
Assignees
Labels
No labels