Skip to content
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

JSON schema generatie van formulier #4923

Open
joeridiederen opened this issue Dec 16, 2024 · 2 comments
Open

JSON schema generatie van formulier #4923

joeridiederen opened this issue Dec 16, 2024 · 2 comments
Labels
epic Large theme and/or meta issue owner: dimpact waiting for approval An estimate was made but the stakeholder still needs to approve it.

Comments

@joeridiederen
Copy link

joeridiederen commented Dec 16, 2024

Thema / Theme

Frontend

Omschrijving / Description

This RFC proposes a new functionality within Open Forms that automatically generates a comprehensive JSON schema from a form as soon as an administrator chooses to.

The generated schema should include all fields, field types, validation rules, and requirements derived from the form’s configuration. By making this schema-generator readily available, administrators and non-technical colleagues can ensure both the integrity and correctness of submitted data without requiring additional manual work or custom scripts.

This JSON schema functions as a stable, version-controlled “contract” that clearly documents the structure, constraints, and intended uses of the data. It is not merely a technical artifact, but also a critical piece of documentation that can be shared across various components in the chain—such as chat bot or scan applications, case and task management systems, and even future channels. By leveraging the schema, no single party can unilaterally introduce changes without understanding their impact on the entire ecosystem (informatieketen). As a result, errors and misunderstandings are reduced, while predictability and stability in data exchange are enhanced.

Added value / Toegevoegde waarde

  • Automatically generating a JSON schema ensures that validation criteria are established at the outset, eliminating the need for manual schema creation or external validation steps.
  • Treating the schema as a contract ensures no party makes unilateral changes without evaluating their impact. Predictability and stability in the data exchange ecosystem are thus significantly increased.
  • The schema clearly documents all fields, their purposes, and usage contexts. This enhances communication among various stakeholders, including non-technical teams, external application providers, and future integration partners.
  • The well-defined schema can be retrieved by multiple external applications or channels. This simplifies “slot filling” in self-service portals, chatbots, or mobile apps, and supports data-driven document generation, reporting, or RPA integrations.

Aanvullende opmerkingen / Additional context

The solution extracts metadata directly from the form’s configuration (field definitions, validations, required fields, etc.) and translates it into a standardized JSON schema (following standard JSON Schema specifications).

Once generated and (manually?) embedded in the Objecttypes API, the schema stands as a stable contract. Any modifications require careful deliberation and agreement among all parties, ensuring responsible change management.

@joeridiederen joeridiederen added enhancement triage Issue needs to be validated. Remove this label if the issue considered valid. labels Dec 16, 2024
@sergei-maertens
Copy link
Member

Excellent suggestion :) there is some overlap here with #4908

@sergei-maertens sergei-maertens added owner: dimpact and removed triage Issue needs to be validated. Remove this label if the issue considered valid. labels Dec 16, 2024
@sergei-maertens
Copy link
Member

sergei-maertens commented Dec 16, 2024

Estimate: 5 weeks - there is overlap with #2324

The goal of this is to minimize the manual actions needed afterwards and take into account various component options like multiple: false | true, so ideally no manual editing is needed anymore afterwards.

@sergei-maertens sergei-maertens added the waiting for approval An estimate was made but the stakeholder still needs to approve it. label Dec 16, 2024
@joeribekker joeribekker added the epic Large theme and/or meta issue label Dec 17, 2024
@joeribekker joeribekker changed the title Automated generation of JSON schema from form JSON schema generatie van formulier Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Large theme and/or meta issue owner: dimpact waiting for approval An estimate was made but the stakeholder still needs to approve it.
Projects
Status: Todo
Development

No branches or pull requests

3 participants