Release Notes

0.8.7

Question resource

Question translation resource

0.7.7

Question-category relations updated

A question can be associated with a set of categories using the categories relationship. The main_category relationship links a question with its main category. Note: The main category is in the set of categories.

"relationships": {
  "categories": {
    "data": [
      {
        "id": "1",
        "type": "categories"
      },
      ...
    ]
  },
  ...
}

Two routes exist to query questions by category and categories by question respectively.

0.7.6

Added description field to categories

The description field is optional and is unset by default.

0.7.5

Database connection pool size

Reduced size of database connection pool to 1 to avoid errors on concurrent requests.

Fixed PATCH /answers/#AnswerId

Fixed handler for answer patches. The error prevented relationships to be patched.

0.7.4

Fixed typo

Included answer contents on GET /answer_translations now show the correct type.

0.7.3

Filter on answer translations

Note: Filtering is applied on the translation field.

Include answer contents with answer translations

The collection endpoints for answer translations now include answer contents.

Added shuffle attribute to question model

The shuffle attribute indicates whether answers should be sorted randomly or by their ordinal in a quiz session.

0.7.2

Forbid clients from deleting locales

Clients are not allowed to delete locales. We consider the deletion of locales very dangerous (cascading deletes will delete all corresponding question and answer translations) and rarely useful.

Basic filtering on /answer_contents endpoint

The value of the query parameter filter will be used to filter on the disambiguation field using the SQL LIKE filter.

Example: The query GET /answer_contents?filter=alex will return answer contents where the value of disambiguation contains the string alex, i.e. it performs a query like

SELECT * FROM answer_content WHERE disambiguation LIKE '%alex%';  .

Please note that the syntax for the filter parameter is very likely to change in the future.

0.7.1

Fixed default delete handler

The actual deletion action was missing. Note: There is still a bad error message, when trying to delete an entity that is referenced in a foreign key field, such as a locale that is in use.

{
  "errors": [
    {
      "title": "internal server error",
      "detail": "SQLite3 returned ErrorConstraint while attempting to perform step: FOREIGN KEY constraint failed"
    }
  ]
}

Here a decision has to be made whether to perform cascading deletes for all entities or not.

0.7

Updated locales

Added display name field to locale model.

The server now returns codes like en in the language code field instead of the language names. The ISO-639-1 standard is used for language codes.

Handlers for

were implemented to allow the client to edit locales. Note: The server currently only accepts language codes en and de and literals Metric and Imperial for units. This restriction is easily removed if needed in the future.

Better error messages

The handlers for locale entities have improved error messages, including meaningful 400 responses when unique constraints are violated.

0.6

Locales

The language model is replaced by the locale model. Language codes and units are no longer separate entities, but literal attributes of the locale model. Locales are stored as database entities.

0.5

New schema

Models:

A question now refers to an answer set, allowing for multiple questions to refer to the same answer set, effectively enabling question variants. The answers refer to answer contents, which refer to answer translations. An answer content represents some general entity that can be referred to by multiple answers, this enables sharing of answers and their translations as well as allowing an answer content to appear as both correct and wrong in answer sets. The answer content has a disambiguation attribute to enable distinction of entities that share the same name, e.g. Tesla, the car company, or Tesla, the electrical engineer.

Category hierarchy

Questions can now be categorized. A category has a name and an optional parent category. A question may be associated with multiple categories.

0.4.2

Missing release notes

0.4.1

Docker image

Note: The web server setup is very likely to change in the future.

0.4

Categories

Implemented routes for categories:

Categories have a single name attribute and an optional to-one relationship parent_category to a parent category. If the relationships is not set for a category, the category is a top-level category.

Units and Language Codes

Implemented routes for units and language codes.

Fixes

0.3.1

0.3