Fixes for #564 (full alignment of outputs / inputs schemas with maxOccurs)#566
Conversation
- Fixed references to non-existing files (e.g., files were renamed to remove "input", rWorkflowNotFound.yaml was never added) - Updated processes-workflows to reflect capabilities now included in Part 1 - Core (Version 2) - pExecution: Part 1 now supports collection output - Adding workflow definitions in schemas - The default example has workflows enabled, and this fixes Swagger Editor errors - NOTE: Additional fixes are needed for `swagger-cli validate` and SwaggerUI to work properly
- This fixes "properties members must be schemas" errors in Swagger Editor - Including CWL definition in schemas (fixes swagger-cli bundle issues in Swagger Editor)
- Referencing online JSON Schema is likely not compatible with OpenAPI 3.0 and causing 'swagger-cli validate' to fail. - Including schema.yaml from https://schemas.opengis.net/ogcapi/dggs/1.0/core/schemas/dggs-json/schema.yaml although we could also go back to the version that was removed in aa202c0 - The $comment is causing Swagger validation to fail - Changing top-level CQL2-JSON to be an arbitrary object (couldn't a CQL2 expression be a function returning bool?) -- also args should have been an array - The examples was causing validation to fail - contentEncoding was causing validation to fail - Additional fixes are needed to avoid errors in Swagger Editor / UI
- The use of $defs in CQL2 schema was causing these Swagger Editor errors:
'$ref' value must be an RFC3986-compliant URI reference
(now using cql2defs instead of $defs)
- With this, Swagger Editor now only reports warnings, but Swagger UI still shows 'invalid' with these errors, related to:
- CWL and CQL2 using $schema, $author, $id, $defs, $dynamicAnchors and cql2defs
- DRU pDeploy.yaml and pProcessListDeploy.yaml wrongly directly including the processSummary.yaml schema where a response is expected
(I'll file a separate issue about this -- it should use an response to be added to responses/processes-dru/ if one does not already exist)
{
"messages": [
"attribute components.schemas.CWL.$schema is unexpected",
"attribute components.schemas.CWL.$author is unexpected",
"attribute components.schemas.CWL.$id is unexpected",
"attribute components.schemas.CWL.$defs is unexpected",
"attribute components.schemas.CQL2.$schema is unexpected",
"attribute components.schemas.CQL2.$dynamicAnchor is unexpected",
"attribute components.schemas.CQL2.cql2Defs is unexpected",
"paths.'/processes'(post).responses.201.$ref target #/components/schemas/processSummary is not of expected type Response"
],
"schemaValidationMessages": [
{
"level": "error",
"domain": "validation",
"keyword": "oneOf",
"message": "instance failed to match exactly one schema (matched 0 out of 2)",
"schema": {
"loadingURI": "#",
"pointer": "/definitions/Components/properties/schemas/patternProperties/^[a-zA-Z0-9\\.\\-_]+$"
},
"instance": {
"pointer": "/components/schemas/CQL2"
}
},
{
"level": "error",
"domain": "validation",
"keyword": "oneOf",
"message": "instance failed to match exactly one schema (matched 0 out of 2)",
"schema": {
"loadingURI": "#",
"pointer": "/definitions/Components/properties/schemas/patternProperties/^[a-zA-Z0-9\\.\\-_]+$"
},
"instance": {
"pointer": "/components/schemas/CWL"
}
}
]
}
|
As a native speaker of English I can tell you that the name "occurrencesHolder.yaml" is a meaningless name. Please rename the file to "inputOrResultValue.yaml". |
|
@pvretano We can discuss what the proper name is, but this name was intended to carry the meaning of "something that holds occurrences" (of an input or result output value) :) Just like a cup holder holds a cup ;) @fmigneault was strongly objecting to the use of I still think using |
|
@jerstlouis change the name. It is meaningless and the term occurrence is not used once in the standard. If it can be one or more values then use the plural "values". |
What to?
Independently of what this file is called, in my opinion it would be very useful in the standard to talk about one or more occurences of values (as per minOccurs / maxOcccurs) in the context of the inputs and result outputs to clarify this lingering confusion between the two, explaining it a bit like I did in this comment (EDIT: Sorry I had linked to the wrong comment). This is certainly confusing readers/implementers, but also ourselves in the SWG (as per the JSON Schema clash issue identified by #564). I suggest to use this as potential inspiration: There is the input/output which is:
Where
There is no confusion about an object defining a |
|
@jerstlouis inputOrResultsValues.yaml. |
|
@pvretano Now there is an issue with This file is about one or more (or 0) values for an individual input or result. So I'll rename it to |
|
@jerstlouis fine... |
- Synced with latest Common - Part 2
- The draft only has `[ collection ]` in https://docs.ogc.org/DRAFTS/18-062r3.html#req_collection-output_response-definition[Requirement 62] - If necessary, the results.yaml approach can return multiple output collections, or multiple collections per output
|
So is it a good time to say that, including Part 3: Workflows,
(my reasoning for making it abstract, but I didn't want to bring up too many extra concepts simultaneously until the first batch of renames were addressed) |
|
A nested process or a parameterized input ( The only thing is that inputParameterized and inputOrResultValues-workflows are only used for inputs, not for results, so we could potentially rename that one to simply |
|
Good point. Fair enough. It highlights even more why they must be the same "value container" structure in this case! |
|
Guys, are you serious now? We don't need long sentence like-file names! Even "inputOrResultValues.yaml" is too long but it is a sight better than "occuranceHolder.yaml" ... What is this? Dungeon & Dragons!? Just call the file "values.yaml" and let the context dictate whether it is an input value, a result value, a nested value in a workflow or whatever. I want these PR's either merged or discarded on Monday so that I can complete my PRs so that we can get on with the RFC. |
I agree with this. A simple |
|
@fmigneault @pvretano If you both want me to rename inputOrResultValues.yam to As long as we all remember (from this epic Dungeons & Dragons adventure ;)) that |
|
@jerstlouis make the change. |
|
@fmigneault @pvretano Done. Thanks! |
…ecution request - Fixes #564 - This avoids the need to use qualified array elements at a level which clashes with the process description schemas for individual input/output occurrences - Output description can now specify minOccurs / maxOccurs - For outputs where maxOccurs > 1, a single output still needs to be enclosed within [ ] (exactly like inputs) - input.yaml is renamed to values.yaml and used directly by both execution requests input (execute.yaml), and results.yaml outputs - output.yaml is renamed to outputSelection.yaml to clarify that the execution request selects outputs to return and their format and this schema does not define an actual output returned by a process - inputValue.yaml is renamed to value.yaml because it's also for outputs - valueNoObject.yaml is reverted to exactly what it was in 1.0, fixing the clash with the JSON Schema - There are two versions of several of these files depending on whether Part 3: Workflows is used or not (Part 3 allows for additional "$input" placeholder (inputParameterized.yaml) for the purpose of defining a workflow) - This is currently implemented on top of PR #561 fixing validation issues with the OpenAPI definition
pvretano
left a comment
There was a problem hiding this comment.
As a native English speaker I can tell you that the name "occurencesHolder.yaml" is completely meaningless. The term "occurrence" is not used in the text of the standard. Please rename the file to "inputOrResultValue.yaml" (or Values if plural makes more sense).
This implements the proposed fixes for #564
(please focus on the last commit c426de7 , as this PR is otherwise based on #561 which fixes the validation of the OpenAPI definition)