2021-11-29 18:25:50 +01:00
|
|
|
namespace zero.Api;
|
|
|
|
|
|
|
|
|
|
public struct ApiRequestHints
|
|
|
|
|
{
|
2021-12-12 15:41:51 +01:00
|
|
|
public ApiResponsePreference ResponsePreference { get; set; } = ApiResponsePreference.Representation;
|
2021-11-29 18:25:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Preference for POST + PUT requests
|
|
|
|
|
/// see https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#75-standard-request-headers
|
|
|
|
|
/// </summary>
|
|
|
|
|
public enum ApiResponsePreference
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns a minimal repsonse for inserts and updates
|
|
|
|
|
/// </summary>
|
|
|
|
|
Minimal = 0,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns status as well as model for inserts and updates
|
|
|
|
|
/// </summary>
|
|
|
|
|
Representation = 1
|
|
|
|
|
}
|