Skip to content

Instantly share code, notes, and snippets.

@kevinobee
Created January 7, 2014 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinobee/8296203 to your computer and use it in GitHub Desktop.
Save kevinobee/8296203 to your computer and use it in GitHub Desktop.
Metadata
{
"actions": {
"GET": [
{
"FetchEntities": {
"returnType": "SitecoreCms.Models.SimpleData[]",
"properties": {}
}
},
{
"FetchEntity": {
"returnType": "SitecoreCms.Models.SimpleData",
"properties": {
"key": "id",
"datatype": "Guid"
}
}
}
],
"POST": {
"CreateEntity": {
"returnType": "void",
"properties": {
"key": "entity",
"datatype": "SitecoreCms.Models.SimpleData"
}
}
},
"PUT": {},
"DELETE": {}
},
"entity": {
"properties": [
{
"key": "Value",
"datatype": "string",
"validators": [
{
"validatorName": "regex",
"errorMessage": "Must be alphanumeric string",
"param": "[A-Za-z_][A-Za-z_0-9]*."
},
{
"validatorName": "required",
"errorMessage": "Value is required"
},
{
"validatorName": "email",
"errorMessage": "Value should be a an email address"
},
{
"validatorName": "string",
"errorMessage": "Must be less than 50 characters in length",
"param": [
0,
50
]
}
]
},
{
"key": "Id",
"datatype": "guid",
"validators": []
}
]
}
}
@dervalp
Copy link

dervalp commented Jan 7, 2014

{
    "actions": {
        "GET": [
            {
                "FetchEntities": {
                    "returnType": "SitecoreCms.Models.SimpleData[]",
                    "properties": {}
                }
            },
            {
                "FetchEntity": {
                    "returnType": "SitecoreCms.Models.SimpleData",
                    "properties": {
                        "key": "id",
                        "datatype": "Guid"
                    }
                }
            }
        ],
        "POST": {
            "CreateEntity": {
                "returnType": "void",
                "properties": {
                    "key": "entity",
                    "datatype": "SitecoreCms.Models.SimpleData"
                }
            }
        },
        "PUT": {},
        "DELETE": {}
    },
    "entity": {
        "key": "Id",
        "properties": [
            {
                "key": "Value",
                "datatype": "string",
                "validators": [
                    {
                        "validatorName": "regex",
                        "errorMessage": "Must be alphanumeric string",
                        "param": "[A-Za-z_][A-Za-z_0-9]*."
                    },
                    {
                        "validatorName": "required",
                        "errorMessage": "Value is required"
                    },
                    {
                        "validatorName": "email",
                        "errorMessage": "Value should be a an email address"
                    },
                    {
                        "validatorName": "string",
                        "errorMessage": "Must be less than 50 characters in length",
                        "param": [
                            0,
                            50
                        ]
                    }
                ]
            },
            {
                "key": "Id",
                "datatype": "guid",
                "validators": []
            }
        ]
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment