Changed controller name to CloudVision
This commit is contained in:
Родитель
f84f966287
Коммит
cc85ad9102
|
@ -17,7 +17,7 @@ using Color = System.Drawing.Color;
|
|||
|
||||
namespace OxfordAi.WebApi.Controllers
|
||||
{
|
||||
public class VisionController : ApiController
|
||||
public class ComputerVisionController : ApiController
|
||||
{
|
||||
private readonly string _storageConnectionString = ConfigurationManager.AppSettings["StorageConnectionString"];
|
||||
private readonly string _cloudVisionKey = ConfigurationManager.AppSettings["CloudVisionKey"];
|
|
@ -153,7 +153,7 @@
|
|||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="App_Start\WebApiConfig.cs" />
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
<Compile Include="Controllers\VisionController.cs" />
|
||||
<Compile Include="Controllers\ComputerVisionController.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
|
|
|
@ -2,45 +2,45 @@
|
|||
<application xmlns:siena="http://schemas.microsoft.com/MicrosoftProjectSiena/WADL/2014/11" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sienatool="http://www.todo.com" siena:serviceId="CloudVision" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<grammars>
|
||||
<siena:jsonTypes targetNamespace="http://www.todo.com" xmlns:wadl="http://wadl.dev.java.net/2009/02">
|
||||
<siena:object name="Vision_Root">
|
||||
<siena:property name="categories" typeRef="Vision_categories_Array" />
|
||||
<siena:property name="adult" typeRef="Vision_adult_Object" />
|
||||
<siena:object name="CloudVision_Root">
|
||||
<siena:property name="categories" typeRef="CloudVision_categories_Array" />
|
||||
<siena:property name="adult" typeRef="CloudVision_adult_Object" />
|
||||
<siena:property name="requestId" type="string" />
|
||||
<siena:property name="imageUrl" type="string" />
|
||||
<siena:property name="metadata" typeRef="Vision_metadata_Object" />
|
||||
<siena:property name="faces" typeRef="Vision_faces_Array" />
|
||||
<siena:property name="color" typeRef="Vision_color_Object" />
|
||||
<siena:property name="imageType" typeRef="Vision_imageType_Object" />
|
||||
<siena:property name="metadata" typeRef="CloudVision_metadata_Object" />
|
||||
<siena:property name="faces" typeRef="CloudVision_faces_Array" />
|
||||
<siena:property name="color" typeRef="CloudVision_color_Object" />
|
||||
<siena:property name="imageType" typeRef="CloudVision_imageType_Object" />
|
||||
</siena:object>
|
||||
<siena:object name="Vision_categories_Object">
|
||||
<siena:object name="CloudVision_categories_Object">
|
||||
<siena:property name="name" type="string" />
|
||||
<siena:property name="score" type="number" />
|
||||
</siena:object>
|
||||
<siena:array name="Vision_categories_Array" typeRef="Vision_categories_Object" />
|
||||
<siena:object name="Vision_adult_Object">
|
||||
<siena:array name="CloudVision_categories_Array" typeRef="CloudVision_categories_Object" />
|
||||
<siena:object name="CloudVision_adult_Object">
|
||||
<siena:property name="isAdultContent" type="boolean" />
|
||||
<siena:property name="isRacyContent" type="boolean" />
|
||||
<siena:property name="adultScore" type="number" />
|
||||
<siena:property name="racyScore" type="number" />
|
||||
</siena:object>
|
||||
<siena:object name="Vision_metadata_Object">
|
||||
<siena:object name="CloudVision_metadata_Object">
|
||||
<siena:property name="width" type="number" />
|
||||
<siena:property name="height" type="number" />
|
||||
<siena:property name="format" type="string" />
|
||||
</siena:object>
|
||||
<siena:object name="Vision_faces_Object">
|
||||
<siena:object name="CloudVision_faces_Object">
|
||||
<siena:property name="age" type="number" />
|
||||
<siena:property name="gender" type="string" />
|
||||
<siena:property name="faceRectangle" typeRef="Vision_faceRectangle_Object" />
|
||||
<siena:property name="faceRectangle" typeRef="CloudVision_faceRectangle_Object" />
|
||||
</siena:object>
|
||||
<siena:object name="Vision_faceRectangle_Object">
|
||||
<siena:object name="CloudVision_faceRectangle_Object">
|
||||
<siena:property name="left" type="number" />
|
||||
<siena:property name="top" type="number" />
|
||||
<siena:property name="width" type="number" />
|
||||
<siena:property name="height" type="number" />
|
||||
</siena:object>
|
||||
<siena:array name="Vision_faces_Array" typeRef="Vision_faces_Object" />
|
||||
<siena:object name="Vision_color_Object">
|
||||
<siena:array name="CloudVision_faces_Array" typeRef="CloudVision_faces_Object" />
|
||||
<siena:object name="CloudVision_color_Object">
|
||||
<siena:property name="dominantColorForeground" type="string" />
|
||||
<siena:property name="dominantColorBackground" type="string" />
|
||||
<siena:property name="dominantColors" typeRef="StringArray" />
|
||||
|
@ -48,15 +48,15 @@
|
|||
<siena:property name="isBWImg" type="boolean" />
|
||||
</siena:object>
|
||||
<siena:array name="StringArray" type="string" />
|
||||
<siena:object name="Vision_imageType_Object">
|
||||
<siena:object name="CloudVision_imageType_Object">
|
||||
<siena:property name="clipArtType" type="number" />
|
||||
<siena:property name="lineDrawingType" type="number" />
|
||||
</siena:object>
|
||||
</siena:jsonTypes>
|
||||
</grammars>
|
||||
<resources base="http://localhost:27323">
|
||||
<resource path="api/vision">
|
||||
<method name="POST" id="PostVision">
|
||||
<resource path="api/cloudvision">
|
||||
<method name="POST" id="PostCloudVision">
|
||||
<request>
|
||||
<representation mediaType="multipart/form-data">
|
||||
<param name="Image" style="Query" type="xs:base64Binary" siena:dtype="image" required="true" />
|
||||
|
@ -67,13 +67,13 @@
|
|||
</request>
|
||||
<response siena:resultForm="single">
|
||||
<representation mediaType="application/json">
|
||||
<param name="Vision_Name" type="sienatool:Vision_Root" style="Plain" path="" />
|
||||
<param name="CloudVision_Name" type="sienatool:CloudVision_Root" style="Plain" path="" />
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
</resource>
|
||||
<resource path="api/vision">
|
||||
<method name="Get" id="GetVision" siena:requiresAuthentication="false">
|
||||
<resource path="api/cloudvision">
|
||||
<method name="Get" id="GetCloudVision" siena:requiresAuthentication="false">
|
||||
<request>
|
||||
<param name="generateimage" style="Query" required="false" siena:sampleDefault="1" />
|
||||
<param name="pencolor" style="Query" required="false" siena:sampleDefault="320320" />
|
||||
|
@ -81,7 +81,7 @@
|
|||
</request>
|
||||
<response siena:resultForm="single">
|
||||
<representation mediaType="application/json">
|
||||
<param name="Vision_Name" type="sienatool:Vision_Root" style="Plain" path="" />
|
||||
<param name="CloudVision_Name" type="sienatool:CloudVision_Root" style="Plain" path="" />
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
|
|
Загрузка…
Ссылка в новой задаче