POST api/Food/TestDataValidation

Request Information

URI Parameters

None.

Body Parameters

Courses
NameDescriptionTypeAdditional information
SchoolName

string

Required

interval

integer

Required

Range: inclusive between 1 and 10

CourseNames

Collection of CoursesName

None.

Request Formats

application/json, text/json

Sample:
{
  "schoolName": "sample string 1",
  "interval": 2,
  "courseNames": [
    {
      "courseName": "sample string 1"
    },
    {
      "courseName": "sample string 1"
    }
  ]
}

application/xml, text/xml

Sample:
<Courses xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <CourseNames>
    <CoursesName>
      <CourseName>sample string 1</CourseName>
    </CoursesName>
    <CoursesName>
      <CourseName>sample string 1</CourseName>
    </CoursesName>
  </CourseNames>
  <SchoolName>sample string 1</SchoolName>
  <interval>2</interval>
</Courses>

multipart/form-data

Sample:
<Courses xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><CourseNames><CoursesName><CourseName>sample string 1</CourseName></CoursesName><CoursesName><CourseName>sample string 1</CourseName></CoursesName></CourseNames><SchoolName>sample string 1</SchoolName><interval>2</interval></Courses>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Courses'.

Response Information

Resource Description

Courses
NameDescriptionTypeAdditional information
SchoolName

string

Required

interval

integer

Required

Range: inclusive between 1 and 10

CourseNames

Collection of CoursesName

None.

Response Formats

application/json, text/json

Sample:
{
  "schoolName": "sample string 1",
  "interval": 2,
  "courseNames": [
    {
      "courseName": "sample string 1"
    },
    {
      "courseName": "sample string 1"
    }
  ]
}

application/xml, text/xml

Sample:
<Courses xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <CourseNames>
    <CoursesName>
      <CourseName>sample string 1</CourseName>
    </CoursesName>
    <CoursesName>
      <CourseName>sample string 1</CourseName>
    </CoursesName>
  </CourseNames>
  <SchoolName>sample string 1</SchoolName>
  <interval>2</interval>
</Courses>

multipart/form-data

Sample:
<Courses xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><CourseNames><CoursesName><CourseName>sample string 1</CourseName></CoursesName><CoursesName><CourseName>sample string 1</CourseName></CoursesName></CourseNames><SchoolName>sample string 1</SchoolName><interval>2</interval></Courses>