Skip to content

Commit

Permalink
Merge pull request #381 from sinamics/docs
Browse files Browse the repository at this point in the history
Updated docs with correct dns structure
  • Loading branch information
sinamics authored Apr 12, 2024
2 parents 0a71f1d + c7f02a7 commit 6248d0d
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 119 deletions.
27 changes: 2 additions & 25 deletions docs/docs/Rest Api/Organization/_source/network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ servers:

components:
$ref: '../../_schema/security.yml#/components'

security:
- defaultApiKey: []
- x-ztnet-auth: []

paths:
/org/:orgid/network:
Expand All @@ -28,12 +29,6 @@ paths:
Returns an array of Networks you have access to.
operationId: getUserNetworks
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: orgid
in: path
required: true
Expand Down Expand Up @@ -62,12 +57,6 @@ paths:
summary: Create New Network within the Organization
operationId: createNewNetwork
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: orgid
in: path
required: true
Expand Down Expand Up @@ -110,12 +99,6 @@ paths:
summary: Returns information about a specific organization network
operationId: getNetworkInfo
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: networkId
in: path
required: true
Expand Down Expand Up @@ -147,12 +130,6 @@ paths:
summary: Update a specific organization network
operationId: updateNetworkInfo
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: networkId
in: path
required: true
Expand Down
20 changes: 2 additions & 18 deletions docs/docs/Rest Api/Organization/_source/networkMember.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,16 @@ servers:

components:
$ref: '../../_schema/security.yml#/components'

security:
- defaultApiKey: []
- x-ztnet-auth: []

paths:
/org/:orgid/network/{networkId}/member:
get:
summary: Returns a list of Members in a organization network
operationId: getNetworkMemberInfo
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: networkId
in: path
required: true
Expand Down Expand Up @@ -65,12 +60,6 @@ paths:
summary: Returns a specific organization network member
operationId: getNetworkMemberByIdInfo
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: networkId
in: path
required: true
Expand Down Expand Up @@ -109,11 +98,6 @@ paths:
summary: Modify a organization network member
description: Modify a organization network member
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
- in: path
name: networkId
required: true
Expand Down
18 changes: 3 additions & 15 deletions docs/docs/Rest Api/Organization/_source/organization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,17 @@ servers:

components:
$ref: '../../_schema/security.yml#/components'
security:
- defaultApiKey: []

security:
- x-ztnet-auth: []

paths:
/org:
get:
summary: Returns a list of Organizations you have access to.
description: |
Returns an array of Organizations you have access to.
operationId: getOrganization
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
responses:
200:
description: An array of Network IDs
Expand All @@ -55,12 +49,6 @@ paths:
summary: Returns information of the specified Organization.
operationId: getOrganizationInfo
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: orgid
in: path
required: true
Expand Down
9 changes: 2 additions & 7 deletions docs/docs/Rest Api/Organization/_source/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ tags:

components:
$ref: '../../_schema/security.yml#/components'

security:
- defaultApiKey: []
- x-ztnet-auth: []

paths:
/org/:orgid/users:
Expand All @@ -29,12 +30,6 @@ paths:
summary: Returns a list of Users in the organization
operationId: getOrganizationUsers
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: orgid
in: path
required: true
Expand Down
23 changes: 2 additions & 21 deletions docs/docs/Rest Api/Personal/_source/network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ servers:

components:
$ref: '../../_schema/security.yml#/components'

security:
- defaultApiKey: []
- x-ztnet-auth: []

paths:
/network:
Expand All @@ -27,13 +28,6 @@ paths:
description: |
Returns an array of Networks you have access to.
operationId: getUserNetworks
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
responses:
200:
description: An array of Network IDs
Expand All @@ -54,13 +48,6 @@ paths:
post:
summary: Create New Network
operationId: createNewNetwork
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
requestBody:
required: false
content:
Expand Down Expand Up @@ -97,12 +84,6 @@ paths:
summary: Returns information about a specific network
operationId: getNetworkInfo
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: networkId
in: path
required: true
Expand Down
9 changes: 2 additions & 7 deletions docs/docs/Rest Api/Personal/_source/networkMember.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,16 @@ servers:

components:
$ref: '../../_schema/security.yml#/components'

security:
- defaultApiKey: []
- x-ztnet-auth: []

paths:
/network/{networkId}/member:
get:
summary: Returns a list of Members on the network
operationId: getNetworkMemberInfo
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
- name: networkId
in: path
required: true
Expand Down
19 changes: 2 additions & 17 deletions docs/docs/Rest Api/Personal/_source/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ tags:

components:
$ref: '../../_schema/security.yml#/components'

security:
- defaultApiKey: []
- x-ztnet-auth: []

paths:
/user:
Expand All @@ -28,13 +29,6 @@ paths:
- user
summary: Create a new user
operationId: postNewUser
parameters:
- name: x-ztnet-auth
in: header
required: true
schema:
type: string
description: API Key for the user
description: |
If no users have been created yet, no API key is required. Otherwise, an API key must be included in the request header.
Keep in mind that first user created will be the admin user.
Expand Down Expand Up @@ -115,12 +109,3 @@ paths:
500:
$ref: '../../_http_responses/InternalServerError.yml#/InternalServerError'

components:
operationId: postNewUser
securitySchemes:
x-ztnet-auth:
type: apiKey
required: true
in: header
name: x-ztnet-auth
description: API key can be generated from the ZTNet admin section.
23 changes: 17 additions & 6 deletions docs/docs/Rest Api/_schema/NetworkSchema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ NetworkResponse:
creationTime:
type: integer
dns:
type: array
items:
type: string
type: object
properties:
domain:
type: string
servers:
type: array
items:
type: string
enableBroadcast:
type: boolean
id:
Expand Down Expand Up @@ -99,9 +104,15 @@ UpdateNetworkShema:
type: object
properties:
dns:
type: array
items:
type: string
type: object
properties:
domain:
type: string
servers:
type: array
items:
type: string

ipAssignmentPools:
type: array
items:
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/Rest Api/_schema/security.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
components:
securitySchemes:
defaultApiKey:
description: API key required for access
x-ztnet-auth:
type: apiKey
in: header
name: x-ztnet-auth
in: header
description: API key required for access

0 comments on commit 6248d0d

Please sign in to comment.