Skip to main content

Definition

Assembly: Mintlify.Core.dll Namespace: Mintlify.Core.Models Inheritance: System.Object

Syntax

Mintlify.Core.Models.ApiExamplesConfig

Summary

Represents the configuration for autogenerated API examples in the documentation.

Remarks

Controls which programming languages are shown in code examples and whether optional parameters are included in the generated examples.

Constructors

.ctor

Syntax

public ApiExamplesConfig()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

Defaults

Gets or sets whether to show optional parameters in API examples.

Syntax

public string Defaults { get; set; }

Property Value

Type: string?

Examples

"examples": {
  "defaults": "required"
}

Remarks

Valid values are:
  • “all”: Show all parameters including optional ones
  • “required”: Show only required parameters Defaults to “all” when not specified.

Languages

Gets or sets the programming languages for autogenerated API snippets.

Syntax

public System.Collections.Generic.List<string> Languages { get; set; }

Property Value

Type: System.Collections.Generic.List<string>?

Examples

"examples": {
  "languages": ["javascript", "python", "curl"]
}

Remarks

Specifies which programming languages should be included in the automatically generated code examples. Common values include: “javascript”, “python”, “curl”, “go”, “java”, “php”, “ruby”, etc.

Prefill

Gets or sets whether to prefill the API playground with data from schema examples.

Syntax

public System.Nullable<bool> Prefill { get; set; }

Property Value

Type: System.Nullable<bool>?

Examples

"examples": {
  "prefill": true
}

Remarks

When enabled, the playground automatically populates request fields with example values from your OpenAPI specification. This provides users with pre-populated data to help them understand the API structure and test endpoints more easily. Defaults to false when not specified.

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?