Hi,
I'm using the aspnet zero .net core and jquery version 6.9, I've just added swagger to my project which is working fine. But I would like swagger to only show a few of the actions. For example I would only like to show "api/TokenAuth/Authenticate" and "api/Cars/GetAll". There are more calls that are used by the application and that are generated which is fine but I don't want them to appear in the public swagger api definition.
Is there a way to configure which methods show up in Swagger (but still generate all api's as they are needed by the web application)?
Best regards,
Patrick
6 Answer(s)
-
0
-
0
When I add [RemoteService(IsMetadataEnabled = false)] or [RemoteService(IsEnabled = false)] then it doesn't show in swagger but also the application doesn't work anymore because those services can't be reached through javascript.
So I need some thing to remove it from swagger but in a way that the methods can still be accessed by the application through javascript.
-
0
can still be accessed by the application through javascript.
Do you mean that these methods are not available in
service-proxies.ts
? -
0
No for example I have a view with a datatable on there, in je javascript file I call the app service like so:
var _carService = abp.services.app.car; var dataTable = _$opticianInsurancesTable.DataTable({ paging: true, serverSide: true, processing: true, listAction: { ajaxFunction: _carService.getAll
but when I decorate the car app service with Remote services the _carService.getAll doesn't work anymore.
[RemoteService(IsMetadataEnabled = false)] [AbpAuthorize(AppPermissions.Pages_Cars)] public class CarAppService : CarAppServiceBase, ICarAppService
-
0
Sorry, I thought you were using angular. You can refer to this: https://support.aspnetzero.com/QA/Questions/4380
-
0
That worked! Thanks