You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
namespaceMicrosoft.Examples.Models{usingSystem;usingSystem.ComponentModel.DataAnnotations;/// <summary>/// Represents a person./// </summary>publicclassPerson{/// <summary>/// Gets or sets the unique identifier for a person./// </summary>/// <value>The person's unique identifier.</value>publicstringId{get;set;}/// <summary>/// Gets or sets the first name of a person./// </summary>/// <value>The person's first name.</value>[Required][StringLength(25)]publicstringFirstName{get;set;}/// <summary>/// Gets or sets the last name of a person./// </summary>/// <value>The person's last name.</value>[Required][StringLength(25)]publicstringLastName{get;set;}/// <summary>/// Gets or sets the email address for a person./// </summary>/// <value>The person's email address.</value>publicstringEmail{get;set;}/// <summary>/// Gets or sets the telephone number for a person./// </summary>/// <value>The person's telephone number.</value>publicstringPhone{get;set;}}}
The text was updated successfully, but these errors were encountered:
bdebaere
changed the title
String primary key returns wrong Swagger link
String primary key returns wrong Swagger links
Mar 14, 2018
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.
The text was updated successfully, but these errors were encountered: