Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9284481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:54:53+00:00 2026-06-18T18:54:53+00:00

In a given example code below the metadata page never gets the description specified

  • 0

In a given example code below the metadata page never gets the description specified in

[Description("GET account, all or by list of groups or by list of logins")] 

Is there a special config that needs to be set in order for descriptions to show up in the metadata pages?

Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using ServiceStack.ServiceHost;
using System.Runtime.Serialization;
using ServiceStack.WebHost.Endpoints;

namespace ConsoleApplication2
{
    public class User
    {
        public User()
        {

        }
        public int login;
        public string group;
        public string name;
    }

    [Description("GET account, all or by list of groups or by list of logins")]
    [Route("/accounts")]
    public class Accounts : IReturn<List<User>>
    {
        public string[] groups { set; get; }
        public int[] logins { set; get; }

        public Accounts() { }

        public Accounts(params int[] logins)
        {
            this.logins = logins;
        }

        public Accounts(params string[] groups)
        {
            this.groups = groups;
        }
    }

    public class Host : AppHostHttpListenerBase
    {
        public Host() : base("Test", 
                            typeof(Accounts).Assembly)
        {

        }

        public override void Configure(Funq.Container container)
        {
            SetConfig(new EndpointHostConfig { 
                EnableFeatures = Feature.All

            });
        }
    }

    public class Servce : IService
    {
        public object Get(Accounts request)
        {
            return new List<User>(){new User()};
        }

    }

    class Program
    {
        static void Main(string[] args)
        {
            var host = new Host();
            host.Init();
            host.Start("http://+:12345/");

            Console.ReadLine();

        }
    }
}

Navigating to http://localhost:12345/json/metadata?op=Accounts produces

<body>
    <a id="logo" href="http://www.servicestack.net" title="servicestack"></a>
    <h1>Test</h1>

    <form>
    <div>
        <p><a href="/metadata">&lt;back to all web services</a></p>
        <h2>Accounts</h2>



        <div class="example">
        <!-- REST Examples -->
        ...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T18:54:54+00:00Added an answer on June 18, 2026 at 6:54 pm

    In a recent release of ServiceStack, [Description] was deprecated in favour of [Api] and [ApiMember] which are also used in ServiceStack’s Swagger support.

    This is now an example of a fully annotated service:

    [Api("Service Description")]
    [Route("/swagger/{Name}", "GET", Summary = @"GET Summary", Notes = "GET Notes")]
    [Route("/swagger/{Name}", "POST", Summary = @"POST Summary", Notes = "POST Notes")]
    public class MyRequestDto
    {
        [ApiMember(Name="Name", Description = "Name Description", 
                   ParameterType = "path", DataType = "string", IsRequired = true)]
        public string Name { get; set; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I try to compile the example code given below, I get the following
Given the example source code below, is it possible for someone to see the
Given the example code below: // ExampleModel.h @interface ExampleModel : NSObject <ASIHTTPRequestDelegate> { }
The below code is an example given in boost msm documentation for functor front
I know how to do this... I'll give example code below. But I can't
Given the next code example, I'm unable to free the parameter const char* expression
For example, my goal is to test the code given here: PHP script that
Given the example below, can someone please show me how this could be called?
Consider the following example code. The example is given just to highlight the different
Looking at Dwolla's API documentation and trying the oauth.php example code (code shown below)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.