Skip to content

Conversation

@niemyjski
Copy link
Member

This is a WIP, it's really close but some serialization stuff needs to be refactored and cleaned up, mainly the websocket manager.

@niemyjski niemyjski self-assigned this Dec 6, 2025
@niemyjski niemyjski requested a review from ejsmith December 6, 2025 03:20
@niemyjski niemyjski force-pushed the feature/scalar-system-text-json branch from 612abcd to f6a5805 Compare December 6, 2025 03:25
@niemyjski niemyjski force-pushed the feature/scalar-system-text-json branch from f6a5805 to 24bd01b Compare January 12, 2026 03:58
Comment on lines +113 to +122
foreach (var propertyName in value.GetChangedPropertyNames())
{
if (value.TryGetPropertyValue(propertyName, out var propertyValue))
{
// Convert property name to snake_case if needed
var jsonPropertyName = options.PropertyNamingPolicy?.ConvertName(propertyName) ?? propertyName;
writer.WritePropertyName(jsonPropertyName);
JsonSerializer.Serialize(writer, propertyValue, _options);
}
}
return cachedDoc;
}

var xmlPath = Path.Combine(AppContext.BaseDirectory, $"{assemblyName}.xml");
{
// Arrange
string baselinePath = Path.Combine("..", "..", "..", "Controllers", "Data", "swagger.json");
string baselinePath = Path.Combine("..", "..", "..", "Controllers", "Data", "openapi.json");
Comment on lines +36 to +43
if (schema.Properties.TryGetValue(schemaPropertyName, out var propertySchema))
{
// Cast to OpenApiSchema to access mutable properties
if (propertySchema is OpenApiSchema mutableSchema)
{
mutableSchema.ReadOnly = true;
}
}
Comment on lines +21 to +28
if (methodInfo is null)
{
// For controller actions, try to get from ControllerActionDescriptor
if (context.Description.ActionDescriptor is Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor controllerDescriptor)
{
methodInfo = controllerDescriptor.MethodInfo;
}
}
Comment on lines +23 to +30
if (methodInfo is null)
{
// For controller actions, try to get from ControllerActionDescriptor
if (context.Description.ActionDescriptor is Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor controllerDescriptor)
{
methodInfo = controllerDescriptor.MethodInfo;
}
}
Comment on lines +111 to +114
catch
{
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants