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

fix(NOJIRA-123): fix Field.properties.fields type #49

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

nicolaslwilson
Copy link
Contributor

Description, Motivation and Context

Currently the type of field.properties.fields is any[][] -- I believe it should instead be any[] per the example in the API docs:

{
      "ref": "a_group_field_ref",
      "title": "group field",
      "type": "group",
      "properties": {
        "description": "Question group description",
        "show_button": true,
        "button_text": "Some text",
        "fields": [
          {
            "ref": "nice_readable_website_reference",
            "title": "website",
            "type": "website",
            "properties": {
              "description": "Cool description for the website"
            }
          }
        ]
      },

https://developer.typeform.com/create/reference/create-form/

Note, that the actual docs above in the link above specify the type of Field.properties.fields as array of array but I believe this is an error -- the shape of the example above is what I see in the actual JSON of my form when exported from Typeform.

Current type of field.properties.fields is `any[][]` -- I believe it should instead be `any[]` per the example in the API docs:

```
{
      "ref": "a_group_field_ref",
      "title": "group field",
      "type": "group",
      "properties": {
        "description": "Question group description",
        "show_button": true,
        "button_text": "Some text",
        "fields": [
          {
            "ref": "nice_readable_website_reference",
            "title": "website",
            "type": "website",
            "properties": {
              "description": "Cool description for the website"
            }
          }
        ]
      },
```

https://developer.typeform.com/create/reference/create-form/

Note, that the actual docs above the example specify the type of `Field.properties.fields` as `array of arrays` but I believe this is an error -- the shape of object above is what I see when in the actual JSON of my form when exported from Typeform.
@Thr44 Thr44 changed the title fix(types): fix Field.properties.fields type fix(NO-ISSUE): fix Field.properties.fields type Aug 31, 2023
@mathio mathio changed the title fix(NO-ISSUE): fix Field.properties.fields type fix(NOJIRA-123): fix Field.properties.fields type Oct 3, 2023
@mathio mathio merged commit c080d2a into Typeform:main Oct 3, 2023
4 of 8 checks passed
@mathio
Copy link
Contributor

mathio commented Oct 3, 2023

Thank you for the PR. Sorry for the delay 😅

@typeform-ops-gha
Copy link

🎉 This PR is included in version 1.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants