Skip to content

Conversation

@eshiota
Copy link
Collaborator

@eshiota eshiota commented Aug 26, 2025

Refactors the cycleThroughAttrsAndApplyValues implementation on json-logic with a more recursive-ish logic so that properties nested on allOf/anyOf/oneOf definitions are also parsed when x-jsf-logic-computedAttrs are resolved.

For instance, given the following property:

'temperature_setting': {
  'title': 'Select a preset temperature',
  'type': 'string',
  'oneOf': [
    {
      'title': 'Low',
      'const': 18,
    },
    {
      'title': 'Medium',
      'const': 20,
    },
    {
      'title': 'Maximum',
      'x-jsf-logic-computedAttrs': {
        'const': 'maximum_temperature',
      },
    },
  ],
},

the const on the last item of the property's oneOf will be properly parsed with the computed value.

Also fixes the dev version release script.

@eshiota eshiota force-pushed the feat-support-nested-computed-attrs branch from 85b969d to c6847ae Compare August 27, 2025 13:42
sandrina-p
sandrina-p previously approved these changes Aug 27, 2025
lukad
lukad previously approved these changes Aug 28, 2025
@eshiota eshiota dismissed stale reviews from lukad and sandrina-p via 4008b9e August 28, 2025 12:44
@eshiota eshiota requested review from lukad and sandrina-p August 28, 2025 14:28
@eshiota eshiota merged commit 4375598 into main Aug 28, 2025
5 checks passed
@eshiota eshiota deleted the feat-support-nested-computed-attrs branch August 28, 2025 15:23
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.

4 participants