AutoQuery Viewer and Routes - ServiceStack v5.91

According to the documentation “clicking on json link will add the .json extension to the generated url” but this is not the behavior I see on this page:

I expected the generated url to be:
It’s actually and clicking on the links will modify the “html” part.

Possible explanation: does not expose the routes.
For comparison:

The issue, if confirmed, is definitely a minor one and ServiceStack Studio replaces the Admin UI.
However, the AutoQuery Viewer is still a useful tool and perhaps deserves a fix, if small and feasible.

It’s HTML at the start, or when you click X to reset the query:

But then clicking on json sees the json link change the pre-defined route to:

Which is how you change the response format for pre-defined routes.

You are right @mythz the behavior is correct in itself. But there is also a user defined route for “QueryPageStats”:

I thought the AutoQuery Viewer used it, as documented in the manual.

By the way, I noticed a possible problem while working on my project, I took your website as an example only for convenience.

The .json extension can be used to change the format for “user-defined routes”, e.g:

When no user-defined route exists, it needs to fallback to use the pre-defined route which needs to change the format by changing the pre-defined URL as above.

But in fact the “/query/pagestats” user defined route does exist, as stated before.
So I expected a bevior similar to e.g.

Nevermind @mythz The problem is elusive, I will update the topic after collecting some more information.

Below is the crucial line, this.props.selected.requestType.routes is always undefined because the routes are no longer there.

Possibly related commit:

I’m not following you, clicking on:

as expected lets you click on json which changes the URL to:

Yes, that’s the expected behaviour (“X-Powered-By: ServiceStack/5.60 Net45/Windows” according to the response headers) in fact the routes are there:

I quoted it to compare it with (" X-Powered-By: ServiceStack/5.91 NetCore/Linux") which doesn’t behave the same way.

ok this was due to the routes metadata info being moved, I’ve re-added the routes info back to AutoQuery Metadata in the latest v5.9.1 that’s now available on MyGet.

1 Like

Great! I confirm that the problem has been solved. Thanks @mythz

1 Like