For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Overview
    • Introduction
    • How it works
    • Quickstart
    • Customer showcase
  • Working with SDKs
    • Project structure
    • Adding custom code
    • Migrating to Replay
    • Capabilities
  • Generators
      • Generating an SDK
      • Publishing to NuGet
      • Configuration
      • Adding custom code
      • Version compatibility
      • Changelog
      • Customer showcase
  • Reference
    • generators.yml
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
Generators.NET

Changelog

October 30, 2024
October 30, 2024
Was this page helpful?
Edit this page
Previous

November 5, 2024

Next

October 28, 2024

1.8.5

(feat): Add forward-compatible enums. Set experimental-enable-forward-compatible-enums to true in the configuration to generate forward-compatible enums. With forward-compatible enums you can create and parse an enum value that is not predefined.

  • Forward compatible enums are not compatible with the previously generated native enums. This is a breaking change for the users of the generated SDK, but only users using switch-case statements are affected.
  • Use the Value property to get the string value of the enum. - For each value in the enum,
    • a public static property is generated, which is an instance of the enum class,
    • a public static property is generated within the nested Values class with the string value of the enum.

Here’s a before and after for creating and parsing a resource with a predefined enum value and a custom enum value: Before: csharp var resource = client.CreateResource(new Resource { Id = "2", EnumProperty = MyEnum.Value2 } ); // The line below does not compile because the enum does not have a `Value3` value. // resource = client.CreateResource(new Resource { Id = "3", EnumProperty = MyEnum.Value3 } ); resource = client.GetResource("3"); switch(resource.EnumProperty) { case MyEnum.Value1: Console.WriteLine("Value1"); break; case MyEnum.Value2: Console.WriteLine("Value2"); break; default: // this will never be reached until the SDK is updated with the new enum value Console.WriteLine("Unknown"); break; } if(resource.EnumProperty == MyEnum.Value1) { Console.WriteLine("Value1"); } else if (resource.EnumProperty == MyEnum.Value2) { Console.WriteLine("Value2"); } else { // this will never be reached until the SDK is updated with the new enum value Console.WriteLine("Unknown"); } No exception is thrown, but the output incorrectly shows Value1 because .NET falls back to the first value in the enum. After:

var resource = client.CreateResource(new Resource { Id = "2", EnumProperty = MyEnum.Value2 } ); resource = client.CreateResource(new Resource { Id = "3", EnumProperty = MyEnum.Custom("value3") } ); resource = client.GetResource("3"); switch(resource.EnumProperty.Value) {
1 case MyEnum.Values.Value1:
2 Console.WriteLine("Value1");
3 break;
4 case MyEnum.Values.Value2:
5 Console.WriteLine("Value2");
6 break;
7 default:
8 Console.WriteLine(resource.EnumProperty.Value);
9 break;
10} if(resource.EnumProperty == MyEnum.Value1) {
11 Console.WriteLine("Value1");
12} else if (resource.EnumProperty == MyEnum.Value2) {
13 Console.WriteLine("Value2");
14} else {
15 Console.WriteLine(resource.EnumProperty.Value);
16} ```
17The output correctly shows `Value3`.