Skip to content

Commit 1dc816f

Browse files
committed
Correct usage of example_schema in OpenAPI
1 parent 3e0ab54 commit 1dc816f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

v2.6/documentation/openapi.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,8 @@
214214
"description": "The description of this error code, e.g., `Page not found`.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/"
215215
},
216216
"example_schema": {
217-
"type": ["string"],
218-
"pattern": "^[a-zA-Z0-9+/=_-]+$",
219-
"description": "A JSON schema that describes the response format for the selected status code, encoded as a base64 string. Use either example or example_schema, but not both."
217+
"type": ["string","object"],
218+
"description": "A JSON schema that describes the response format for the endpoint, directly as a JSON object, or encoded as a base64 string. Use either example or example_schema, but not both."
220219
},
221220
"example": {
222221
"type": ["string","object","array","boolean","integer","null","number"],
@@ -269,9 +268,8 @@
269268
"description": "The description of the payload this endpoint accepts.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/"
270269
},
271270
"example_schema": {
272-
"type": ["string"],
273-
"pattern": "^[a-zA-Z0-9+/=_-]+$",
274-
"description": "A JSON schema that describes the response format for the selected status code, encoded as a base64 string. Use either example or example_schema, but not both."
271+
"type": ["string","object"],
272+
"description": "A JSON schema that describes the request format for the accepted payload in the endpoint. Use either example or example_schema, but not both."
275273
},
276274
"example": {
277275
"type": ["string","object","array","boolean","integer","null","number"],

0 commit comments

Comments
 (0)