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

Create and apply validation for profile schema #325

Open
xmnlab opened this issue Oct 27, 2024 · 5 comments
Open

Create and apply validation for profile schema #325

xmnlab opened this issue Oct 27, 2024 · 5 comments
Labels

Comments

@xmnlab
Copy link
Member

xmnlab commented Oct 27, 2024

No description provided.

@YurelyCamacho
Copy link
Collaborator

@xmnlab Could you give me more information about this issue and if you can add the size label, please.

@xmnlab xmnlab added the size:~5h <=5h label Nov 20, 2024
@xmnlab
Copy link
Member Author

xmnlab commented Nov 20, 2024

osl-incubator/makim#122

@xmnlab
Copy link
Member Author

xmnlab commented Nov 20, 2024

osl-incubator/sugar#131

@xmnlab
Copy link
Member Author

xmnlab commented Nov 20, 2024

Idea inicial:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "patternProperties": {
    ".*": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "help": {
          "type": "string",
          "format": "uri"
        },
        "type": {
          "type": "string",
          "enum": ["text", "single-choice", "multiple-choices"]
        },
        "default": {
          "type": ["string", "boolean", "number", "null"]
        },
        "visible": {
          "type": ["boolean", "string", "object"]
        },
        "choices": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "depends_on": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

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

No branches or pull requests

2 participants