hnOsmium0001

Resource schema v1

Jul 21st, 2020
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. type Field = Dictionary<[
  2. "type": TYPE_DICTIONARY,
  3. // When this doesn't exist, the Dictionary can hold anything
  4. optional "fields": Dictionary<[
  5. key: String, // Name of the field, regex
  6. value: Field, // Type constraint of the field
  7. ]>,
  8. optional "min_fields": int,
  9. optional "max_fields": int,
  10. "type": TYPE_ARRAY,
  11. // When this doesn't exist, the Array can hold anything
  12. optional "elements": Array<Field>,
  13. optional "min_elements": int,
  14. optional "max_elements": int,
  15. "type": TYPE_STRING,
  16. // When this doesn't exist, the String field can hold any string
  17. optional "enum": Array<String>,
  18. "type": TYPE_ENUM,
  19. "values": Dictionary<[
  20. key: String, // Name of the enum value
  21. value: Int, // Integer value of the enum value
  22. ]>,
  23. "type": TYPE_RESOURCE,
  24. "class": /path/to/resource/class
  25. "type": TYPE_INT,
  26. optional "min_value": Int,
  27. optional "max_value": Int,
  28. "type": TYPE_REAL,
  29. optional "min_value": Real,
  30. optional "max_value": Real,
  31. "type": TYPE_BOOL,
  32. ]>
Advertisement
Add Comment
Please, Sign In to add comment