-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
In order to enhance tooling support please specify the content type as application/json instead of */* and return a model for each response
I had success with adding a APIErrorResponseInfo model to the schamas and was then able to use Microsoft Kiota to generate an working rest client.
"components": {
"schemas": {
"....": {
},
"APIErrorResponseInfo": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/APIError"
},
"description": "List of error objects containing error key and error message."
},
"status": {
"type": "string",
"description": "Response HTTP status code of the operation.",
"example": "BAD_REQUEST"
},
"timestamp": {
"type": "integer",
"description": "Timestamp in milliseconds when the operation failed. Measured as epoch time.",
"format": "int64",
"example": 1763739153178
}
},
"description": "Response for a failed API call."
}
}
}
And as example the modified refreshAccessToken definition
"/refresh": {
"post": {
"tags": [
"Auth"
],
"summary": "Refreshes access token from refresh token.",
"operationId": "refreshAccessToken",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RefreshToken"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccessToken"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIErrorResponseInfo"
}
}
}
},
"429": {
"description": "Too many requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIErrorResponseInfo"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIErrorResponseInfo"
}
}
}
}
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels