You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve declared some callbacks in the OpenAPI definition, but when I try to print them, the callback path items are missing. It seems like this might be an encoding issue, causing the paths not to be properly parsed or included when the file is read.
Here’s my test file for reference:
{
"openapi": "3.0.3",
"info": {
"title": "Simple Pet Store API",
"version": "1.0.0"
},
"paths": {
"/pets": {
"post": {
"summary": "Add a new pet",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Pet created successfully."
}
},
"callbacks": {
"onPetStatusChange": {
"{$request.body#/callbackUrl}": {
"post": {
"summary": "Notify about pet status change",
"description": "This callback is triggered whenever the status of a pet changes.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "The new status of the pet.",
"enum": [
"available",
"pending",
"sold"
]
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "The time when the status change occurred."
},
"petId": {
"type": "integer",
"description": "The unique ID of the pet whose status changed."
}
},
"required": [
"status",
"timestamp",
"petId"
]
}
}
}
},
"responses": {
"200": {
"description": "Callback successfully processed."
},
"400": {
"description": "Invalid payload provided.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Details about the error."
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
The text was updated successfully, but these errors were encountered:
abdelfetah18
changed the title
Callbacks Missing in OpenAPI Instance Due to Encoding Issue
Callback pathItems are missing in OpenAPI Instance due to decoding issue
Dec 29, 2024
I’ve declared some callbacks in the OpenAPI definition, but when I try to print them, the callback path items are missing. It seems like this might be an encoding issue, causing the paths not to be properly parsed or included when the file is read.
Here’s my test file for reference:
The text was updated successfully, but these errors were encountered: