vault-management-api.json validation error
Steps To Reproduce
- Download the
vault-management-api.jsonfrom https://bitwarden.com/help/vault-management-api/ (scroll down all the way to the bottom and click on "Download Swagger JSON file") - Try to validate it using https://www.openapi4j.org/ (one of the libraries recommended by the official OpenAPIs site, which this file purports to follow: https://tools.openapis.org/categories/schema-validators.html)
Expected Result
The file to pass validation.
Actual Result
Validation error(s) :
paths./object/item.post.requestBody.content.application/json.schema.properties.type.type: String value 'int' does not match required pattern 'boolean|object|array|number|integer|string'. (code: 106)
From: paths./object/item.post.requestBody.content.application/json.schema.properties.type.type
components.schemas.item.template.properties.type.type: String value 'int' does not match required pattern 'boolean|object|array|number|integer|string'. (code: 106)
From: components.schemas.item.template.properties.type.type
Screenshots or Videos
No response
Additional Context
The error can be fixed by replacing "type":"int" with "type":"integer" in the only place where it occurs.
Build Version
latest
Environment
Cloud (bitwarden.com)
Environment Details
No response
Issue Tracking Info
- [X] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
Hi there,
Thank you for your report!
I was able to reproduce this issue, and I have flagged this to our engineering team.
If you wish to add any further information/screenshots/recordings etc., please feel free to do so at any time - our engineering team will be happy to review these.
Thanks once again!
FYI, there are some more issues with the json file. Take a look at the .patch files here to see what needs to be changed for the .json file to be valid: https://gitlab.com/grey-panther/py-bw-vault-api-unofficial/-/tree/main/openapi-definition?ref_type=heads
We would love to try to solve the additional issues from: https://gitlab.com/grey-panther/py-bw-vault-api-unofficial/-/tree/main/openapi-definition?ref_type=heads (the integer problem seemed to have been solved), but I cannot find where to alter the json anywhere in this github repo. Is there some place @sammbw can point my group and I to? A different repo or what file exactly controls the swagger configs?