Skip to content

V2 openapi fixes#561

Merged
jerstlouis merged 15 commits into
masterfrom
v2-openapi-fixes
Mar 31, 2026
Merged

V2 openapi fixes#561
jerstlouis merged 15 commits into
masterfrom
v2-openapi-fixes

Conversation

@jerstlouis
Copy link
Copy Markdown
Member

@jerstlouis jerstlouis commented Mar 19, 2026

This PR contains several fixes in an initial attempt to fix the OpenAPI example definitions ( #401 and #390 ).

Please review the individual commits, with the earlier commits potentially easier to merge.

See also the obvious propreties typo that I pushed directly (77cec18).

At different commits along this Pull Request:

  • swagger-cli bundle works again
  • swagger-cli validate works again
  • Swagger Editor errors are gone
  • Swagger UI shows "valid"

EDIT: Swagger UI now says valid.

(EDIT: It actually did not after properly including the CWL schema, but now it does!)

This also includes a fix for #562.

OAS does not allow using $defs in the final schemas being used in the bundle, so embedding in the repo the CWL and CQL2 schemas allors to tweak that.

Note that that this PR (in the later commits) embeds a local version of the CQL2 schema, CWL schema and a simplified JSON (meta)Schema to get this all to work. If we also embed the GeoJSON schemas (I have this in a separate branch that I did not push), then the bundling is a lot faster and it could be done in a CI/CD without network access.

Also note that we should still review any differences remaining between the files in: schemas/processes-workflows vs. schemas/processes-core.

cc. @pvretano @bpross-52n @fmigneault @gfenoy

Note that I've changed some references to CWLschema at:

https://raw.githubusercontent.com/common-workflow-lab/cwl-ts-auto/main/json_schemas/cwl_schema.yaml

to the w3id.org one which fixes this error in Swagger Editor:

properties members must be schemas

because it does:

    properties:
      $schemas: true
      id: true
      stderr: true
      successCodes: true
      cwlVersion: true
      outputs: true
      label: true
      stdout: true
      requirements: true
      doc: true
      temporaryFailCodes: true
      expression: true

(I don't know if this is supposed to be valid somehow...)

(and now the schema is actually copied to the repo and tweaked to fix the errors)

- 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"
      }
    }
  ]
}
@fmigneault
Copy link
Copy Markdown
Member

@jerstlouis
Why update the CWL schemas?
The official ones published are already defined:

application/cwl:
schema:
$ref: "https://w3id.org/cwl/v1.2/cwl-json-schema.yaml"
application/cwl+json:
schema:
$ref: "https://w3id.org/cwl/v1.2/cwl-json-schema.yaml"
application/cwl+yaml:
schema:
$ref: "https://w3id.org/cwl/v1.2/cwl-json-schema.yaml"

Changing them could make deployments relying on them fail since they are different definitions (technically).

Is this branch aligned with #547
There are massive amounts of pending updates over there, and I trust them more since we validated them during the code sprint.

@jerstlouis
Copy link
Copy Markdown
Member Author

jerstlouis commented Mar 19, 2026

@fmigneault That is the schema I used there (from w3id.org), just trying to make it work with OAS 3.0 which did not work.

Now although SwaggerUI says valid the schema shows blank so I want to see if something is still wrong.

About #547, it doesn't seem to be touching the openapi/ directory which is all I changed.

@jerstlouis jerstlouis force-pushed the v2-openapi-fixes branch 2 times, most recently from 56c40c0 to 140368d Compare March 19, 2026 23:14
@jerstlouis
Copy link
Copy Markdown
Member Author

@fmigneault Do you know if we've officially given up on OpenAPI 3.0? The OpenAPI definition was previously 3.0 and I was trying to make it work with 3.0...

@pvretano
Copy link
Copy Markdown
Contributor

@jerstlouis both 3.0 and 3.1 are supposed to be supported in this version. There are conformance classes for both.

@jerstlouis
Copy link
Copy Markdown
Member Author

@pvretano I was referring specifically to the version of the OpenAPI components that we want to provide.

Of course implementers can describe their API with OAS 3.0 or 3.1 or even another API definition language...

But if we want the components to work with OAS 3.0, then we cannot directly reference JSON Schemas like the CWL and CQL2, hence why I'm trying to embed an OAS 3.0-friendly version of the schemas...

Of course we could also offer a 3.1 version of the building blocks which do directly include the online JSON Schemas, but it would be nice if we still have a working 3.0 version.

@jerstlouis jerstlouis marked this pull request as draft March 19, 2026 23:38
@jerstlouis
Copy link
Copy Markdown
Member Author

jerstlouis commented Mar 20, 2026

@fmigneault Would you have any advice on what to replace the conditionals with the CWL schema ? Some of these could be a oneOf:, but others that only change the default like:

        if:
          properties:
            type:
              const: 'null'
        then:
          properties:
            default:
              type: 'null'

I really don't understand... If something is specified, why have a default conditional on what it is?!
(EDIT: I think I was lost in the meta-levels here... this is redefining some kind of meta schema or something :S)

I guess this really cannot be done reasonably well with OAS 3 and shouldn't need to be done anyways so it should just be

    type:
      $ref: '#/components/schemas/AnyType'
    default:
      $ref: '#/components/schemas/AnyType'

? The purpose of the API definition is documentation rather than validation...

Or is there already an OAS 3-friendly version of this schema or one close to it somewhere that we could use?

@jerstlouis
Copy link
Copy Markdown
Member Author

jerstlouis commented Mar 20, 2026

@fmigneault There are things in this official CWL schema ( https://www.commonwl.org/v1.2/cwl-json-schema.yaml ) that I believe are not even valid in JSON Schema e.g.:

envValue:
  type:
    $ref: '#/$defs/CWLExpression'

Another error:

      required:
        - expressionLib

this is inside properties but should be outside.

@fmigneault
Copy link
Copy Markdown
Member

Must be just an indent error. We can patch it.
This schema is (pseudo)manually created from extracted code running the https://github.com/crim-ca/weaver/blob/master/weaver/wps_restapi/swagger_definitions.py

Is that the only errors? I can open the fix PR.

@fmigneault
Copy link
Copy Markdown
Member

fmigneault commented Mar 20, 2026

Provided that swagger-cli say "we can't keep up with issues" at the start of their readme, I would rely more on redocly fixing the few edge cases of OAS that were not working properly.

For cross-repo, it could simply be a recursive git clone --depth 0 done before the operation, similar to other patches done by openapi/update.sh. It doesn't have to all be done by the openapi tool, but we could avoid the manual copies to ensure latest changes are always evaluated rather than finding out much later.

@jerstlouis
Copy link
Copy Markdown
Member Author

jerstlouis commented Mar 20, 2026

@fmigneault

For cross-repo, it could simply be a recursive git clone --depth 0 done before the operatio

Perhaps if we tag a specific commit / release and sub-directory that could work.

e.g.,

git archive --remote=https://github.com/opengeospatial/ogcapi-common/ 3dfaa0619907be6a6b0d5ce27a3ea4229c1ec4d1:collections/openapi

(archive doesn't seem supported from GitHub, we could do something with sparse-checkout etc. but it's not that simple)

but that would require to make sure everything is perfectly synced to use those external repos.

(and still requires network access after the clone, but we could have a script to fetch all that, and the the bundling command is local)

@fmigneault
Copy link
Copy Markdown
Member

but that would require to make sure everything is perfectly synced to use those external repos.

That is exactly the idea.
If something breaks, we would be made aware of it right away rather than a user raising an issue many months after a version was released with broken standards.

Oh, and regarding the deployment response, I saw on https://github.com/opengeospatial/ogcapi-processes/blob/master/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-body.adoc, so we cannot have it use processDescription since it changes expectations of the requirement (although formally you could still return inputs/outputs if desired since not validated).

@jerstlouis
Copy link
Copy Markdown
Member Author

jerstlouis commented Mar 21, 2026

@fmigneault

If something breaks, we would be made aware of it right away rather than a user raising an issue many months after a version was released with broken standards.

But this works both ways.

If we release OGC API - Processes in a working state, and then the other repository changes (especially if we use the GitHub repo which are dynamic and always reflect the Editor's Draft rather than a specific version), then what used to work stops working (but I guess this clone/copy would only happen while Procsses itself in a draft stage... the released version would not update or directly reference the dependencies)

References to a moving target are more problematic, but we can have either an automatic action or a manual process to regularly update all references to external repo on a regular basis. There are also timing issues, where in a certain stage of development / release freeze cycle you might not want to update anything that is being changed elsewhere.

About

https://github.com/opengeospatial/ogcapi-processes/blob/master/extensions/deploy_replace_undeploy/standard/requirements/deploy-replace-undeploy/deploy/REQ_response-body.adoc

There's a grammar issue right now with that, and yes the processDescription still is valid with that requirement. But we can define a new response for it specifically, especially if the inputs / outputs (descriptions, right?) never make sense to include.

But actually I am questioning that?
Is this the basic DRU response when you deploy a new process?
The inputs and outputs description should be included in the response, especially since some process packages could have the server infer these, so it would make complete sense to the tell the client right away what are the inputs and outputs that result from the package it just deployed?

@fmigneault
Copy link
Copy Markdown
Member

@jerstlouis
FYI, schema fixes from common-workflow-language/cwl-v1.2#306 have been deployed:
https://www.commonwl.org/v1.2/cwl-json-schema.yaml

jerstlouis added a commit that referenced this pull request Mar 27, 2026
…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)
- The
- input.yaml is renamed to occurrencesHolder 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 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
jerstlouis added a commit that referenced this pull request Mar 27, 2026
…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 occurrencesHolder 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
jerstlouis added a commit that referenced this pull request Mar 27, 2026
…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 occurrencesHolder 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
@jerstlouis jerstlouis marked this pull request as ready for review March 27, 2026 07:14
jerstlouis added a commit that referenced this pull request Mar 27, 2026
…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 inputOrResultValues.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
jerstlouis added a commit that referenced this pull request Mar 27, 2026
…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 inputOrResultValues.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
- 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
jerstlouis added a commit that referenced this pull request Mar 27, 2026
…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 inputOrResultValues.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
@fmigneault
Copy link
Copy Markdown
Member

If we release OGC API - Processes in a working state, and then the other repository changes (especially if we use the GitHub repo which are dynamic and always reflect the Editor's Draft rather than a specific version), then what used to work stops working

As long as the changes are happening in master/main between the repos, yes, they should break as early as possible so we notice it and fix in timely fashion. Then, once the referenced repo releases its version that is our desired reference, you "pin" your reference to it in OAP. A release of OAP should never happen while relying on a pending draft elsewhere. At "worst", multiple APIs would be released at the same time, but changes shouldn't happen in between, or something is seriously wrong in how OGC versions standards otherwise...

The problem we face is mostly when we have many drafts working in parallel, and we don't notice they are broken because we just didn't happen to sync them for a while. You actually create a fake sense of "things working together", when they are continually broken until someone points it out.

@fmigneault
Copy link
Copy Markdown
Member

fmigneault commented Mar 28, 2026

Is this the basic DRU response when you deploy a new process?

Yes

The inputs and outputs description should be included in the response[...]

I think the original idea was to keep everything related to "resolve the full process description" by doing an explicit GET /processes/{processId}, rather than certain immutable processes relying on that endpoint while mutable ones using the POST /processes response. In as sense of "single source of truth", always rely on /processes/{processId}.

Indeed, you could tell the client right away all the details to avoid the extra request, but you have no guarantee it will. There could be some extra parsing things happening between those 2 requests that make the result slightly different.

@jerstlouis
Copy link
Copy Markdown
Member Author

@fmigneault I changed this PR to add the rProcessSummary btw. The implementations can still return the inputs or outputs if they like. If we really want to consider the use case of them being optionally included (which I think we should), we should go back to directly referencing the processDescription that includes these (optional) members.

@fmigneault
Copy link
Copy Markdown
Member

To stay in line with what was developed so far and tested during the code sprint, it's indeed better to leave summary.
Implementations are not forbidden to return more if desired.

jerstlouis added a commit that referenced this pull request Mar 30, 2026
…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 inputOrResultValues.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
jerstlouis added a commit that referenced this pull request Mar 30, 2026
…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
Copy link
Copy Markdown
Member

@fmigneault fmigneault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR works as it is, but curious to see if the updated CWL schema can work as it is from the source so that it is only an exact local copy for bundling.

@@ -0,0 +1 @@
$ref: './cwl-json-schema.yaml#/$defs/CWL'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.commonwl.org/v1.2/cwl-json-schema.yaml also includes this, so it should be self-contained and employable as-is.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fmigneault Things like $comment are not valid and will generate errors.

Copy link
Copy Markdown
Member Author

@jerstlouis jerstlouis Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(EDIT: please disregards this comment, I was probably wrong)
Also this is not valid:

        enum:
          - WorkReuse

as this is a string WorkReuse needs to be quoted

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    additionalProperties: {}

Those things that I mentioned were a source of errors are still there.

(I'm looking at https://www.commonwl.org/v1.2/cwl-json-schema.yaml )

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And all the if and then stuff which was the main issue.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that's a shame.

Extra fields seem like a swaggercli problem since unknown fields should just be ignored (that is part of OAS30 as well). Not sure to understand the issue about the enum. That is definitely a parsing error from the implementation. It is valid YAML (it is generated from a yaml.safe_dump call).

Indeed, not much can be done about additionalProperties and if/then.

Thanks for checking. Let's use the workaround schema for now and review once OAS3.1 gets used (hopefully we ditch 3.0 soon to avoid this long-overdue problem).

Copy link
Copy Markdown
Member Author

@jerstlouis jerstlouis Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fmigneault I don't think this is a SwaggerCLI problem, and I don't think this YAML JSON schema itself conforms to OAS 3.0 specifications. Most or all of the errors I mentioned were with the latest Swagger Editor and Swagger UI validation engines.

Possibly the Redoc tool automatically and silently convert to OAS 3.0 compliant definition while it is bundling, but I think that if we provide OAS 3.0 building blocks, the building blocks themselves should already comply to OAS 3. However, I seem to recall warnings and errors with this even while using the Redoc tool.

Extra fields seem like a swaggercli problem since unknown fields should just be ignored (that is part of OAS30 as well)

OAS 3.0 says in Section 4.8 Specification Extensions:

The field name MUST begin with x-, for example, x-internal-id.

So any strict validation reports that as invalid.
Other than those unknown fields ($schema, $author, $id, $comment, summary, exclusiveMinimum), the OAS3.0 issues are mostly the different interpretations of those additionalProperties, the unsupported if/then and the cwltool:CUDARequirement anchor in $defs.

Not sure to understand the issue about the enum.
That is definitely a parsing error from the implementation.

Sorry I might have been confusing this with something else.
I might have made this explicit quotes change here trying to fix another error.

hopefully we ditch 3.0 soon to avoid this long-overdue problem

I hope we don't "ditch 3.0" and keep this OAS 3.0 definition alive and working, even if we do end up adding an extra openapi3.1/ that could directly reference any valid JSON Schema.

Let's use the workaround schema for now

Sounds good, thanks!

@jerstlouis jerstlouis merged commit 71c2e4a into master Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.0 Next development iteration Part 1 (Core) OGC API - Processes - Part 1: Core Part 2 (DRU) Part 3 (Workflows/Chaining)

Development

Successfully merging this pull request may close these issues.

3 participants