GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Documentation
  • ProjectTemplates
  • React
  • Vue
  • DTOs
  • AutoQuery
  • Background Jobs
  • AI
  • RAG
  • PDF
  • Auth
  • OrmLite
  • Redis
  • gRPC

This view

  • Original page
  • New address

GeezerVison is showing docs.servicestack.net — Versioning

Versioning

Implicit Versioning​

You can populate Version numbers in all Request DTO's implementing IHasVersion, i.e:

public class Hello : IReturn<HelloResponse>, IHasVersion 
{
    public int Version { get; set; }
    public string Name { get; set; }
}

By assigning the Version property on the Service Clients, e.g:

client.Version = 2;

Which will auto populate each Request DTO that implements IHasVersion, e.g:

client.Get(new Hello { Name = "World" });  // Hello.Version=2

Version Abbreviation Convention​

A popular convention for specifying versions in API requests is with the ?v=1 QueryString which ServiceStack now uses as a fallback for populating any Request DTO's that implement IHasVersion (as above).

INFO

as ServiceStack's message-based design promotes forward and backwards-compatible Service API designs, our recommendation is to only consider implementing versioning when necessary, at which point check out our recommended versioning strategy

Edit this page on GitHub
On This Page
  • Implicit Versioning
    • Version Abbreviation Convention
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.