OpenApi support - Microsoft.AspNetCore.OpenApi namespaces vs Microsoft.AspNetCore.Mvc namespaces ... #65315
-
|
This is more just out of curiosity, but I build a lot of minimal API's / services that do NOT use MVC or Blazor and have noticed that when using a call such as:
The following MVC services are automatically injected: Yes, I realize there is a If I create an OpenAPI document for an API, it turns out the Just wondering if all things OpenApi should "live" under the Would also be great if the documentation for all the various Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The "Mvc" part of the naming is just a historical artefact at this point. These types were part of MVC when the other things such as Blazor or Minimal APIs didn't exist, and were moved to different assemblies to remove the actual dependency on MVC for such types of projects. Changing their namespace would have been a breaking change though, so they were left named as they were originally created. |
Beta Was this translation helpful? Give feedback.
The "Mvc" part of the naming is just a historical artefact at this point. These types were part of MVC when the other things such as Blazor or Minimal APIs didn't exist, and were moved to different assemblies to remove the actual dependency on MVC for such types of projects. Changing their namespace would have been a breaking change though, so they were left named as they were originally created.