You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.3 KiB

  1. {
  2. "$schema": "http:\/\/json-schema.org\/draft-04\/schema#",
  3. "$ref": "#\/definitions\/TestUser",
  4. "definitions": {
  5. "GrandfatherType": {
  6. "required": [
  7. "family_name"
  8. ],
  9. "properties": {
  10. "family_name": {
  11. "type": "string"
  12. }
  13. },
  14. "additionalProperties": true,
  15. "type": "object"
  16. },
  17. "TestUser": {
  18. "required": [
  19. "some_base_property",
  20. "grand",
  21. "SomeUntaggedBaseProperty",
  22. "id",
  23. "name",
  24. "TestFlag",
  25. "age",
  26. "email"
  27. ],
  28. "properties": {
  29. "SomeUntaggedBaseProperty": {
  30. "type": "boolean"
  31. },
  32. "TestFlag": {
  33. "type": "boolean"
  34. },
  35. "age":{
  36. "maximum": 120,
  37. "minimum": 18,
  38. "exclusiveMaximum": true,
  39. "exclusiveMinimum": true,
  40. "type": "integer"
  41. },
  42. "email": {
  43. "type": "string",
  44. "format": "email"
  45. },
  46. "birth_date": {
  47. "type": "string",
  48. "format": "date-time"
  49. },
  50. "feeling": {
  51. "oneOf": [
  52. {
  53. "type": "string"
  54. },
  55. {
  56. "type": "integer"
  57. }
  58. ]
  59. },
  60. "friends": {
  61. "items": {
  62. "type": "integer"
  63. },
  64. "type": "array"
  65. },
  66. "grand": {
  67. "$schema": "http:\/\/json-schema.org\/draft-04\/schema#",
  68. "$ref": "#\/definitions\/GrandfatherType"
  69. },
  70. "id": {
  71. "type": "integer"
  72. },
  73. "name": {
  74. "type": "string",
  75. "maxLength": 20,
  76. "minLength": 1
  77. },
  78. "network_address": {
  79. "type": "string",
  80. "format": "ipv4"
  81. },
  82. "photo": {
  83. "type": "string",
  84. "media": {
  85. "binaryEncoding": "base64"
  86. }
  87. },
  88. "some_base_property": {
  89. "type": "integer"
  90. },
  91. "tags": {
  92. "patternProperties": {
  93. ".*": {
  94. "additionalProperties": true,
  95. "type": "object"
  96. }
  97. },
  98. "type": "object"
  99. },
  100. "website": {
  101. "type": "string",
  102. "format": "uri"
  103. }
  104. },
  105. "additionalProperties": true,
  106. "type": "object"
  107. }
  108. }
  109. }