Docu for target type endpoints in Target API (#1185)

* add assign/unassign type endpoints to target api docs

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix target type creation for api rest docs test

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review comments: rename tests

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* adapt test to avoid failing when translated

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
This commit is contained in:
Natalia Kislicyn
2021-10-15 16:22:20 +02:00
committed by GitHub
parent e5dbbbbc7b
commit 745a0c6a10
8 changed files with 246 additions and 8 deletions

View File

@@ -976,6 +976,86 @@ include::../errors/415.adoc[]
include::../errors/429.adoc[]
|===
== POST /rest/v1/targets/{targetId}/targettype
=== Implementation Notes
Assign or update the target type of a target. Required permission: UPDATE_TARGET
=== Assign a target type to a target
==== Curl
include::{snippets}/targets/post-assign-target-type/curl-request.adoc[]
==== Request URL
include::{snippets}/targets/post-assign-target-type/http-request.adoc[]
==== Request path parameter
include::{snippets}/targets/post-assign-target-type/path-parameters.adoc[]
==== Request fields
include::{snippets}/targets/post-assign-target-type/request-fields.adoc[]
=== Response (Status 200)
==== Response example
include::{snippets}/targets/post-assign-target-type/http-response.adoc[]
=== Error responses
|===
| HTTP Status Code | Reason | Response Model
include::../errors/400.adoc[]
include::../errors/401.adoc[]
include::../errors/403.adoc[]
include::../errors/405.adoc[]
include::../errors/429.adoc[]
|===
== DELETE /rest/v1/targets/{targetId}/targettype
=== Implementation Notes
Remove the target type from a target. The target type will be set to null. Required permission: UPDATE_TARGET
=== Remove a target type from a target
==== Curl
include::{snippets}/targets/delete-unassign-target-type/curl-request.adoc[]
==== Request URL
include::{snippets}/targets/delete-unassign-target-type/http-request.adoc[]
==== Request path parameter
include::{snippets}/targets/delete-unassign-target-type/path-parameters.adoc[]
=== Response (Status 200)
==== Response example
include::{snippets}/targets/delete-unassign-target-type/http-response.adoc[]
=== Error responses
|===
| HTTP Status Code | Reason | Response Model
include::../errors/400.adoc[]
include::../errors/401.adoc[]
include::../errors/403.adoc[]
include::../errors/405.adoc[]
include::../errors/429.adoc[]
|===
== Additional content
[[error-body]]