stream-object.json 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {
  2. "type": "object",
  3. "description": "Stream object",
  4. "required": [
  5. "id",
  6. "created_on",
  7. "modified_on",
  8. "owner_user_id",
  9. "incoming_port",
  10. "forwarding_host",
  11. "forwarding_port",
  12. "tcp_forwarding",
  13. "udp_forwarding",
  14. "enabled",
  15. "meta"
  16. ],
  17. "additionalProperties": false,
  18. "properties": {
  19. "id": {
  20. "$ref": "../common.json#/properties/id"
  21. },
  22. "created_on": {
  23. "$ref": "../common.json#/properties/created_on"
  24. },
  25. "modified_on": {
  26. "$ref": "../common.json#/properties/modified_on"
  27. },
  28. "owner_user_id": {
  29. "$ref": "../common.json#/properties/user_id"
  30. },
  31. "incoming_port": {
  32. "type": "integer",
  33. "minimum": 1,
  34. "maximum": 65535,
  35. "example": 9090
  36. },
  37. "forwarding_host": {
  38. "anyOf": [
  39. {
  40. "description": "Domain Name",
  41. "type": "string",
  42. "pattern": "^(?:[^.*]+\\.?)+[^.]$",
  43. "example": "example.com"
  44. },
  45. {
  46. "type": "string",
  47. "format": "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$"
  48. },
  49. {
  50. "type": "string",
  51. "format": "ipv6"
  52. }
  53. ],
  54. "example": "example.com"
  55. },
  56. "forwarding_port": {
  57. "type": "integer",
  58. "minimum": 1,
  59. "maximum": 65535,
  60. "example": 80
  61. },
  62. "tcp_forwarding": {
  63. "type": "boolean",
  64. "example": true
  65. },
  66. "udp_forwarding": {
  67. "type": "boolean",
  68. "example": false
  69. },
  70. "enabled": {
  71. "$ref": "../common.json#/properties/enabled"
  72. },
  73. "certificate_id": {
  74. "$ref": "../common.json#/properties/certificate_id"
  75. },
  76. "meta": {
  77. "type": "object",
  78. "example": {}
  79. },
  80. "certificate": {
  81. "oneOf": [
  82. {
  83. "type": "null"
  84. },
  85. {
  86. "$ref": "./certificate-object.json"
  87. }
  88. ],
  89. "example": null
  90. },
  91. "owner": {
  92. "$ref": "./user-object.json"
  93. }
  94. }
  95. }