StackStorm/st2

Swagger file has validation errors

Open

#4,488 opened on Jan 3, 2019

View on GitHub
 (6 comments) (0 reactions) (0 assignees)Python (5,794 stars) (740 forks)batch import
APIbuggood first issue

Description

SUMMARY

Swagger file has parse errors

ISSUE TYPE
  • Bug Report
STEPS TO REPRODUCE

Running the openapi.yaml file through Swagger validation (online, use https://editor.swagger.io/) fails with the following errors:

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
Jump to line 1220
Semantic error at paths./api/v1/executions/{id}/re_run.post.parameters.1.schema.properties.reset
Schemas with 'type: array', require a sibling 'items: ' field
Jump to line 1223
Semantic error at paths./api/v1/packs/index/search.post.responses.200.schema.type
Schema "type" key must be a string
Jump to line 1845
Semantic error at paths./api/v1/policies.get.responses.200.schema.items
`items` must be an object
Jump to line 2296
Semantic error at paths./api/v1/rules/{rule_ref_or_id}
Equivalent paths are not allowed.
Jump to line 2717
Semantic error at paths./api/v1/webhooks/{url}
Equivalent paths are not allowed.
Jump to line 4206
Schema error at definitions['AliasExecution'].properties['actionalias'].properties['formats'].items
should NOT have additional properties
additionalProperty: oneOf
Jump to line 4638
Schema error at definitions['AliasExecution'].properties['actionalias'].properties['formats'].items
should be array
Jump to line 4638
Schema error at definitions['AliasExecution'].properties['actionalias'].properties['formats'].items
should match some schema in anyOf
Jump to line 4638
Schema error at definitions['AliasExecution'].properties['execution'].properties['$ref']
should be object
Jump to line 4687
Semantic error at definitions.PackIndex.properties.indexes.properties.status
Schemas with 'type: array', require a sibling 'items: ' field
Jump to line 5042
Semantic error at definitions.WebhookBody.type
Schema "type" key must be a string
Jump to line 5167
Semantic error at definitions.TokenRequest.properties.ttl.type
Schema "type" key must be a string
Jump to line 5232
Semantic error at definitions.TokenValidationRequest.properties.token.type
Schema "type" key must be a string
Jump to line 5255
Schema error at securityDefinitions['auth-token-cookie']
should NOT have additional properties
additionalProperty: name, in
Jump to line 5348
Schema error at securityDefinitions['auth-token-cookie'].type
should be equal to one of the allowed values
allowedValues: basic, oauth2
Jump to line 5350
Schema error at securityDefinitions['auth-token-cookie'].in
should be equal to one of the allowed values
allowedValues: header, query
Jump to line 5352
EXPECTED RESULTS

API Tools such as autorest or swagger-codegen would create a client API

ACTUAL RESULTS

All the tools that I've tried, fail with errors on parsing the swagger file.

Contributor guide