Are there are any major design flaws / smells in creating a web api as described below
The models I have
public class CourseModel {
public String Name {get; set;}
public IList<StudentModel> EnrolledStudents {get; set;}
}
public class StudentModel {
public string Name {get; set;}
}
The endpoints for operations on courses
public IEnumerable<CourseModel> Get() { //return all courses}
public void Post(string courseName) {//Create Course}
public void Put(string courseName, string newCourseName) { //UpdateCourse }
public void Delete(string courseName) { //DeleteCourse }
public void AddStudent(string studentName, string courseName) { //Add student to course }
public void RemoveStudent(string studentName, string courseName) { //remove stude from course }
I am worried I'm missing something as I am used to seing the AddStudent/RemoveStudent done with a Put endpoint such as
public void Put(CourseModel model) { //Get stored entity and determine updates }