You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every application controller derives from one of these base controllers. To switch one or more methods use AllowedOperation attribute, consider we are having CRUD ProfileController that must have only a Read, Create and Update operations, example below shows how to configure you controller:
To make this feature work a AllowedOperationsConvention MUST be passed to the AddControllers exyension method in you Startup:
services.AddControllers(options =>{options.Conventions.Add(newAllowedOperationsConvention());});Callingendpoint that were not included by the attribute result with `MethodNotAllowed` status code
This configuration also affect OpenAPI Exploration, see: