square / square/connect-api-specification
api.json doesn't pass swagger spec validation
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 76
- Forks
- 36
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
I used https://github.com/square/connect-api-specification/blob/1619654739714a5b8cfe6c5b059aad67a411b482/api.json and pasted it into https://editor.swagger.io/
The following errors showed up. Note all but 1 are from the V1 endpoints:
Semantic error at paths./v1/me/locations.get.operationId
Operations must have unique operationIds.
Jump to line 1292
Semantic error at paths./v1/{location_id}/refunds.get.operationId
Operations must have unique operationIds.
Jump to line 2114
Semantic error at paths./v1/{location_id}/refunds.post.operationId
Operations must have unique operationIds.
Jump to line 2175
Schema error at definitions['CatalogObject']
should NOT have additional properties
additionalProperty: example_type
Jump to line 5983
Schema error at definitions['v1Variation'].properties['user_data'].required
should be array
Jump to line 11662
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
Start with api.json and reproduce the report in the Swagger Editor or another OpenAPI validator. Inspect the operationId entries at the reported paths, then the CatalogObject and v1Variation definitions around the cited lines. Done means api.json passes validation without the listed errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100