WIP
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "endpoints/proxy-hosts",
|
||||
"title": "Users",
|
||||
"title": "Proxy Hosts",
|
||||
"description": "Endpoints relating to Proxy Hosts",
|
||||
"stability": "stable",
|
||||
"type": "object",
|
||||
@ -15,49 +15,78 @@
|
||||
"modified_on": {
|
||||
"$ref": "../definitions.json#/definitions/modified_on"
|
||||
},
|
||||
"name": {
|
||||
"description": "Name",
|
||||
"example": "Jamie Curnow",
|
||||
"domain_names": {
|
||||
"$ref": "../definitions.json#/definitions/domain_names"
|
||||
},
|
||||
"forward_ip": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 100
|
||||
"format": "ipv4"
|
||||
},
|
||||
"nickname": {
|
||||
"description": "Nickname",
|
||||
"example": "Jamie",
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 50
|
||||
"forward_port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
},
|
||||
"email": {
|
||||
"$ref": "../definitions.json#/definitions/email"
|
||||
"ssl_enabled": {
|
||||
"$ref": "../definitions.json#/definitions/ssl_enabled"
|
||||
},
|
||||
"avatar": {
|
||||
"description": "Avatar",
|
||||
"example": "http://somewhere.jpg",
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 150,
|
||||
"readOnly": true
|
||||
"ssl_forced": {
|
||||
"$ref": "../definitions.json#/definitions/ssl_forced"
|
||||
},
|
||||
"roles": {
|
||||
"description": "Roles",
|
||||
"example": [
|
||||
"admin"
|
||||
],
|
||||
"type": "array"
|
||||
"ssl_provider": {
|
||||
"$ref": "../definitions.json#/definitions/ssl_provider"
|
||||
},
|
||||
"is_disabled": {
|
||||
"description": "Is Disabled",
|
||||
"example": false,
|
||||
"type": "boolean"
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"letsencrypt_email": {
|
||||
"type": "string",
|
||||
"format": "email"
|
||||
},
|
||||
"letsencrypt_agree": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/id"
|
||||
},
|
||||
"created_on": {
|
||||
"$ref": "#/definitions/created_on"
|
||||
},
|
||||
"modified_on": {
|
||||
"$ref": "#/definitions/modified_on"
|
||||
},
|
||||
"domain_names": {
|
||||
"$ref": "#/definitions/domain_names"
|
||||
},
|
||||
"forward_ip": {
|
||||
"$ref": "#/definitions/forward_ip"
|
||||
},
|
||||
"forward_port": {
|
||||
"$ref": "#/definitions/forward_port"
|
||||
},
|
||||
"ssl_enabled": {
|
||||
"$ref": "#/definitions/ssl_enabled"
|
||||
},
|
||||
"ssl_forced": {
|
||||
"$ref": "#/definitions/ssl_forced"
|
||||
},
|
||||
"ssl_provider": {
|
||||
"$ref": "#/definitions/ssl_provider"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/meta"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"title": "List",
|
||||
"description": "Returns a list of Users",
|
||||
"href": "/users",
|
||||
"description": "Returns a list of Proxy Hosts",
|
||||
"href": "/nginx/proxy-hosts",
|
||||
"access": "private",
|
||||
"method": "GET",
|
||||
"rel": "self",
|
||||
@ -73,8 +102,8 @@
|
||||
},
|
||||
{
|
||||
"title": "Create",
|
||||
"description": "Creates a new User",
|
||||
"href": "/users",
|
||||
"description": "Creates a new Proxy Host",
|
||||
"href": "/nginx/proxy-hosts",
|
||||
"access": "private",
|
||||
"method": "POST",
|
||||
"rel": "create",
|
||||
@ -84,33 +113,31 @@
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"nickname",
|
||||
"email"
|
||||
"domain_names",
|
||||
"forward_ip",
|
||||
"forward_port"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"$ref": "#/definitions/name"
|
||||
"domain_names": {
|
||||
"$ref": "#/definitions/domain_names"
|
||||
},
|
||||
"nickname": {
|
||||
"$ref": "#/definitions/nickname"
|
||||
"forward_ip": {
|
||||
"$ref": "#/definitions/forward_ip"
|
||||
},
|
||||
"email": {
|
||||
"$ref": "#/definitions/email"
|
||||
"forward_port": {
|
||||
"$ref": "#/definitions/forward_port"
|
||||
},
|
||||
"roles": {
|
||||
"$ref": "#/definitions/roles"
|
||||
"ssl_enabled": {
|
||||
"$ref": "#/definitions/ssl_enabled"
|
||||
},
|
||||
"is_disabled": {
|
||||
"$ref": "#/definitions/is_disabled"
|
||||
"ssl_forced": {
|
||||
"$ref": "#/definitions/ssl_forced"
|
||||
},
|
||||
"auth": {
|
||||
"type": "object",
|
||||
"description": "Auth Credentials",
|
||||
"example": {
|
||||
"type": "password",
|
||||
"secret": "bigredhorsebanana"
|
||||
}
|
||||
"ssl_provider": {
|
||||
"$ref": "#/definitions/ssl_provider"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -122,8 +149,8 @@
|
||||
},
|
||||
{
|
||||
"title": "Update",
|
||||
"description": "Updates a existing User",
|
||||
"href": "/users/{definitions.identity.example}",
|
||||
"description": "Updates a existing Proxy Host",
|
||||
"href": "/nginx/proxy-hosts/{definitions.identity.example}",
|
||||
"access": "private",
|
||||
"method": "PUT",
|
||||
"rel": "update",
|
||||
@ -133,20 +160,26 @@
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"$ref": "#/definitions/name"
|
||||
"domain_names": {
|
||||
"$ref": "#/definitions/domain_names"
|
||||
},
|
||||
"nickname": {
|
||||
"$ref": "#/definitions/nickname"
|
||||
"forward_ip": {
|
||||
"$ref": "#/definitions/forward_ip"
|
||||
},
|
||||
"email": {
|
||||
"$ref": "#/definitions/email"
|
||||
"forward_port": {
|
||||
"$ref": "#/definitions/forward_port"
|
||||
},
|
||||
"roles": {
|
||||
"$ref": "#/definitions/roles"
|
||||
"ssl_enabled": {
|
||||
"$ref": "#/definitions/ssl_enabled"
|
||||
},
|
||||
"is_disabled": {
|
||||
"$ref": "#/definitions/is_disabled"
|
||||
"ssl_forced": {
|
||||
"$ref": "#/definitions/ssl_forced"
|
||||
},
|
||||
"ssl_provider": {
|
||||
"$ref": "#/definitions/ssl_provider"
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "#/definitions/meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -158,8 +191,8 @@
|
||||
},
|
||||
{
|
||||
"title": "Delete",
|
||||
"description": "Deletes a existing User",
|
||||
"href": "/users/{definitions.identity.example}",
|
||||
"description": "Deletes a existing Proxy Host",
|
||||
"href": "/nginx/proxy-hosts/{definitions.identity.example}",
|
||||
"access": "private",
|
||||
"method": "DELETE",
|
||||
"rel": "delete",
|
||||
@ -170,34 +203,5 @@
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/id"
|
||||
},
|
||||
"created_on": {
|
||||
"$ref": "#/definitions/created_on"
|
||||
},
|
||||
"modified_on": {
|
||||
"$ref": "#/definitions/modified_on"
|
||||
},
|
||||
"name": {
|
||||
"$ref": "#/definitions/name"
|
||||
},
|
||||
"nickname": {
|
||||
"$ref": "#/definitions/nickname"
|
||||
},
|
||||
"email": {
|
||||
"$ref": "#/definitions/email"
|
||||
},
|
||||
"avatar": {
|
||||
"$ref": "#/definitions/avatar"
|
||||
},
|
||||
"roles": {
|
||||
"$ref": "#/definitions/roles"
|
||||
},
|
||||
"is_disabled": {
|
||||
"$ref": "#/definitions/is_disabled"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user