Skip to content

Commit

Permalink
updated GIG API swagger doc
Browse files Browse the repository at this point in the history
  • Loading branch information
QiluXie committed Jan 10, 2024
1 parent daec033 commit 6c9ebcb
Showing 1 changed file with 95 additions and 1 deletion.
96 changes: 95 additions & 1 deletion docs/gigDnsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,18 @@ paths:
description: The contact email address for this DNS record.
record:
$ref: "#/components/schemas/DNSRecord"
rootDomain:
type: string
description: The root domain associated with this DNS record.
example: "example.com"
example:
email: "[email protected]"
record:
type: "A"
name: "example.com"
content: "192.168.1.1"
rootDomain: "example.com"

responses:
"201":
description: DNS record successfully added.
Expand Down Expand Up @@ -74,6 +80,81 @@ paths:
message:
type: string
example: "Internal server error."
put:
summary: Update a DNS record
description: Update an existing DNS record in the DNS management system.
security:
- ApiKeyAuth: []
parameters:
- in: header
name: X-API-KEY
required: true
schema:
type: string
description: API key required to authorize requests.
example: "1234567890abcdef"
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- email
- record
properties:
email:
type: string
format: email
description: The contact email address for this DNS record.
record:
$ref: "#/components/schemas/DNSRecord"
rootDomain:
type: string
description: The root domain associated with this DNS record.
example: "example.com"
example:
email: "[email protected]"
record:
type: "A"
name: "example.com"
content: "192.168.1.1"
rootDomain: "example.com"
responses:
"200":
description: DNS record successfully updated.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "DNS record updated successfully."
"401":
description: Unauthorized.
"400":
description: Invalid request data.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Invalid data provided."
"404":
description: DNS record not found.
"500":
description: Server error.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Internal server error."
get:
summary: Retrieve DNS records
description: Get a list of DNS records for a specified name.
Expand Down Expand Up @@ -128,6 +209,19 @@ paths:
"DS",
]
description: The type of the DNS record to be deleted.
- in: query
name: rootDomain
required: false
schema:
type: string
description: The root domain associated with the DNS record to be deleted.
- in: query
name: email
required: true
schema:
type: string
format: email
description: The contact email address associated with the DNS record to be deleted.
responses:
"200":
description: DNS record successfully deleted.
Expand Down Expand Up @@ -227,4 +321,4 @@ components:
description: An 8-bit integer representing the type of the digest.
digest:
type: string
description: The digest value, encoded in Base64.
description: The digest value, encoded in Base64.

0 comments on commit 6c9ebcb

Please sign in to comment.