I’m using ServiceStack, and I’d like to help the “auto documentation” of the generated metadata out.
I recently found the ApiAttribute and the ApiMemberAttribute (mentioned here and here). However, I cannot get the http://me/api/metadata?op=ReadFormType page to emit any information for the decorated member.
He is a stripped down version of my DTO (it’s just a stub so far) that uses a test property:
[Api("Read FormType")]
[Route("/formTypes/{FormType}", "GET")]
public class ReadFormType
{
[ApiMember(Name = "X", Description = "X Description",
ParameterType = "path", DataType = "string", IsRequired = true)]
public string X { get; set; }
}
The ApiAttribute text does correctly appear at the top of the metadata response and the member is listed correctly in the Request DTO section below.
What do I need to do in order to make the extra information in ApiMemberAttribute appear? (Or am I misunderstanding how this attribute works?)
The version of ServiceStack is 3.9.35.
The
ApiandApiMemberattributes are currently used in ServiceStack’s Swagger support.But we’ll also include them to ServiceStack’s auto-generated metadata pages in the next version of ServiceStack.