Skip to main content

Self-referencing category with parent

GET 

/category

A category that references itself through both parent (single ref) and subcategories (array of refs). Tests circular refs in both property and items positions.

Schema:

Category:
type: object
properties:
id:
type: integer
name:
type: string
parent:
$ref: "#/components/schemas/Category"
subcategories:
type: array
items:
$ref: "#/components/schemas/Category"

Responses

A category