Cysharp / MagicOnion

Unified Realtime/API framework for .NET platform and Unity.
MIT License
3.68k stars 417 forks source link

Feature Request: An attribute to exclude services from swagger #660

Closed licentia88 closed 5 months ago

licentia88 commented 1 year ago

lately I've been using magiconion with memorypack,

I've created a generic service base that derives from ServiceBase

public class MagicBase<TService, TModel> : MagicBase<TService, TModel>
    where TService : IGenericService<TService, TModel>, IService<TService>
    where TModel : class 
{
    public MagicBase(IServiceProvider provider) : base(provider)
    {

    }
   //Generic methods reside here..
}

this works in terms of functionality however due to the nature of memory pack some of my models are marked as abstract to use memorypack union. I've noticed that when I create endpoints with an abstract class as TModel Swagger does not work.

Therefore I kindly ask for an attribute to decorade our endpoints such as

[ApiExplorerSettings(IgnoreApi = true)] 

to exclude endpoint from swagger

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.