Can you explain this assertion more? I don’t know if I understand why you can’t.
Using the Confluence v2 Open API spec, I searched for the path you hyperlinked: /spaces/{id}
and I found this substructure:
"/spaces/{id}": {
"get": {
"tags": ["Space"],
"operationId": "getSpaceById",
"summary": "Get space by id",
"description": "Returns a specific space.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\nPermission to view the space.",
"parameters": [],
"responses": {
"200": {
"description": "Returned if the requested space is returned.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Space"
}
}
}
},
"400": {},
"401": {},
"404": {}
},
"security": []
}
}
That tells us the schema for this response is defined in #/components/schemas/Space
, or, as a JavaScript style object path components.schemas.Space
, which gives me:
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the space."
},
"key": {
"type": "string",
"description": "Key of the space."
},
"name": {
"type": "string",
"description": "Name of the space."
},
"type": {
"$ref": "#/components/schemas/SpaceType"
},
"status": {
"$ref": "#/components/schemas/SpaceStatus"
},
"authorId": {
"type": "string",
"description": "The account ID of the user who created this space originally."
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Date and time when the space was created. In format \"YYYY-MM-DDTHH:mm:ss.sssZ\"."
},
"homepageId": {
"type": "string",
"description": "ID of the space's homepage."
},
"description": {
"$ref": "#/components/schemas/SpaceDescription"
},
"icon": {
"$ref": "#/components/schemas/SpaceIcon"
},
"_links": {
"$ref": "#/components/schemas/SpaceLinks"
}
}
}
As we can see, this has further type references, which need to be dereferenced & assembled into a “type”. The structure is there. It should be navigable via standard Open API libraries because that’s how our doc generator constructs the example that you’ve screenshot. I couldn’t make more specific recommendations without knowing what language you are working with.
That said, I do understand if the programmatic approach is simply more work than “manually copy/paste it”. If you only need an example of the JSON structure for 1 endpoint, and not the full comprehension of the entire API’s schema, then why not copy/paste?