From 56d7b44a368e42518189379f77fa24f5b4768b0a Mon Sep 17 00:00:00 2001 From: Panagiotis Vretanos Date: Thu, 5 Dec 2024 10:50:56 -0500 Subject: [PATCH 1/4] Changes for closer alignment with OpenEO. --- .../schemas/processes-core/statusCode.yaml | 7 +- .../schemas/processes-core/statusInfo.yaml | 89 ++++++++++--------- 2 files changed, 53 insertions(+), 43 deletions(-) diff --git a/openapi/schemas/processes-core/statusCode.yaml b/openapi/schemas/processes-core/statusCode.yaml index 8c6a6850..706879c1 100644 --- a/openapi/schemas/processes-core/statusCode.yaml +++ b/openapi/schemas/processes-core/statusCode.yaml @@ -1,8 +1,13 @@ type: string nullable: false enum: - - accepted + - created + - queued - running + - cancelled + - finished + - error + - accepted - succeeded - failed - dismissed diff --git a/openapi/schemas/processes-core/statusInfo.yaml b/openapi/schemas/processes-core/statusInfo.yaml index 85e4eb3e..6d5b3a64 100644 --- a/openapi/schemas/processes-core/statusInfo.yaml +++ b/openapi/schemas/processes-core/statusInfo.yaml @@ -1,42 +1,47 @@ -type: object -required: - - id - - status - - type -properties: - id: - type: string - processID: - type: string - type: - type: string - example: - - process - - wps - - openeo - status: - $ref: "statusCode.yaml" - message: - type: string - exception: - $ref: "../common-core/exception.yaml" - created: - type: string - format: date-time - started: - type: string - format: date-time - finished: - type: string - format: date-time - updated: - type: string - format: date-time - progress: - type: integer - minimum: 0 - maximum: 100 - links: - type: array - items: - $ref: "../common-core/link.yaml" +allOf: + - $ref: descriptionType.yaml + - type: object + required: + - id + - status + - created + - process + - type + properties: + id: + type: string + process: + $ref: process.yaml + type: + type: string + example: + - process + - wps + - openeo + status: + oneOf: + $ref: "statusCode.yaml" + message: + type: string + exception: + $ref: "../common-core/exception.yaml" + created: + type: string + format: date-time + started: + type: string + format: date-time + finished: + type: string + format: date-time + updated: + type: string + format: date-time + progress: + type: integer + minimum: 0 + maximum: 100 + links: + type: array + items: + $ref: "../common-core/link.yaml" From b1f9a1997155f96004c105527208159d62a17898 Mon Sep 17 00:00:00 2001 From: Panagiotis Vretanos Date: Thu, 5 Dec 2024 12:43:22 -0500 Subject: [PATCH 2/4] Changes as per ad-hoc OGC/OpenEO discussion on 05DEC2024. --- .../schemas/processes-core/statusCode.yaml | 9 +-- .../schemas/processes-core/statusInfo.yaml | 62 ++++++++++++++++--- 2 files changed, 57 insertions(+), 14 deletions(-) diff --git a/openapi/schemas/processes-core/statusCode.yaml b/openapi/schemas/processes-core/statusCode.yaml index 706879c1..f30262c9 100644 --- a/openapi/schemas/processes-core/statusCode.yaml +++ b/openapi/schemas/processes-core/statusCode.yaml @@ -1,13 +1,8 @@ type: string nullable: false enum: - - created - - queued - - running - - cancelled - - finished - - error - accepted - - succeeded + - running + - successful - failed - dismissed diff --git a/openapi/schemas/processes-core/statusInfo.yaml b/openapi/schemas/processes-core/statusInfo.yaml index 6d5b3a64..4f4f2328 100644 --- a/openapi/schemas/processes-core/statusInfo.yaml +++ b/openapi/schemas/processes-core/statusInfo.yaml @@ -3,29 +3,77 @@ allOf: - type: object required: - id - - status - - created - - process - type + - status properties: id: type: string - process: - $ref: process.yaml type: type: string - example: + description: + An indication of the API that created this job. This can be an + OGC API such as processes, coverages, etc. OR an openeo API. + This values needs to come from a controlled vocabulary the the + current set of values is "process" (indicating that this job was + created by an OAProc process), "wps" (indicating that this job + was created by a WPS process) or openeo (indicating that this + job was created by an OpenEO process). + examples: - process - wps - openeo + process: + description: + The value of this parameter is a description of the entity that + created this job. The value of this property depends on the value + of the "type" property. + + If the value of the "type" property is "process" or "wps" then + this property SHALL be present and its value SHALL be a description + of the process that created this job encoded in-line or referenced + via a link. + + If the value of the "type" property is "openeo" then this property + SHALL be present in the status response and its value SHALL be the + process graph as per the OpenEO specification. + + If the value of the "type" property is not "process", "wps" or + "openeo" then the value of the property SHOULD be a link pointing + to the entity that created this job (e.g. an asychronous coverage + request URL). + oneOf: + - type: object + - $ref: "../common-core/link.yaml" status: + description: + The status of the job. The value space depends on the value of + the "type" property. + + If the value of the "type" property is not "openeo" then the value + space of this property SHALL be defined in "statusCode.yaml". + + If the value of the "type" property is "openop" then the value + space of this property SHALL be "created", "queued", "running", + "canceled", "finished" or "error". oneOf: - $ref: "statusCode.yaml" + - $ref: "statusCode.yaml" + - type: string + enum: + - created + - queued + - running + - canceled + - finished + - error message: type: string exception: $ref: "../common-core/exception.yaml" created: + description: + The date/time that this job was created. + If the value of the "type" property is "openeo" then this property + SHALL be present in the status response. type: string format: date-time started: From d2d5f3d35f356817cee9e974ad10284d18fe1ed2 Mon Sep 17 00:00:00 2001 From: Panagiotis Vretanos Date: Thu, 5 Dec 2024 12:47:40 -0500 Subject: [PATCH 3/4] Fix typo. --- openapi/schemas/processes-core/statusInfo.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/openapi/schemas/processes-core/statusInfo.yaml b/openapi/schemas/processes-core/statusInfo.yaml index 4f4f2328..1f83cab9 100644 --- a/openapi/schemas/processes-core/statusInfo.yaml +++ b/openapi/schemas/processes-core/statusInfo.yaml @@ -11,13 +11,17 @@ allOf: type: type: string description: - An indication of the API that created this job. This can be an - OGC API such as processes, coverages, etc. OR an openeo API. - This values needs to come from a controlled vocabulary the the - current set of values is "process" (indicating that this job was - created by an OAProc process), "wps" (indicating that this job - was created by a WPS process) or openeo (indicating that this - job was created by an OpenEO process). + An indication of the API that created this job. + + This value needs to come from a controlled vocabulary. The + current set of values is + + * "process" (indicating that this job was created by an + OAProc process), + * "wps" (indicating that this job was created by a + WPS process), + * "openeo" (indicating that this job was created by an + OpenEO process). examples: - process - wps From 107726f5305b6c1b15a69c92faa228734dda7a55 Mon Sep 17 00:00:00 2001 From: Panagiotis Vretanos Date: Thu, 5 Dec 2024 13:21:58 -0500 Subject: [PATCH 4/4] Typo for multi-line descriptions. --- openapi/schemas/processes-core/statusInfo.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openapi/schemas/processes-core/statusInfo.yaml b/openapi/schemas/processes-core/statusInfo.yaml index 1f83cab9..6990dfd5 100644 --- a/openapi/schemas/processes-core/statusInfo.yaml +++ b/openapi/schemas/processes-core/statusInfo.yaml @@ -10,7 +10,7 @@ allOf: type: string type: type: string - description: + description: |- An indication of the API that created this job. This value needs to come from a controlled vocabulary. The @@ -27,7 +27,7 @@ allOf: - wps - openeo process: - description: + description: |- The value of this parameter is a description of the entity that created this job. The value of this property depends on the value of the "type" property. @@ -49,7 +49,7 @@ allOf: - type: object - $ref: "../common-core/link.yaml" status: - description: + description: |- The status of the job. The value space depends on the value of the "type" property. @@ -74,7 +74,7 @@ allOf: exception: $ref: "../common-core/exception.yaml" created: - description: + description: |- The date/time that this job was created. If the value of the "type" property is "openeo" then this property SHALL be present in the status response.