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

Schema validation - transformedContent should only be used when motivation is transformation #652

Closed
kathryn-ods opened this issue Apr 17, 2024 · 3 comments
Assignees

Comments

@kathryn-ods
Copy link
Contributor

kathryn-ods commented Apr 17, 2024

as discussed in https://docs.google.com/spreadsheets/d/1W7CE17BFjapN5N7EyIZjFtIPdf-aPMeUvYc5PDYNe04/edit#gid=256212369

@kathryn-ods kathryn-ods self-assigned this Apr 17, 2024
@kathryn-ods
Copy link
Contributor Author

kathryn-ods commented Apr 17, 2024

Currently the only way I can think to make this work within the schema is to assign it a contradictory type. This feels a bit dodgy but seems to work.

      "if": {
        "not": {
          "properties": {
            "motivation": {
              "const": "transformation"
            }
          }
        }
      },
      "then": {
        "properties": {
          "transformedContent":{
            "type": "boolean" 
          }
        }
      }

@kathryn-ods
Copy link
Contributor Author

@kd-ods

@kathryn-ods
Copy link
Contributor Author

kathryn-ods commented Apr 26, 2024

Actually we could try


 "if": {
        "not": {
          "properties": {
            "motivation": {
              "const": "transformation"
            }
          }
        }
      },
      "then": {
        "properties": {
          "transformedContent":{
            "const": ""
          }
        }
      }

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

No branches or pull requests

1 participant