Skip to content

Commit

Permalink
Extend api doc with save amending law and apply time machine
Browse files Browse the repository at this point in the history
RISDEV-3513
  • Loading branch information
VictorDelCampo committed Mar 6, 2024
1 parent ca5f168 commit e0227ba
Showing 1 changed file with 48 additions and 5 deletions.
53 changes: 48 additions & 5 deletions doc/backend/norms-api-v1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,27 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/AmendingLaw'
application/xml:
application/xml:
schema:
$ref: '#/components/schemas/LegalDocML.de'
put:
summary: Update the XML of an specific amending law by eli
parameters:
- name: eli
in: path
required: true
description: ELI of the amending law
schema:
type: string
requestBody:
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/LegalDocML.de'
responses:
'200':
description: Successful response

/amending-laws/{eli}/articles:
get:
Expand Down Expand Up @@ -82,7 +100,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Article'

/target-laws/{eli}:
get:
summary: Get a specific target law by eli
Expand All @@ -100,10 +118,35 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TargetLaw'
application/xml:
application/xml:
schema:
$ref: '#/components/schemas/LegalDocML.de'

/target-laws/{eli}/time-machine:
post:
summary: Call time machine to generate preview of applied amending law
parameters:
- name: eli
in: path
required: true
description: ELI identifier of the target law
schema:
type: string
requestBody:
description: The XML of the amending law (which may be updated and not saved on DB)
required: true
content:
application/xml:
schema:
$ref: '#/components/schemas/LegalDocML.de'
responses:
'200':
description: Successful response with preview of amended law
content:
application/xml:
schema:
$ref: '#/components/schemas/LegalDocML.de'


components:
schemas:
AmendingLaw:
Expand Down Expand Up @@ -144,7 +187,7 @@ components:
type: string
title:
type: string

LegalDocML.de:
type: object
xml:
Expand Down

0 comments on commit e0227ba

Please sign in to comment.