bitwarden / server

Bitwarden infrastructure/backend (API, database, Docker, etc).
https://bitwarden.com
Other
14.71k stars 1.22k forks source link

vault-management-api.json validation error #4147

Open cdman opened 1 month ago

cdman commented 1 month ago

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

sammbw commented 1 month ago

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!