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

abp generate-proxy and appservices #3294

Closed
sebitsi opened this issue Mar 21, 2020 · 2 comments
Closed

abp generate-proxy and appservices #3294

sebitsi opened this issue Mar 21, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@sebitsi
Copy link

sebitsi commented Mar 21, 2020

abp generate-proxy command has module switch.

How is this switch related to AppService ?
I mean, if i add Area attribute to my appservice it is ignored.
Service is still in app module.

Is api-definition endpoint created only for controllers ?

Is there any documentation related to abp generate-proxy, /api/abp/api-definition endpoint and area attribute ?

@sebitsi
Copy link
Author

sebitsi commented Apr 2, 2020

Hi guys.

Any help ? Please.

@hikalkan hikalkan assigned hikalkan and unassigned erolarkat Apr 3, 2020
@hikalkan hikalkan added this to the 2.4 milestone Apr 3, 2020
@hikalkan
Copy link
Member

hikalkan commented Apr 3, 2020

I suppose you mention about the Auto API Controller feature of the ABP Framework.

In this case, module name and can be set using the RootPath option:
https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers#route

In this example, typeof(BookStoreApplicationModule).Assembly says that "use this route for all app services inside this assembly".

If you have a separate project (.csproj/dll/assembly) for each module, this use is fine.

If you want to customize the module name for a single app service, while others are same in an assembly, use options.ConventionalControllers.Create multiple times with TypePredicate

Area is not used on the app services (since it is a web layer feature).

Is api-definition endpoint created only for controllers

Both app services & controllers, with given restrictions;

  • For app services, you need to have using options.ConventionalControllers.Create(...) (startup template does it for the app services inside the .Application project)
  • For controllers, use the [RemoteService] attribute on the controller class.

@hikalkan hikalkan closed this as completed Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants