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

5 Commits

Author SHA1 Message Date
dd9b9f926d fix(openapi): drop the leftover format and description on two OSD schemas
Some checks failed
Test / test_enospc_imm (push) Has been cancelled
Test / test_enospc_imm_xor (push) Has been cancelled
Test / test_old_enospc (push) Has been cancelled
Test / test_old_enospc_xor (push) Has been cancelled
Test / test_old_enospc_imm (push) Has been cancelled
Test / test_old_enospc_imm_xor (push) Has been cancelled
Test / test_scrub (push) Has been cancelled
Test / test_scrub_zero_osd_2 (push) Has been cancelled
Test / test_scrub_xor (push) Has been cancelled
Test / test_scrub_pg_size_3 (push) Has been cancelled
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Has been cancelled
Test / test_scrub_ec (push) Has been cancelled
Test / test_old_scrub (push) Has been cancelled
Test / test_old_scrub_zero_osd_2 (push) Has been cancelled
Test / test_old_scrub_xor (push) Has been cancelled
Test / test_old_scrub_pg_size_3 (push) Has been cancelled
Test / test_old_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Has been cancelled
Test / test_old_scrub_ec (push) Has been cancelled
Test / test_old_partwr_csum (push) Has been cancelled
Test / test_heal_old_csum_32k_dmj (push) Has been cancelled
Test / test_heal_old_csum_32k_dj (push) Has been cancelled
Test / test_heal_old_csum_32k (push) Has been cancelled
Test / test_heal_old_csum_4k_dmj (push) Has been cancelled
Test / test_heal_old_csum_4k_dj (push) Has been cancelled
Test / test_heal_old_csum_4k (push) Has been cancelled
Test / test_nfs (push) Has been cancelled
Test / test_nfs_unaligned_append (push) Has been cancelled
Test / test_nfs_long_readdir (push) Has been cancelled
Test / test_write_encrypted (push) Has been cancelled
Test / test_write_encrypted_ec (push) Has been cancelled
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>
2026-09-02 19:57:33 +03:00
806ebf5bcd fix(openapi): describe every response
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>
2026-09-02 19:57:33 +03:00
5f4e394eb0 fix(openapi): drop the Swagger 2.0 consumes and produces leftovers
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>
2026-09-02 19:57:33 +03:00
50e36a04df fix(openapi): add the required info.title field
OpenAPI 3.0 requires info.title. Reuses the text of info.description.

Signed-off-by: Stepan Rabotkin <epicstyt@gmail.com>
2026-09-02 19:57:03 +03:00
9fc2781798 fix(openapi): require image, not the undefined names, in /image/flatten
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>
2026-09-02 19:57:03 +03:00