OpenApiDocDescriptor.AddInlineExample method
Adds an inline example to the OpenAPI document.
public void AddInlineExample(string name, OpenApiExample example,
OpenApiComponentConflictResolution ifExists = OpenApiComponentConflictResolution.Overwrite)
| parameter | description |
| name | The name of the inline example. |
| example | The inline example to add. |
| ifExists | Specifies the behavior if an example with the same name already exists. |
Exceptions
| exception | condition |
| InvalidOperationException | Thrown if an example with the same name already exists and ifExists is set to Error. |
| ArgumentOutOfRangeException | Thrown if the ifExists parameter has an invalid value. |
See Also