Skip to content

Commit d10def4

Browse files
committed
refactor: replace remove field endpoint with new remove and replace object endpoints
1 parent 991fcee commit d10def4

1 file changed

Lines changed: 27 additions & 29 deletions

File tree

docs/openapi-main.yaml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2627,54 +2627,52 @@ paths:
26272627
description: Forbidden - user is not an owner of this object
26282628
tags:
26292629
- Edit
2630-
/{uri}/remove/{field}:
2631-
post:
2632-
summary: Remove Field
2633-
description: Remove a field from an object. Note that the actual controller endpoint name is /removeField.
2630+
/{uri}/remove:
2631+
get:
2632+
summary: Remove Object
2633+
description: Remove the object specified by the URI, and the references to that object.
26342634
parameters:
26352635
- name: uri
26362636
in: path
26372637
required: true
26382638
schema:
26392639
type: string
26402640
description: The URI of the object
2641-
- name: field
2641+
security:
2642+
- userToken: []
2643+
responses:
2644+
"200":
2645+
description: Object removed successfully
2646+
"401":
2647+
description: Unauthorized - invalid or missing token
2648+
"403":
2649+
description: Forbidden - user is not an owner of this object
2650+
"404":
2651+
description: Object not found
2652+
tags:
2653+
- Edit
2654+
/{uri}/replace:
2655+
get:
2656+
summary: Replace Object
2657+
description: Remove the object specified from URI, but leave references to the object.
2658+
parameters:
2659+
- name: uri
26422660
in: path
26432661
required: true
26442662
schema:
26452663
type: string
2646-
enum:
2647-
- role
2648-
- type
2649-
- title
2650-
- description
2651-
- wasDerivedFrom
2652-
- annotation
2653-
description: The field to remove
2664+
description: The URI of the object
26542665
security:
26552666
- userToken: []
2656-
requestBody:
2657-
required: true
2658-
content:
2659-
application/x-www-form-urlencoded:
2660-
schema:
2661-
type: object
2662-
properties:
2663-
object:
2664-
type: string
2665-
description: The value of the field to remove
2666-
pred:
2667-
type: string
2668-
description: A predicate for an annotation
2669-
required:
2670-
- object
26712667
responses:
26722668
"200":
2673-
description: Field removed successfully
2669+
description: Object removed successfully
26742670
"401":
26752671
description: Unauthorized - invalid or missing token
26762672
"403":
26772673
description: Forbidden - user is not an owner of this object
2674+
"404":
2675+
description: Object not found
26782676
tags:
26792677
- Edit
26802678
/callPlugin:

0 commit comments

Comments
 (0)