Skip to content

Commit

Permalink
[skip ci] Add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gustawlippa committed Sep 6, 2021
1 parent a9f485b commit c122295
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions doc/rest-api/Dynamic-domains_swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,22 @@ paths:
responses:
204:
description: Domain was successfully inserted.
400:
description: Bad request
examples:
application/json: {"what": "body is empty"}
409:
description: Domain already exists with a different host type.
examples:
application/json: {"what": "duplicate"}
403:
description: DB service disabled or the host type is unknown.
examples:
application/json: {"what": "domain is static"}
500:
description: Other errors.
examples:
application/json: {"what": "database error"}
patch:
description: Enables/disables a domain.
tags:
Expand All @@ -72,10 +82,16 @@ paths:
description: Domain was sucessfully updated.
404:
description: Domain not found.
examples:
application/json: {"what": "domain not found"}
403:
description: Domain is static, or the service is disabled.
examples:
application/json: {"what": "domain is static"}
500:
description: Other errors.
examples:
application/json: {"what": "database error"}
get:
description: Returns information about the domain.
tags:
Expand All @@ -90,6 +106,8 @@ paths:
description: Successful response.
404:
description: Domain not found.
examples:
application/json: {"what": "domain not found"}
delete:
description: "Removes a domain"
tags:
Expand Down Expand Up @@ -120,7 +138,9 @@ paths:
* the DB service is disabled.
* the host type is wrong (does not match the host type in the database).
* the host type is unknown.
404:
description: "There was no such contact."
examples:
application/json: {"what": "unknown host type"}
500:
description: "Other errors"
examples:
application/json: {"what": "database error"}

0 comments on commit c122295

Please sign in to comment.