Closed
Description
If you take the example code of the SwaggerODataWebApiSample project and you change the Person entity to have a string primary key. Then the links provided by Swagger no longer make sense. Next to the GET, in the Curl and in the request URL. The POST is also wrong and I would assume the PUT to be the same. See the screenshot provided below.
namespace Microsoft.Examples.Models
{
using System;
using System.ComponentModel.DataAnnotations;
/// <summary>
/// Represents a person.
/// </summary>
public class Person
{
/// <summary>
/// Gets or sets the unique identifier for a person.
/// </summary>
/// <value>The person's unique identifier.</value>
public string Id { get; set; }
/// <summary>
/// Gets or sets the first name of a person.
/// </summary>
/// <value>The person's first name.</value>
[Required]
[StringLength( 25 )]
public string FirstName { get; set; }
/// <summary>
/// Gets or sets the last name of a person.
/// </summary>
/// <value>The person's last name.</value>
[Required]
[StringLength( 25 )]
public string LastName { get; set; }
/// <summary>
/// Gets or sets the email address for a person.
/// </summary>
/// <value>The person's email address.</value>
public string Email { get; set; }
/// <summary>
/// Gets or sets the telephone number for a person.
/// </summary>
/// <value>The person's telephone number.</value>
public string Phone { get; set; }
}
}