From 5240e3d27037a8f96606b48bf622115c78447670 Mon Sep 17 00:00:00 2001 From: Alino Date: Fri, 8 Feb 2019 22:03:11 +0000 Subject: [PATCH 1/4] Generated code by SwaggerHub --- assets/swaggerhub/.swagger-codegen-ignore | 23 ++ assets/swaggerhub/.swagger-codegen/VERSION | 2 +- assets/swaggerhub/swagger.json | 244 +++++---------------- 3 files changed, 76 insertions(+), 193 deletions(-) create mode 100644 assets/swaggerhub/.swagger-codegen-ignore diff --git a/assets/swaggerhub/.swagger-codegen-ignore b/assets/swaggerhub/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/assets/swaggerhub/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/assets/swaggerhub/.swagger-codegen/VERSION b/assets/swaggerhub/.swagger-codegen/VERSION index d941c12..9183195 100644 --- a/assets/swaggerhub/.swagger-codegen/VERSION +++ b/assets/swaggerhub/.swagger-codegen/VERSION @@ -1 +1 @@ -1.0.16 \ No newline at end of file +2.4.0 \ No newline at end of file diff --git a/assets/swaggerhub/swagger.json b/assets/swaggerhub/swagger.json index 109ea92..3200b8f 100644 --- a/assets/swaggerhub/swagger.json +++ b/assets/swaggerhub/swagger.json @@ -15,7 +15,7 @@ "tags" : [ { "name" : "Job" }, { - "name" : "Asset" + "name" : "Input" }, { "name" : "Task" }, { @@ -181,11 +181,11 @@ } } }, - "/jobs/{jobId}/assets/uploadfile" : { + "/jobs/{jobId}/inputs/uploadfile" : { "post" : { - "tags" : [ "Asset" ], - "summary" : "Upload an asset file and create an asset", - "description" : "Upload an asset file and create an asset", + "tags" : [ "Input" ], + "summary" : "Upload an input file and create an input", + "description" : "Upload an input file and create an input", "consumes" : [ "multipart/form-data" ], "produces" : [ "application/json" ], "parameters" : [ { @@ -204,9 +204,9 @@ "required" : false, "type" : "string" }, { - "name" : "asset", + "name" : "input", "in" : "formData", - "description" : "The Asset file", + "description" : "The Input file", "required" : true, "type" : "file" } ], @@ -214,7 +214,7 @@ "200" : { "description" : "The requested resource", "schema" : { - "$ref" : "#/definitions/asset" + "$ref" : "#/definitions/input" } }, "404" : { @@ -226,11 +226,11 @@ } } }, - "/jobs/{jobId}/assets/{assetId}/downloadfile" : { + "/jobs/{jobId}/inputs/{inputId}/downloadfile" : { "get" : { - "tags" : [ "Asset" ], - "summary" : "Download an asset file", - "description" : "Download an asset file", + "tags" : [ "Input" ], + "summary" : "Download an input file", + "description" : "Download an input file", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { @@ -239,14 +239,14 @@ "required" : true, "type" : "string" }, { - "name" : "assetId", + "name" : "inputId", "in" : "path", "required" : true, "type" : "string" } ], "responses" : { "200" : { - "description" : "The asset file" + "description" : "The input file" }, "404" : { "description" : "Resource not found" @@ -257,11 +257,11 @@ } } }, - "/jobs/{jobId}/assets" : { + "/jobs/{jobId}/inputs" : { "get" : { - "tags" : [ "Asset" ], - "summary" : "List all Assets within a Job", - "description" : "List all Assets which belongs to a specific job", + "tags" : [ "Input" ], + "summary" : "List all Inputs within a Job", + "description" : "List all Inputs which belongs to a specific job", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { @@ -274,7 +274,7 @@ "200" : { "description" : "The requested resource", "schema" : { - "$ref" : "#/definitions/asset" + "$ref" : "#/definitions/input" } }, "404" : { @@ -286,11 +286,11 @@ } } }, - "/jobs/{jobId}/assets/{assetId}" : { + "/jobs/{jobId}/inputs/{inputId}" : { "get" : { - "tags" : [ "Asset" ], - "summary" : "Get an Asset", - "description" : "Get an Asset which belongs to a specific job", + "tags" : [ "Input" ], + "summary" : "Get an Input", + "description" : "Get an Input which belongs to a specific job", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { @@ -299,7 +299,7 @@ "required" : true, "type" : "string" }, { - "name" : "assetId", + "name" : "inputId", "in" : "path", "required" : true, "type" : "string" @@ -308,7 +308,7 @@ "200" : { "description" : "The requested resource", "schema" : { - "$ref" : "#/definitions/asset" + "$ref" : "#/definitions/input" } }, "404" : { @@ -320,13 +320,13 @@ } }, "put" : { - "tags" : [ "Asset" ], - "summary" : "Update an Asset", - "description" : "Update an Asset which belongs to a specific job", + "tags" : [ "Input" ], + "summary" : "Update an Input", + "description" : "Update an Input which belongs to a specific job", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { - "name" : "assetId", + "name" : "inputId", "in" : "path", "required" : true, "type" : "string" @@ -337,7 +337,7 @@ "type" : "string" }, { "in" : "body", - "name" : "asset", + "name" : "input", "required" : true, "schema" : { "example" : { @@ -351,7 +351,7 @@ "200" : { "description" : "The requested resource", "schema" : { - "$ref" : "#/definitions/asset" + "$ref" : "#/definitions/input" } }, "404" : { @@ -363,9 +363,9 @@ } }, "delete" : { - "tags" : [ "Asset" ], - "summary" : "Delete an Asset", - "description" : "Delete an Asset which belongs to a specific job", + "tags" : [ "Input" ], + "summary" : "Delete an Input", + "description" : "Delete an Input which belongs to a specific job", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { @@ -374,7 +374,7 @@ "required" : true, "type" : "string" }, { - "name" : "assetId", + "name" : "inputId", "in" : "path", "required" : true, "type" : "string" @@ -383,7 +383,7 @@ "200" : { "description" : "The requested resource", "schema" : { - "$ref" : "#/definitions/asset" + "$ref" : "#/definitions/input" } }, "404" : { @@ -421,7 +421,7 @@ "post" : { "tags" : [ "Task" ], "summary" : "Create a Task", - "description" : "Creates a Task which will belong to a specific Job or Asset.", + "description" : "Creates a Task which will belong to a specific Job or Input.", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { @@ -431,7 +431,7 @@ "schema" : { "example" : { "jobId" : 1, - "assetId" : 1, + "inputId" : 1, "type" : "translation", "targetLanguage" : "cz", "assignedTo" : "symfonie.com/43920149320" @@ -500,7 +500,7 @@ "schema" : { "example" : { "jobId" : 1, - "assetId" : 1, + "inputId" : 1, "progress" : "paused", "type" : "translation", "targetLanguage" : "cz", @@ -612,11 +612,11 @@ } } }, - "/assets" : { + "/inputs" : { "get" : { - "tags" : [ "Asset" ], - "summary" : "List all Assets", - "description" : "List all Assets", + "tags" : [ "Input" ], + "summary" : "List all Inputs", + "description" : "List all Inputs", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ ], @@ -624,7 +624,7 @@ "200" : { "description" : "The requested resource", "schema" : { - "$ref" : "#/definitions/asset" + "$ref" : "#/definitions/input" } }, "404" : { @@ -831,10 +831,10 @@ "format" : "string", "description" : "external project id, as is defined on the external system" }, - "assets" : { + "inputs" : { "type" : "array", "items" : { - "$ref" : "#/definitions/asset" + "$ref" : "#/definitions/input" } }, "closedAt" : { @@ -850,91 +850,9 @@ "type" : "string", "format" : "date-time" } - }, - "example" : { - "dueAt" : "2000-01-23T04:56:07.000+00:00", - "submitter" : "symfonie.com/43920149320", - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "assets" : [ { - "jobId" : 1, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "fileDescriptor" : "fileDescriptor", - "isReference" : true, - "id" : 6, - "encoding" : "encoding", - "sourceLanguage" : "sourceLanguage", - "tasks" : [ { - "jobId" : 5, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "targetLanguage" : "targetLanguage", - "fileDescriptor" : "fileDescriptor", - "assetId" : 2, - "progress" : "pending", - "id" : 5, - "type" : "translation", - "assignedTo" : "symfonie.com/43920149320", - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" - }, { - "jobId" : 5, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "targetLanguage" : "targetLanguage", - "fileDescriptor" : "fileDescriptor", - "assetId" : 2, - "progress" : "pending", - "id" : 5, - "type" : "translation", - "assignedTo" : "symfonie.com/43920149320", - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" - } ], - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" - }, { - "jobId" : 1, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "fileDescriptor" : "fileDescriptor", - "isReference" : true, - "id" : 6, - "encoding" : "encoding", - "sourceLanguage" : "sourceLanguage", - "tasks" : [ { - "jobId" : 5, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "targetLanguage" : "targetLanguage", - "fileDescriptor" : "fileDescriptor", - "assetId" : 2, - "progress" : "pending", - "id" : 5, - "type" : "translation", - "assignedTo" : "symfonie.com/43920149320", - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" - }, { - "jobId" : 5, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "targetLanguage" : "targetLanguage", - "fileDescriptor" : "fileDescriptor", - "assetId" : 2, - "progress" : "pending", - "id" : 5, - "type" : "translation", - "assignedTo" : "symfonie.com/43920149320", - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" - } ], - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" - } ], - "name" : "name", - "description" : "description", - "externalId" : "externalId", - "id" : 0, - "closedAt" : "2000-01-23T04:56:07.000+00:00", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" } }, - "asset" : { + "input" : { "properties" : { "id" : { "type" : "integer", @@ -953,7 +871,7 @@ }, "isReference" : { "type" : "boolean", - "description" : "if is set to true, then the Asset is not suppossed to be actionable." + "description" : "if is set to true, then the Input is not suppossed to be actionable." }, "sourceLanguage" : { "type" : "string", @@ -982,42 +900,6 @@ "type" : "string", "format" : "date-time" } - }, - "example" : { - "jobId" : 1, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "fileDescriptor" : "fileDescriptor", - "isReference" : true, - "id" : 6, - "encoding" : "encoding", - "sourceLanguage" : "sourceLanguage", - "tasks" : [ { - "jobId" : 5, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "targetLanguage" : "targetLanguage", - "fileDescriptor" : "fileDescriptor", - "assetId" : 2, - "progress" : "pending", - "id" : 5, - "type" : "translation", - "assignedTo" : "symfonie.com/43920149320", - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" - }, { - "jobId" : 5, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "targetLanguage" : "targetLanguage", - "fileDescriptor" : "fileDescriptor", - "assetId" : 2, - "progress" : "pending", - "id" : 5, - "type" : "translation", - "assignedTo" : "symfonie.com/43920149320", - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" - } ], - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" } }, "task" : { @@ -1042,8 +924,8 @@ "type" : "string", "format" : "string", "description" : "pending - the Task has been created, and it's pending to be reviewed and assigned to someone.\n\nin progress - the Task has been assigned to someone and is being worked on.\n\npaused - the Task went from in progress, to paused, because something is blocking the Task, or the assignee has other priorities.\n\ncanceled - someone did cancel this Task.\n\nfinished - the work on this Task is done and deliverableLocation is filled with a path to deliverable.", - "enum" : [ "pending", "in progress", "paused", "canceled", "finished" ], - "default" : "pending" + "default" : "pending", + "enum" : [ "pending", "in progress", "paused", "canceled", "finished" ] }, "assignedTo" : { "type" : "string", @@ -1064,7 +946,7 @@ "jobId" : { "type" : "integer" }, - "assetId" : { + "inputId" : { "type" : "integer" }, "createdAt" : { @@ -1075,19 +957,6 @@ "type" : "string", "format" : "date-time" } - }, - "example" : { - "jobId" : 5, - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "targetLanguage" : "targetLanguage", - "fileDescriptor" : "fileDescriptor", - "assetId" : 2, - "progress" : "pending", - "id" : 5, - "type" : "translation", - "assignedTo" : "symfonie.com/43920149320", - "fileOriginalName" : "fileOriginalName", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" } }, "webhook" : { @@ -1116,7 +985,7 @@ "type" : "string", "format" : "string", "description" : "type of event - if this event occurs, then the \"url\" will be requested by the TAPICC server", - "enum" : [ "taskCreated", "taskUpdated", "taskDeleted", "jobCreated", "jobUpdated", "jobDeleted", "assetCreated", "assetUpdated", "assetDeleted" ] + "enum" : [ "taskCreated", "taskUpdated", "taskDeleted", "jobCreated", "jobUpdated", "jobDeleted", "inputCreated", "inputUpdated", "inputDeleted" ] }, "createdAt" : { "type" : "string", @@ -1126,15 +995,6 @@ "type" : "string", "format" : "date-time" } - }, - "example" : { - "createdAt" : "2000-01-23T04:56:07.000+00:00", - "name" : "name", - "description" : "description", - "id" : 0, - "eventType" : "taskCreated", - "url" : "url", - "updatedAt" : "2000-01-23T04:56:07.000+00:00" } } } From be5530f8b16f4f130a7581ddc9b083214043c789 Mon Sep 17 00:00:00 2001 From: Alino Date: Fri, 8 Feb 2019 22:16:12 +0000 Subject: [PATCH 2/4] Generated code by SwaggerHub --- assets/swaggerhub/swagger.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/swaggerhub/swagger.json b/assets/swaggerhub/swagger.json index 3200b8f..879cb89 100644 --- a/assets/swaggerhub/swagger.json +++ b/assets/swaggerhub/swagger.json @@ -920,12 +920,16 @@ "format" : "string", "description" : "language code of the target" }, - "progress" : { + "status" : { "type" : "string", "format" : "string", - "description" : "pending - the Task has been created, and it's pending to be reviewed and assigned to someone.\n\nin progress - the Task has been assigned to someone and is being worked on.\n\npaused - the Task went from in progress, to paused, because something is blocking the Task, or the assignee has other priorities.\n\ncanceled - someone did cancel this Task.\n\nfinished - the work on this Task is done and deliverableLocation is filled with a path to deliverable.", + "description" : "pending - the Task has been created, and it's pending to be reviewed and assigned to someone.\n\nin progress - the Task has been assigned to someone and is being worked on.\n\npaused - the Task went from in progress, to paused, because something is blocking the Task, or the assignee has other priorities.\n\ncanceled - someone did cancel this Task.\n\ncompleted - the work on this Task is done and deliverableLocation is filled with a path to deliverable.\ncompleted-with-warning - the work on this Task is done. But there is a warning probably in the Task note.\nfailed - Task could not be completed because an error occurred.", "default" : "pending", - "enum" : [ "pending", "in progress", "paused", "canceled", "finished" ] + "enum" : [ "pending", "in progress", "paused", "canceled", "completed", "completed-with-warning", "failed" ] + }, + "note" : { + "type" : "string", + "format" : "string" }, "assignedTo" : { "type" : "string", From 17048737e981975ee704c94ddd4eac191209ded9 Mon Sep 17 00:00:00 2001 From: Alino Date: Fri, 8 Feb 2019 22:42:00 +0000 Subject: [PATCH 3/4] Generated code by SwaggerHub --- assets/swaggerhub/swagger.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/swaggerhub/swagger.json b/assets/swaggerhub/swagger.json index 879cb89..154d59b 100644 --- a/assets/swaggerhub/swagger.json +++ b/assets/swaggerhub/swagger.json @@ -70,7 +70,7 @@ } } ], "responses" : { - "200" : { + "201" : { "description" : "The requested resource", "schema" : { "$ref" : "#/definitions/job" @@ -439,7 +439,7 @@ } } ], "responses" : { - "200" : { + "201" : { "description" : "The requested resource", "schema" : { "$ref" : "#/definitions/task" @@ -571,7 +571,7 @@ "type" : "file" } ], "responses" : { - "200" : { + "201" : { "description" : "The requested resource", "schema" : { "$ref" : "#/definitions/task" @@ -679,7 +679,7 @@ } } ], "responses" : { - "200" : { + "201" : { "description" : "The requested resource", "schema" : { "$ref" : "#/definitions/webhook" From 3ab715f157c617de707ff392214e2732641acc0c Mon Sep 17 00:00:00 2001 From: Alino Date: Fri, 8 Feb 2019 22:47:26 +0000 Subject: [PATCH 4/4] Generated code by SwaggerHub --- assets/swaggerhub/swagger.json | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/assets/swaggerhub/swagger.json b/assets/swaggerhub/swagger.json index 154d59b..39979e0 100644 --- a/assets/swaggerhub/swagger.json +++ b/assets/swaggerhub/swagger.json @@ -166,11 +166,8 @@ "type" : "string" } ], "responses" : { - "200" : { - "description" : "The requested resource", - "schema" : { - "$ref" : "#/definitions/job" - } + "204" : { + "description" : "NoContent" }, "404" : { "description" : "Resource not found" @@ -211,7 +208,7 @@ "type" : "file" } ], "responses" : { - "200" : { + "201" : { "description" : "The requested resource", "schema" : { "$ref" : "#/definitions/input" @@ -380,11 +377,8 @@ "type" : "string" } ], "responses" : { - "200" : { - "description" : "The requested resource", - "schema" : { - "$ref" : "#/definitions/input" - } + "204" : { + "description" : "NoContent" }, "404" : { "description" : "Resource not found" @@ -536,11 +530,8 @@ "type" : "string" } ], "responses" : { - "200" : { - "description" : "The requested resource", - "schema" : { - "$ref" : "#/definitions/task" - } + "204" : { + "description" : "NoContent" }, "404" : { "description" : "Resource not found" @@ -774,11 +765,8 @@ "type" : "string" } ], "responses" : { - "200" : { - "description" : "The requested resource", - "schema" : { - "$ref" : "#/definitions/webhook" - } + "204" : { + "description" : "NoContent" }, "404" : { "description" : "Resource not found"