Skip to content

Key question-type examples by registry slug (keep old ids during a transition) #49

Description

@jstet

The survey site (CorrelAid/cdl-wp-eins, src/content/pages/fragetypen.mdx) embeds live examples via GET /api/examples/{type}. The example ids come from the Type: field in internal/examples/examples.go and form a second naming scheme next to the formtransform registry slugs that the converters, the generated cdl-survey-types skill and the DDI output use. Tracked on the site side in CorrelAid/cdl-wp-eins#30.

Proposal

Key examples by registry slug:

current example Type registry slug example's XLSForm type
single_choice select_one select_one bildungsgrad
single_choice_long_list select_one_long_list select_one_from_file iso_3166_1.csv
multiple_choice select_multiple select_multiple wochenendtage
multiple_choice_long_list select_multiple_long_list select_multiple_from_file iso_3166_1.csv
single_choice_other select_one_other select_one + _other text
multiple_choice_other select_multiple_other select_multiple + _other text
grid grid begin_group (table-list) + select_one
integer integer integer
text text text

Registry types without an example yet: decimal, range, date, time, note.

Transition

The site's QuestionTypeBlock shows "unavailable" when an id 404s, and the llm*.txt endpoints embed the examples at build time. So please serve both ids for a while (old ids as aliases of the slugs), then:

  1. qwacback serves the slugs (plus the old ids as aliases).
  2. The site switches its exampleIds to the slugs (Use registry slugs as question-type example ids (coordinate with qwacback) cdl-wp-eins#30).
  3. qwacback drops the aliases.

Does this direction work for you, or should the site keep its own ids?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions