ServiceStack calling another ServiceStack, ends up exposing the other's service as a service

This is a bit convoluted, but:

I have an SS API called “A” which I’m calling from “B”, which is also a SS application.

To call A’s service, I needed to add their DTO, which happens to be AutoQuery based:

public class QueryEmployeesPublic
    : QueryDb<Employee, AnnotatedEmployee>, IReturn<QueryResponse<AnnotatedEmployee>>, IGet
{
    public string NameSearch { get; set; }
}

Then in “B” I’ve got a service calling that QueryEmployeesPublic using the JsonApiClient.

However, at least at the /ui the QueryEmployeesPublic seems to be exposed for “B”.

I don’t have a service implementing QueryEmployeesPublic in “B”, but I guess that’s automatically created, due to AutoQuery…

How can I ignore that?

I’m not following your Services relationship setup, but if you want to exclude DTOs for being generated for an API you can annotate it with [ExcludeMetadata].

1 Like

Thanks, I’ll try that.

To clarify:
I’m using SS in multiple projects. And in this project “A” I’m using the SS clients to call services elsewhere, and those services happen to be AutoQuery.

When SS in this project sees those, it thinks it should expose them as services provided, but they’re actually consumed.

The ExcludeMetadata probably does the trick.