Skip to content

Conversation

@iamrajeshk
Copy link
Contributor

This pull request updates the quest definition schema and example data to version 3.0.0, introducing new question types, improved dependency handling, and stricter schema validation. The changes enhance the flexibility and robustness of quest definitions, allowing for more complex question structures and dependencies.

Schema enhancements and validation:

  • Updated both example.json and schema.json to version 3.0.0, reflecting significant schema changes. [1] [2]
  • Added additionalProperties: false to all major schema objects (Element, AnswerChoice, Question, etc.) for stricter validation and to prevent unexpected fields. [1] [2] [3] [4] [5]

Question types and answer choices:

  • Introduced new question types: MultipleChoice (select multiple options) and TextEntry (free-form text answers), with corresponding enum and documentation updates.
  • Updated schema to require quest_answer_choices only for non-TextEntry questions, using conditional validation logic.

Dependency handling improvements:

  • Added a dependency definition and updated quest_answer_dependency to support both single and multiple dependencies (AND logic), allowing questions to depend on multiple previous answers. [1] [2] [3] [4]

Example data updates:

  • Added two new example questions: one MultipleChoice question about sidewalk amenities and one TextEntry question for additional notes, demonstrating the new schema features.

Formatting and clarity:

  • Consolidated array formatting and examples for improved readability and consistency throughout the schema. [1] [2] [3] [4] [5] [6] [7]

Let me know if you'd like to discuss how to use the new dependency system or question types in your code!

Updated quest_answer_dependency to support single or list of dependencies.
Updated example.json file to support new additions
@iamrajeshk
Copy link
Contributor Author

Moved the changes to the existing PR #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants