Commit b519f5ab authored by Sylvain Renault's avatar Sylvain Renault
Browse files

Changed some response to Success/Error

parent 22ce0aa2
Loading
Loading
Loading
Loading

openapi @ 7e50e43e

Original line number Diff line number Diff line
Subproject commit 073fd7213fd9e6ebc2f8a47d628a650de30c8bc4
Subproject commit 7e50e43e90a8dcd958944e8e9ceda05c7668db48
+0 −2
Original line number Diff line number Diff line
@@ -68,7 +68,6 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers
            GetCapabilities200Response response = new GetCapabilities200Response();
            response.Capabilities = capabilitiesList;
            return new ObjectResult(response);
            //return StatusCode(405, "Not supported yet!");
        }

        /// <summary>
@@ -88,7 +87,6 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers
            GetSupport200Response response = new GetSupport200Response();
            response.Capabilities = capabilitiesList;
            return new ObjectResult(response); 
            //return StatusCode(405, "Not supported yet!");
        }
    }
}
+4 −4
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers

            // Notify the modules that the client need a new framerate
            bool result = WorldAnalysisConnections.Singleton.ConfigureFramerate(poseConfiguration);
            return result ? StatusCode(200, "Ok.") : StatusCode(405, "Not supported.");
            return result ? StatusCode(200, new Success() { Message = "Ok." }) : StatusCode(405, new Error() { Message = "Not supported." });
        }

        /// <summary>
@@ -142,7 +142,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers
                    return new ObjectResult(response);
                }
            }
            return StatusCode(404, "Not found.");
            return StatusCode(404, new Error() { Message = "Not found." });
        }

        /// <summary>
@@ -247,7 +247,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis.Controllers

            // todo: inform the module(s) that the subscription changed

            return StatusCode(405, "Not supported yet!");
            return StatusCode(405, new Error() { Message = "Not supported yet!" });
        }
    }
}