-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Page - Content APIs
-
Severity 3 - Minor
-
1
Issue Summary
Open API Spec for the multiple Confluence Cloud REST APIs uses "allof" composition for the response, which overrides the "_links" value containing only the "base" parameter value with the ones available in the $ref objects.
Confluence Cloud REST APIs affected :
/pages/{id}
/blogposts/{id}
/attachments/{id}
/custom-content/{id}
/databases, /databases/{id}
/folders, /folders/{id}
/embeds/{id}, /embeds
/whiteboards, /whiteboards/{id}
Steps to Reproduce
- Download the OpenAPI definition from Confluence Cloud Open API.
Below API spec for /pages/{id} REST call overrides the value of $ref object PageSingle due to "allof" composition resulting in "_links" containing only the "base" parameter value in the response for the client generated code.
/pages/{id}: get: tags: - Page operationId: getPageById summary: Get page by id description: |- Returns a specific page. . . responses: '200': description: Returned if the requested page is returned. content: application/json: schema: allOf: - $ref: '#/components/schemas/PageSingle' - type: object properties: _links: type: object properties: base: type: string description: Base url of the Confluence site.
Expected Results
The "_links" should contain response parameters available in $ref object for the corresponding REST API(such as "editui", "webui", "tinyui", and "edituiv2" for /pages/{id}).
{
.
.
.
"_links": {
"editui": "/pages/resumedraft.action?draftId=229474",
"webui": "/spaces/~63749c013c26ca7fa0d102e4/overview",
"edituiv2": "/spaces/~63749c013c26ca7fa0d102e4/pages/edit-v2/229474",
"tinyui": "/x/YoAD",
"base": "https://*****.atlassian.net/wiki"
}
}
Actual Results
The results returned from the generated client code contain "links" with only the base parameter value.
{
.
.
.
"links": {
"base": "https://******.atlassian.net/wiki"
}
}
Workaround
Enhance _link schemas with missing properties or replace problematic allOf compositions with direct $ref to Single schemas.