Swagger file has validation errors
Open
Nobody has claimed this yet.
API
bug
good first issue
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open openapi.yaml and inspect the reported lines around the listed paths, definitions, and securityDefinitions entries. Run the file through https://editor.swagger.io/ first, then verify that the reported validation errors are resolved and that API client tools can parse it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100