refactor: rename entry field to ip across whitelist API
Rename the `entry` field to `ip` throughout the whitelist API for clarity and consistency. This affects API request/response bodies, path parameters, OpenAPI spec, documentation, and database queries in the audit log endpoint.
This commit is contained in:
22
openapi.yaml
22
openapi.yaml
@@ -191,9 +191,9 @@ paths:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- entry
|
||||
- ip
|
||||
properties:
|
||||
entry:
|
||||
ip:
|
||||
type: string
|
||||
description: IP address or CIDR range to whitelist
|
||||
example: "203.0.113.10"
|
||||
@@ -201,16 +201,16 @@ paths:
|
||||
'204':
|
||||
description: Created
|
||||
'400':
|
||||
description: Bad request — missing entry or invalid entry (must be valid IP or CIDR range)
|
||||
description: Bad request — missing ip or invalid ip (must be valid IP or CIDR range)
|
||||
'401':
|
||||
description: Unauthorized — invalid API token
|
||||
'409':
|
||||
description: Conflict — entry already exists
|
||||
description: Conflict — ip already exists
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
example: "entry already exists"
|
||||
example: "ip already exists"
|
||||
'500':
|
||||
description: Internal error
|
||||
|
||||
@@ -247,7 +247,7 @@ paths:
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
entry:
|
||||
ip:
|
||||
type: string
|
||||
example: "203.0.113.10"
|
||||
'401':
|
||||
@@ -255,13 +255,13 @@ paths:
|
||||
'500':
|
||||
description: Internal error — database failure
|
||||
|
||||
/api/whitelist/perm/{entry}:
|
||||
/api/whitelist/perm/{ip}:
|
||||
delete:
|
||||
summary: Remove a permanent whitelisted IP or CIDR
|
||||
description: Remove a permanent whitelisted IP address or CIDR range.
|
||||
operationId: deletePermWhitelist
|
||||
parameters:
|
||||
- name: entry
|
||||
- name: ip
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
@@ -271,7 +271,7 @@ paths:
|
||||
'204':
|
||||
description: Deleted
|
||||
'400':
|
||||
description: Bad request — entry required
|
||||
description: Bad request — ip required
|
||||
'401':
|
||||
description: Unauthorized — invalid API token
|
||||
'500':
|
||||
@@ -337,10 +337,6 @@ paths:
|
||||
type: string
|
||||
nullable: true
|
||||
example: "1.2.3.4"
|
||||
cidr:
|
||||
type: string
|
||||
nullable: true
|
||||
example: "10.0.0.0/24"
|
||||
ttl_seconds:
|
||||
type: integer
|
||||
nullable: true
|
||||
|
||||
Reference in New Issue
Block a user