Skip to content

Commit

Permalink
docs(api): Document feedback endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ditsuke committed Nov 27, 2023
1 parent e84d9a9 commit 07e4fc4
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
24 changes: 24 additions & 0 deletions server/gen/go/v1/amizone_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions server/gen/openapiv2/v1/amizone.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@
},
"/api/v1/faculty/feedback/submit": {
"post": {
"summary": "FillFacultyFeedback submits faculty feedback.",
"description": "It does so by making a tradeoffs -- all faculty feedback is submitted at\nonce and its identical for all of them.\n\nParameters:\n- rating: The rating to submit for all faculty. These are ratings on a scale of 1-5.\n- query_rating: The rating to \"query\" type questions at the bottom of the feedback form.\n These are ratings on a scale of 1-3.",
"operationId": "AmizoneService_FillFacultyFeedback",
"responses": {
"200": {
Expand Down Expand Up @@ -351,6 +353,7 @@
},
"/api/v1/wifi_mac": {
"get": {
"summary": "GetWifiMacInfo returns the user's registered MAC addresses.",
"operationId": "AmizoneService_GetWifiMacInfo",
"responses": {
"200": {
Expand All @@ -375,6 +378,7 @@
]
},
"post": {
"summary": "RegisterWifiMac registers a MAC address to the user's account.",
"operationId": "AmizoneService_RegisterWifiMac",
"responses": {
"200": {
Expand Down Expand Up @@ -411,6 +415,7 @@
},
"/api/v1/wifi_mac/{address}": {
"delete": {
"summary": "DeregsiterWifiMac removes a registered MAC address from the user's account.",
"operationId": "AmizoneService_DeregisterWifiMac",
"responses": {
"200": {
Expand Down
12 changes: 12 additions & 0 deletions server/proto/v1/amizone.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,30 @@ service AmizoneService {
rpc GetUserProfile(EmptyMessage) returns (Profile) {
option (google.api.http) = {get: "/api/v1/user_profile"};
}
// GetWifiMacInfo returns the user's registered MAC addresses.
rpc GetWifiMacInfo(EmptyMessage) returns (WifiMacInfo) {
option (google.api.http) = {get: "/api/v1/wifi_mac"};
}
// RegisterWifiMac registers a MAC address to the user's account.
rpc RegisterWifiMac(RegisterWifiMacRequest) returns (EmptyMessage) {
option (google.api.http) = {
post: "/api/v1/wifi_mac"
body: "*"
};
}
// DeregsiterWifiMac removes a registered MAC address from the user's account.
rpc DeregisterWifiMac(DeregisterWifiMacRequest) returns (EmptyMessage) {
option (google.api.http) = {delete: "/api/v1/wifi_mac/{address}"};
}
// FillFacultyFeedback submits faculty feedback.
//
// It does so by making a tradeoffs -- all faculty feedback is submitted at
// once and its identical for all of them.
//
// Parameters:
// - rating: The rating to submit for all faculty. These are ratings on a scale of 1-5.
// - query_rating: The rating to "query" type questions at the bottom of the feedback form.
// These are ratings on a scale of 1-3.
rpc FillFacultyFeedback(FillFacultyFeedbackRequest) returns (FillFacultyFeedbackResponse) {
option (google.api.http) = {
post: "/api/v1/faculty/feedback/submit",
Expand Down

0 comments on commit 07e4fc4

Please sign in to comment.