SampleGenerator.GetSampleObject Method
- Namespace:
- Weavy.Web.Areas.Docs.Samples
- Assembly:
- Weavy.Web.dll
Overloads
Get |
Gets sample object for the specified System.Web.Http.Description.ApiDescription .
|
Get |
Gets the sample object that will be serialized by the formatters. First, it will look at the SampleObjects. If no sample object is found, it will try to create one using ObjectGenerator. |
GetSampleObject(ApiDescription, SampleDirection)
Gets sample object for the specified System.Web.Http.Description.ApiDescription
.
public (Type, object)GetSampleObject(ApiDescription api, SampleDirection direction)
Parameters
- api
- System.Web.Http.Description.ApiDescription
The System.Web.Http.Description.ApiDescription
.
- direction
- SampleDirection
A value indicating whether to get sample object for request or response.
Returns
System.ValueTuple
The samples keyed by media type.
GetSampleObject(Type)
Gets the sample object that will be serialized by the formatters. First, it will look at the SampleObjects. If no sample object is found, it will try to create one using ObjectGenerator.
public virtual object GetSampleObject(Type type)
Parameters
- type
- System.Type
The type.
Returns
object
The sample object.