Fix OpenAPI 3.0 validation errors in openapi.json #83

Merged
vitalif merged 5 commits from epicstyt/vitastor:openapi-lint into master 2026-09-02 20:10:02 +03:00
Contributor

Description

Spec-only, no behaviour change. Five commits:

  • /image/flatten required names, which the schema never defines — the handler reads cfg["image"]
  • added the mandatory info.title
  • dropped 48 consumes/produces (Swagger 2.0 keywords; the media types are already in content)
  • added description to the 30 responses lacking it (mandatory in the Response object)
  • dropped format/description: "New OSD number" left at schema level on the 200 of /osd/delete and /osd/modify, copied from /osd/alloc

redocly lint: 110 errors → 31. What remains is Redocly policy (security-defined, operation-4xx-response), no-empty-servers, and the duplicate operationIds sent separately.

Contributor Name

Stepan Rabotkin

CLA

### Description Spec-only, no behaviour change. Five commits: - `/image/flatten` required `names`, which the schema never defines — the handler reads `cfg["image"]` - added the mandatory `info.title` - dropped 48 `consumes`/`produces` (Swagger 2.0 keywords; the media types are already in `content`) - added `description` to the 30 responses lacking it (mandatory in the Response object) - dropped `format`/`description: "New OSD number"` left at schema level on the 200 of `/osd/delete` and `/osd/modify`, copied from `/osd/alloc` `redocly lint`: 110 errors → 31. What remains is Redocly policy (`security-defined`, `operation-4xx-response`), `no-empty-servers`, and the duplicate operationIds sent separately. ### Contributor Name Stepan Rabotkin ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
epicstyt added 5 commits 2026-09-01 22:29:37 +03:00
The schema required "names", which it does not define. The handler reads
cfg["image"] (src/cmd/cli_flatten.cpp:141).

Signed-off-by: Stepan Rabotkin <epicstyt@gmail.com>
OpenAPI 3.0 requires info.title. Reuses the text of info.description.

Signed-off-by: Stepan Rabotkin <epicstyt@gmail.com>
Removed 48 occurrences. OpenAPI 3.0 has no such fields and the media
types are already declared in requestBody.content and responses.*.content.

Signed-off-by: Stepan Rabotkin <epicstyt@gmail.com>
Added description to the 30 responses that lacked it: the 200 of every
operation and the inline 412 of /osd/delete and /data/delete. OpenAPI 3.0
requires it.

Signed-off-by: Stepan Rabotkin <epicstyt@gmail.com>
The 200 schemas of /osd/delete and /osd/modify are objects but carried
"format": "uint64" and "description": "New OSD number" at schema level,
copied from /osd/alloc where the response really is a number.

Signed-off-by: Stepan Rabotkin <epicstyt@gmail.com>
epicstyt force-pushed openapi-lint from bb5dbfa126 to dd9b9f926d 2026-09-02 19:58:43 +03:00 Compare
vitalif approved these changes 2026-09-02 20:09:26 +03:00
vitalif merged commit dd9b9f926d into master 2026-09-02 20:10:02 +03:00
vitalif deleted branch openapi-lint 2026-09-02 20:10:03 +03:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#83
No description provided.