-
Notifications
You must be signed in to change notification settings - Fork 0
feat(oas) : Allows admin to specify tag stats when creating/updating #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Non breaking changes found between the two specifications: {
"breakingDifferencesFound": false,
"nonBreakingDifferences": [
{
"type": "non-breaking",
"action": "add",
"code": "request.body.scope.add",
"destinationSpecEntityDetails": [
{
"location": "paths./api/create_exercise.post.requestBody.content.application/json.schema",
"value": {
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
}
}
],
"entity": "request.body.scope",
"source": "json-schema-diff",
"sourceSpecEntityDetails": [
{
"location": "paths./api/create_exercise.post.requestBody.content.application/json.schema",
"value": {
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"allOf": [
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
},
{
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"NOT_VALIDATED",
"VALIDATED",
"DEPRECATED",
"PENDING"
],
"example": "DEPRECATED",
"description": "Status of the tag into the system. Currently, 4 states are possibles : \n\n1. NOT_VALIDATED : When a tag is officially not recognized \n2. PENDING : The default state ( for example when an exercise is inserted into the system) \n3. DEPRECATED : When a tag should not be used anymore \n4. VALIDATED : When a tag is officially recognized \n"
}
}
}
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
}
}
],
"details": {
"differenceSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"state": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"text": {
"type": "string"
},
"category_id": {
"type": "integer"
}
},
"required": [
"text",
"category_id"
]
},
"maxItems": 25,
"minItems": 3,
"not": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"category_id": {
"type": "integer"
},
"state": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"category_id",
"text"
]
}
}
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"tags",
"title"
]
}
}
},
{
"type": "non-breaking",
"action": "add",
"code": "request.body.scope.add",
"destinationSpecEntityDetails": [
{
"location": "paths./api/exercises/{id}.put.requestBody.content.application/json.schema",
"value": {
"allOf": [
{
"allOf": [
{
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
},
{
"type": "object",
"properties": {
"version": {
"type": "integer",
"description": "The version of this exercise (optimistic lock)",
"minimum": 0,
"example": 42
}
},
"required": [
"version"
]
}
]
},
{
"type": "object",
"properties": {
"removePreviousFile": {
"type": "boolean",
"default": false,
"example": true,
"description": "If set to true, the API will delete the previous file when updating the exercise"
}
}
}
]
}
}
],
"entity": "request.body.scope",
"source": "json-schema-diff",
"sourceSpecEntityDetails": [
{
"location": "paths./api/exercises/{id}.put.requestBody.content.application/json.schema",
"value": {
"allOf": [
{
"allOf": [
{
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"allOf": [
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
},
{
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"NOT_VALIDATED",
"VALIDATED",
"DEPRECATED",
"PENDING"
],
"example": "DEPRECATED",
"description": "Status of the tag into the system. Currently, 4 states are possibles : \n\n1. NOT_VALIDATED : When a tag is officially not recognized \n2. PENDING : The default state ( for example when an exercise is inserted into the system) \n3. DEPRECATED : When a tag should not be used anymore \n4. VALIDATED : When a tag is officially recognized \n"
}
}
}
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
},
{
"type": "object",
"properties": {
"version": {
"type": "integer",
"description": "The version of this exercise (optimistic lock)",
"minimum": 0,
"example": 42
}
},
"required": [
"version"
]
}
]
},
{
"type": "object",
"properties": {
"removePreviousFile": {
"type": "boolean",
"default": false,
"example": true,
"description": "If set to true, the API will delete the previous file when updating the exercise"
}
}
}
]
}
}
],
"details": {
"differenceSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"removePreviousFile": {
"type": "boolean"
},
"state": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"text": {
"type": "string"
},
"category_id": {
"type": "integer"
}
},
"required": [
"text",
"category_id"
]
},
"maxItems": 25,
"minItems": 3,
"not": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"category_id": {
"type": "integer"
},
"state": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"category_id",
"text"
]
}
}
},
"title": {
"type": "string"
},
"url": {
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [
"tags",
"title",
"version"
]
}
}
},
{
"type": "non-breaking",
"action": "add",
"code": "request.body.scope.add",
"destinationSpecEntityDetails": [
{
"location": "paths./api/bulk/create_exercises.post.requestBody.content.application/json.schema",
"value": {
"type": "array",
"minItems": 1,
"items": {
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
}
}
}
],
"entity": "request.body.scope",
"source": "json-schema-diff",
"sourceSpecEntityDetails": [
{
"location": "paths./api/bulk/create_exercises.post.requestBody.content.application/json.schema",
"value": {
"type": "array",
"minItems": 1,
"items": {
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"allOf": [
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
},
{
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"NOT_VALIDATED",
"VALIDATED",
"DEPRECATED",
"PENDING"
],
"example": "DEPRECATED",
"description": "Status of the tag into the system. Currently, 4 states are possibles : \n\n1. NOT_VALIDATED : When a tag is officially not recognized \n2. PENDING : The default state ( for example when an exercise is inserted into the system) \n3. DEPRECATED : When a tag should not be used anymore \n4. VALIDATED : When a tag is officially recognized \n"
}
}
}
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
}
}
}
],
"details": {
"differenceSchema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"state": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"text": {
"type": "string"
},
"category_id": {
"type": "integer"
}
},
"required": [
"text",
"category_id"
]
},
"maxItems": 25,
"minItems": 3
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"tags",
"title"
]
},
"minItems": 1,
"not": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"state": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"category_id": {
"type": "integer"
},
"state": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"category_id",
"text"
]
},
"maxItems": 25,
"minItems": 3
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"tags",
"title"
]
}
}
}
}
}
],
"unclassifiedDifferences": []
}
|
Codecov Report
@@ Coverage Diff @@
## master #91 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 69 69
Lines 1202 1223 +21
Branches 178 185 +7
=========================================
+ Hits 1202 1223 +21
Continue to review full report at Codecov.
|
|
Non breaking changes found between the two specifications: {
"breakingDifferencesFound": false,
"nonBreakingDifferences": [
{
"type": "non-breaking",
"action": "add",
"code": "request.body.scope.add",
"destinationSpecEntityDetails": [
{
"location": "paths./api/create_exercise.post.requestBody.content.application/json.schema",
"value": {
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
}
}
],
"entity": "request.body.scope",
"source": "json-schema-diff",
"sourceSpecEntityDetails": [
{
"location": "paths./api/create_exercise.post.requestBody.content.application/json.schema",
"value": {
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"allOf": [
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
},
{
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"NOT_VALIDATED",
"VALIDATED",
"DEPRECATED",
"PENDING"
],
"example": "DEPRECATED",
"description": "Status of the tag into the system. Currently, 4 states are possibles : \n\n1. NOT_VALIDATED : When a tag is officially not recognized \n2. PENDING : The default state ( for example when an exercise is inserted into the system) \n3. DEPRECATED : When a tag should not be used anymore \n4. VALIDATED : When a tag is officially recognized \n"
}
}
}
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
}
}
],
"details": {
"differenceSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"state": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"text": {
"type": "string"
},
"category_id": {
"type": "integer"
}
},
"required": [
"text",
"category_id"
]
},
"maxItems": 25,
"minItems": 3,
"not": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"category_id": {
"type": "integer"
},
"state": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"category_id",
"text"
]
}
}
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"tags",
"title"
]
}
}
},
{
"type": "non-breaking",
"action": "add",
"code": "request.body.scope.add",
"destinationSpecEntityDetails": [
{
"location": "paths./api/exercises/{id}.put.requestBody.content.application/json.schema",
"value": {
"allOf": [
{
"allOf": [
{
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
},
{
"type": "object",
"properties": {
"version": {
"type": "integer",
"description": "The version of this exercise (optimistic lock)",
"minimum": 0,
"example": 42
}
},
"required": [
"version"
]
}
]
},
{
"type": "object",
"properties": {
"removePreviousFile": {
"type": "boolean",
"default": false,
"example": true,
"description": "If set to true, the API will delete the previous file when updating the exercise"
}
}
}
]
}
}
],
"entity": "request.body.scope",
"source": "json-schema-diff",
"sourceSpecEntityDetails": [
{
"location": "paths./api/exercises/{id}.put.requestBody.content.application/json.schema",
"value": {
"allOf": [
{
"allOf": [
{
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"allOf": [
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
},
{
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"NOT_VALIDATED",
"VALIDATED",
"DEPRECATED",
"PENDING"
],
"example": "DEPRECATED",
"description": "Status of the tag into the system. Currently, 4 states are possibles : \n\n1. NOT_VALIDATED : When a tag is officially not recognized \n2. PENDING : The default state ( for example when an exercise is inserted into the system) \n3. DEPRECATED : When a tag should not be used anymore \n4. VALIDATED : When a tag is officially recognized \n"
}
}
}
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
},
{
"type": "object",
"properties": {
"version": {
"type": "integer",
"description": "The version of this exercise (optimistic lock)",
"minimum": 0,
"example": 42
}
},
"required": [
"version"
]
}
]
},
{
"type": "object",
"properties": {
"removePreviousFile": {
"type": "boolean",
"default": false,
"example": true,
"description": "If set to true, the API will delete the previous file when updating the exercise"
}
}
}
]
}
}
],
"details": {
"differenceSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"removePreviousFile": {
"type": "boolean"
},
"state": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"text": {
"type": "string"
},
"category_id": {
"type": "integer"
}
},
"required": [
"text",
"category_id"
]
},
"maxItems": 25,
"minItems": 3,
"not": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"category_id": {
"type": "integer"
},
"state": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"category_id",
"text"
]
}
}
},
"title": {
"type": "string"
},
"url": {
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [
"tags",
"title",
"version"
]
}
}
},
{
"type": "non-breaking",
"action": "add",
"code": "request.body.scope.add",
"destinationSpecEntityDetails": [
{
"location": "paths./api/bulk/create_exercises.post.requestBody.content.application/json.schema",
"value": {
"type": "array",
"minItems": 1,
"items": {
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
}
}
}
],
"entity": "request.body.scope",
"source": "json-schema-diff",
"sourceSpecEntityDetails": [
{
"location": "paths./api/bulk/create_exercises.post.requestBody.content.application/json.schema",
"value": {
"type": "array",
"minItems": 1,
"items": {
"allOf": [
{
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "A Super Exercise",
"minLength": 3,
"maxLength": 100,
"description": "The title of this exercise"
},
"description": {
"type": "string",
"maxLength": 5000,
"example": "...",
"description": "The preamble of this exercise",
"default": ""
}
},
"required": [
"title"
]
},
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"description": "A Tag ID ( already existent in database )"
},
{
"allOf": [
{
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "easy",
"minLength": 1,
"maxLength": 100,
"description": "The text of this Tag"
},
"category_id": {
"type": "integer",
"minimum": 0,
"example": 42,
"description": "the category id to which this tag is related"
}
},
"required": [
"text",
"category_id"
]
},
{
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"NOT_VALIDATED",
"VALIDATED",
"DEPRECATED",
"PENDING"
],
"example": "DEPRECATED",
"description": "Status of the tag into the system. Currently, 4 states are possibles : \n\n1. NOT_VALIDATED : When a tag is officially not recognized \n2. PENDING : The default state ( for example when an exercise is inserted into the system) \n3. DEPRECATED : When a tag should not be used anymore \n4. VALIDATED : When a tag is officially recognized \n"
}
}
}
]
}
]
},
"description": "Mixed array that contains existent tag(s) or not",
"uniqueItems": true,
"minItems": 3,
"maxItems": 25
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/[^\\s$.?#].[^\\s]*$",
"example": "https://inginious.info.ucl.ac.be/course/LEPL1402/Streams",
"nullable": true,
"description": "If not null, the link to the exercise on a plateform"
},
"state": {
"type": "string",
"enum": [
"DRAFT",
"PENDING",
"VALIDATED",
"NOT_VALIDATED",
"ARCHIVED"
],
"example": "PENDING",
"description": "Status of the exercise into the system. Currently, 5 states are possibles :\n\n1. DRAFT : The default state (for example when an exercise is inserted into the system)\n2. PENDING : When an exercise is ready for review\n3. VALIDATED : When an exercise is validated by an admin\n4. NOT_VALIDATED : When an exercise is refused by an admin\n5. ARCHIVED : When an exercise is archived / soft deleted\n"
}
},
"required": [
"tags"
]
}
]
}
}
}
],
"details": {
"differenceSchema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"state": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"text": {
"type": "string"
},
"category_id": {
"type": "integer"
}
},
"required": [
"text",
"category_id"
]
},
"maxItems": 25,
"minItems": 3
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"tags",
"title"
]
},
"minItems": 1,
"not": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"state": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": [
"integer",
"object"
],
"properties": {
"category_id": {
"type": "integer"
},
"state": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"category_id",
"text"
]
},
"maxItems": 25,
"minItems": 3
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"tags",
"title"
]
}
}
}
}
}
],
"unclassifiedDifferences": []
}
|
Fixes #90