Skip to content

Create styleguide #35

Description

@ruscoder

The language is flexible and allows getting the same result using different ways.
I'm not sure that we should enforce using the specific syntax now, but let's start from collecting best practices

Conditional logic for array

GOOD - if as array element, the undefined value will be cleared out automatically

extension:
  - "{% if ... %}":
      url: ... 

BAD - aidbox enforces extension to be a list (even on Mapping level) - although it worked in the past versions of aidbox

extension:
  "{% if ... %}":
    - url: ... 

BAD - it's generally wrong because we can not have multiple if's at object level

"{% if ... %}":
  extension:
    - url: ... 

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