Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

vault-management-api.json validation error #4147

Open
1 task done
cdman opened this issue May 31, 2024 · 3 comments
Open
1 task done

vault-management-api.json validation error #4147

cdman opened this issue May 31, 2024 · 3 comments
Labels

Comments

@cdman
Copy link

cdman commented May 31, 2024

Steps To Reproduce

  1. Download the vault-management-api.json from https://bitwarden.com/help/vault-management-api/ (scroll down all the way to the bottom and click on "Download Swagger JSON file")
  2. 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

  • 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.
@cdman cdman added the bug label May 31, 2024
@sammbw
Copy link

sammbw commented May 31, 2024

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!

@cdman
Copy link
Author

cdman commented Jul 18, 2024

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

@BensonB12
Copy link
Contributor

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?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants