-
-
Notifications
You must be signed in to change notification settings - Fork 513
Replace SwashBuckle with Scalar, Replace JSON.NET from API Surface with STJ #2041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
niemyjski
wants to merge
7
commits into
main
Choose a base branch
from
feature/scalar-system-text-json
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,522
−1,073
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
612abcd to
f6a5805
Compare
f6a5805 to
24bd01b
Compare
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; | ||
| } |
Removes duplicate package references and cleans up unused package references in the Exceptionless.Web project file. This ensures that the project has a consistent and minimal set of dependencies.
Removes the DeltaOperationFilter as it is no longer needed.
Updates the Scalar.AspNetCore package to the latest version. This change also updates the Scalar configuration to support multiple API documentation versions and includes updates to the route pattern and authentication.
Updates documentation configuration to streamline access and improve security. Redirects the `/docs/index.html` path to `/docs` for a cleaner user experience. Simplifies the API key authentication scheme in the documentation, replacing username/password and token authentication. The key is renamed to "Token" and the security scheme is updated to "Bearer". This change provides a more straightforward and modern approach to API authentication documentation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a WIP, it's really close but some serialization stuff needs to be refactored and cleaned up, mainly the websocket manager.