Skip to content
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

[9.0-preview.4] Remove x-aspnetcore-id from OpenAPI responses #55832

Closed
1 task done
martincostello opened this issue May 22, 2024 · 1 comment · Fixed by #55924
Closed
1 task done

[9.0-preview.4] Remove x-aspnetcore-id from OpenAPI responses #55832

martincostello opened this issue May 22, 2024 · 1 comment · Fixed by #55924
Labels
area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels feature-openapi
Milestone

Comments

@martincostello
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Playing around with the new OpenAPI support in .NET 9 preview 4, I notice that all the operations have something like the following on all the operations:

"x-aspnetcore-id": "486b77e5-5389-4ee8-aa30-e251b631a16d"

This appears to be an internal implementation detail related to caching that doesn't need to be rendered in the JSON document. The values also don't appear to be deterministic and change with process restarts, which would cause the values to vary over time and within a web farm making stable comparison of the generated document for changes difficult.

It also leaks an implementation detail (that the server uses ASP.NET Core) that a user may not want to be broadcast if the document is internet-facing.

Describe the solution you'd like

The value used for caching is stored in a location that does not get serialized to the document.

Additional context

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label May 22, 2024
@martincostello martincostello added area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels feature-openapi and removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels May 22, 2024
@captainsafia
Copy link
Member

TY for the bug report!

It's been on my radar to remove the x-aspnetcore-id attribute before RC. I wanted to wait until schema transformers had solidified a bit (schema transformers use a similar extension attribute to support mapping in $refs) so we could implement scrubbing of all extension IDs at once. However, I'll just go ahead and do this now to avoid confusing folks using previews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels feature-openapi
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants