stream-object.json 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {
  2. "type": "object",
  3. "description": "Stream object",
  4. "required": ["id", "created_on", "modified_on", "owner_user_id", "incoming_port", "forwarding_host", "forwarding_port", "tcp_forwarding", "udp_forwarding", "enabled", "meta"],
  5. "additionalProperties": false,
  6. "properties": {
  7. "id": {
  8. "$ref": "../common.json#/properties/id"
  9. },
  10. "created_on": {
  11. "$ref": "../common.json#/properties/created_on"
  12. },
  13. "modified_on": {
  14. "$ref": "../common.json#/properties/modified_on"
  15. },
  16. "owner_user_id": {
  17. "$ref": "../common.json#/properties/user_id"
  18. },
  19. "incoming_port": {
  20. "type": "integer",
  21. "minimum": 1,
  22. "maximum": 65535,
  23. "if": {"properties": {"tcp_forwarding": {"const": true}}},
  24. "then": {"not": {"oneOf": [{"const": 80}, {"const": 443}]}}
  25. },
  26. "forwarding_host": {
  27. "anyOf": [
  28. {
  29. "description": "Domain Name",
  30. "example": "jc21.com",
  31. "type": "string",
  32. "pattern": "^(?:[^.*]+\\.?)+[^.]$"
  33. },
  34. {
  35. "type": "string",
  36. "format": "ipv4"
  37. },
  38. {
  39. "type": "string",
  40. "format": "ipv6"
  41. }
  42. ]
  43. },
  44. "forwarding_port": {
  45. "type": "integer",
  46. "minimum": 1,
  47. "maximum": 65535
  48. },
  49. "tcp_forwarding": {
  50. "type": "boolean"
  51. },
  52. "udp_forwarding": {
  53. "type": "boolean"
  54. },
  55. "enabled": {
  56. "$ref": "../common.json#/properties/enabled"
  57. },
  58. "meta": {
  59. "type": "object"
  60. }
  61. }
  62. }