ServiceStack Restrict Visibility -


I using'm trying to optimize the visibility of a ServiceStack endpoint so as restricted Attribute.

  [root ( "/ test", action = "GET")] [Limit (VisibilityTo = RequestAttributes.Localhost)] public class TestDto {...}   

However this API is the reason for being invisible from both localhost and external. I LocalSubnet is the same behavior with are all gray formats on metadata page and when browsing localhost I do not see the way in Swagger.

because it's happening so you have not defined the format that implement this ban in . Metadata page indicates that this is not showing any format available. You can specify formats such as
 . [Restricted (VisibilityTo = RequestAttributes.Localhost | RequestAttributes.Xml | RequestAttributes.Json)]   

get route visible way Swagger on localhost request to Json and xml formats will show it You have to give Json permission.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -