[add] added public mode

This commit is contained in:
2021-03-07 16:39:38 -05:00
parent 8bbd3e02f3
commit c4cb76fe0b
4 changed files with 109 additions and 2 deletions

33
api.yml
View File

@@ -253,6 +253,39 @@ paths:
$ref: "#/components/schemas/client_info"
"401":
$ref: "#/components/responses/unauthorized_public"
post:
tags:
- "public"
summary: "Set ipv4 client information. This is ONLY available if ENV['RAILS_API_PUBLIC'] is set"
description: "If body is present, it will take precedence over the request IP. Response contains the newly set `ipv4` value."
requestBody:
description: "An existing clients properties wil only be updated if the parameter is present."
required: false
content:
application/json:
schema:
$ref: "#/components/schemas/client_update"
operationId: "set_public_client_ip"
security: []
responses:
"200":
description: "Client created"
content:
application/json:
schema:
$ref: "#/components/schemas/client_info"
"201":
description: "Client updated"
content:
application/json:
schema:
$ref: "#/components/schemas/client_info"
"403":
description: "Forbidden - API not public"
"406":
description: "Not Acceptable - IPv4 Address is invalid"
"429":
description: "Too many clients - Maximum client count reached"
components: