rest: fix examples in OpenAPI
@@ -351,6 +351,18 @@ paths:
schema:
type: array
items:
+ type: string
+ pattern: '[0-9a-f]+'
+ example: ["68dcc12fe0dfe5e7b66ca6f8c959f9aa43b273e120a77fc3e4e2f04f1ecd7968"]
+
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
oneOf:
- description: Fragment is yet to be processed
type: string
@@ -387,22 +399,8 @@ paths:
block:
description: Block hash where the fragment was last seen
type: string
- pattern: '[0-9a-fA-F]+'
- example: |
- ["68dcc12fe0dfe5e7b66ca6f8c959f9aa43b273e120a77fc3e4e2f04f1ecd7968"]
-
- responses:
- '200':
- description: Success
- content:
- application/json:
- schema:
- type: object
- additionalProperties:
- type: string
- pattern: '[0-9a-f]+'
- example: |
- {"68dcc12fe0dfe5e7b66ca6f8c959f9aa43b273e120a77fc3e4e2f04f1ecd7968": "Pending"}
+ pattern: '[0-9a-fa-f]+'
+ example: {"68dcc12fe0dfe5e7b66ca6f8c959f9aa43b273e120a77fc3e4e2f04f1ecd7968": "Pending"}
/api/v0/leaders:
get:
@@ -716,6 +714,8 @@ paths:
application/json:
schema:
description: A list of fragment IDs
+ type: array
+ items:
type: string
pattern: '[0-9a-f]+'
example: ["68dcc12fe0dfe5e7b66ca6f8c959f9aa43b273e120a77fc3e4e2f04f1ecd7968"]
