Graphic question
Definitions
-
The coord type:
-
must be an object
-
must have an x property
-
must have an y property
-
The x property:
- must be a number
-
The y property:
- must be a number
-
-
The area type:
-
must be an object
-
must have an id property
-
must have a shape property
-
The id property:
- must be a string
-
The shape property:
- must be either “circle”, “rect” or “poly”
-
A “circle” area:
-
must have a center property
-
must have a radius property
-
The center property:
- must be of type coord
-
The radius property:
- must be a number
-
-
A “rect” or “poly” area:
-
must have a coords property
-
The coords property:
-
must be an array
-
Each coord:
-
must be of type coord
-
must be unique
-
-
-
-
A “rect” area:
- must have exactly 2 coords items
-
A “poly” area:
- must have at least 3 coords items
-
Schema
-
A graphic question:
-
must satisfy the base-question schema
-
must have an image property
-
must have a pointers property
-
may have a solutions property
-
-
The image property:
-
must have an id property
-
must have an url property
-
must have a width property
-
must have a height property
-
must be an object
-
-
the solutions property:
-
must be an array
-
must contain at least one solution
-
Each solution:
-
must be an object
-
must be unique
-
must have a score property
-
must have an area property
-
may have a feedback property
-
The area property:
- must be of type area
-
The score property:
- must be a number
-
The feedback property:
- must be a string
-
-