public void Apply(OpenApiParameter parameter, ParameterFilterContext context) { var enumType = TryGetEnumType(context.ApiParameterDescription); if (enumType != null) { XmsEnumExtensionApplicator.Apply(parameter.Extensions, enumType, _options); } }
public void Apply(OpenApiSchema schema, SchemaFilterContext context) { var type = context.Type; if (type.IsEnum) { XmsEnumExtensionApplicator.Apply(schema.Extensions, type, _options); } ; }
public void Apply(OpenApiOperation operation, OperationFilterContext context) { if (operation.Parameters == null) { return; } foreach (var parameter in GetEnumParameters(context)) { var operationParameter = operation.Parameters.Single(p => p.Name == parameter.Name); XmsEnumExtensionApplicator.Apply(operationParameter.Extensions, parameter.Type, _options); } }