st2 icon indicating copy to clipboard operation
st2 copied to clipboard

openapi.yaml not standing in specifications.

Open DavidMeu opened this issue 4 years ago • 2 comments

The openapi.yaml not standing in https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v2.0/schema.json specifications.

[{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON is valid against no schemas from 'oneOf'. Path 'paths['/{connectionId}/api/v1/executions/{id}/result'].get.responses.200', line 806, position 18.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): JSON does not match any schemas from 'anyOf'. Path 'definitions.AliasExecution.properties.actionalias.properties.formats.items', line 1123, position 24.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): Invalid type. Expected Object but got String. Path 'definitions.AliasExecution.properties.execution.properties.$ref', line 1199, position 45.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): Invalid type. Expected Array but got Boolean. Path 'definitions.PacksInstall.properties.skip_dependencies.required', line 1620, position 27.\"},{\"code\":\"ValidationError\",\"target\":\"representation\",\"message\":\"Parsing error(s): The input OpenAPI file is not valid for the OpenAPI specificate https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md (schema https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json).\"}]}}","Target":null,"Details":[],"Innererror":null}

Also recieving alot of errors uploading it to: https://editor.swagger.io/

DavidMeu avatar Nov 24 '21 14:11 DavidMeu

Thanks for the report. Sounds like a bug indeed.

If you see any low-hanging fruits to fix the validation here and there, - contributions would be very welcome!

arm4b avatar Nov 24 '21 19:11 arm4b

@armab I also saw this relevant issue: #4488

I'm not sure from where to start. For example I got:

Semantic error at paths./api/v1/executions/{id}/re_run.post.parameters.1.schema.properties.tasks
Schemas with 'type: array', require a sibling 'items: ' field

For:

              tasks:
                type: array
                default: []

But I'm not sure what type is required for items (In other words what the type the tasks array should contain):

          items:
            type: string

Also not appearing in docs: https://api.stackstorm.com/api/v1/executions/#/action_execution_rerun_controller.post

DavidMeu avatar Nov 25 '21 07:11 DavidMeu