Skip to content

Commit

Permalink
Add new toc endpoint to api docs
Browse files Browse the repository at this point in the history
RISDEV-6266
  • Loading branch information
VictorDelCampo committed Feb 15, 2025
1 parent b1223ea commit 5885a89
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions doc/backend/norms-api-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,32 @@ paths:
authUrl:
type: string

/norms/{dokumentExpressionEli}/toc:
get:
tags:
- Dokument expression
summary: Retrieve the table of contents of a Regelungstext
parameters:
- name: dokumentExpressionEli
in: path
required: true
description: Expression ELI of the Dokument
schema:
type: string
responses:
"200":
description: Table of contents successfully retrieved
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/TableOfContentsResponse"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"

components:
schemas:
Norm:
Expand Down Expand Up @@ -922,6 +948,27 @@ components:
additionalProperties: true
description: "Optional additional fields to convey extra information."

TableOfContentsResponse:
type: object
properties:
id:
type: string
description: The eId of the XML node
marker:
type: string
description: The marker of the item (e.g. § 1)
heading:
type: string
description: The heading of the item, if present
type:
type: string
description: The type of the item (e.g. section or chapter)
children:
type: array
description: Nested children elements of the table of contents
items:
$ref: "#/components/schemas/TableOfContentsResponse"

responses:
NotFound:
description: One or more resource(s) not found
Expand Down

0 comments on commit 5885a89

Please sign in to comment.