What standard (if any) is the JSON definition/schema generat

Posted by Adam Erickson on 02-Mar-2016 10:15

What standard (if any) is the JSON definition/schema generated from an OE REST Adapter?  I'd like to use it to generate documentation via Swagger, Apiary or similar.  I don't see that it matches any standard, but maybe it's just one I don't know.

Here's a snippet of the generated JSON.  It's not Swagger.  It validates with JSON-Schema, but isn't an API definition standard that I've come across.  

{
    "version": "1.2",
    "lastModified": "Fri Feb 26 08:23:26 CST 2016",
    "services": [{
        "name": "CRMService",
        "address": "\/rest\/RMService",
        "useRequest": true,
        "resources": [
            {
                "name": "UserDfltsPod",
                "path": "\/UserDfltsPod",
                "autoSave": true,
                "schema": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {"a_userdfltspodds": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {"a_userdfltspod": {
                            "type": "array",
                            "primaryKey": ["user_id"],
                            "items": {
                                "additionalProperties": false,
                                "properties": {
                                    "_id": {"type": "string"},
                                    "_errorString": {"type": "string"},
                                    "user_id": {
                                        "type": "string",
                                        "ablType": "CHARACTER",
                                        "default": "",
                                        "title": "User ID"
                                    },
                                    "route_tab": {
                                        "type": "boolean",
                                        "ablType": "LOGICAL",
                                        "default": false,
                                        "title": "Allow Route Tab"
                                    },
                                    "dispatch_tab": {
                                        "type": "boolean",
                                        "ablType": "LOGICAL",
                                        "default": false,
                                        "title": "Allow Dispatch Tab"
                                    },
                                    "tran_tab": {
                                        "type": "boolean",
                                        "ablType": "LOGICAL",
                                        "default": false,
                                        "title": "Allow Tran Tab"
                                    },
                                    "default_branch_id": {
                                        "type": "string",
                                        "ablType": "CHARACTER",
                                        "default": "",
                                        "title": "Default Branch ID"
                                    },
                                    "avail_branch_list": {
                                        "type": "string",
                                        "ablType": "CHARACTER",
                                        "default": "",
                                        "title": "Available Branch List"
                                    }
                                }
                            }
                        }}
                    }}
                },
                "operations": [
                    {
                        "path": "",
                        "useBeforeImage": false,
                        "type": "update",
                        "verb": "put",
                        "params": [{
                            "name": "a_userdfltspodds",
                            "type": "REQUEST_BODY"
                        }]
                    },
                    { [...trimmed off for brevity ...]

Posted by Peter Judge on 02-Mar-2016 10:28

The JSON Catalog is its formal name. There's a spec/description on https://github.com/CloudDataObject/CDO .
 

All Replies

Posted by Peter Judge on 02-Mar-2016 10:28

The JSON Catalog is its formal name. There's a spec/description on https://github.com/CloudDataObject/CDO .
 

Posted by egarcia on 02-Mar-2016 12:50

Hello,

I wanted to highlight that on the CDO project in GitHub you can find a JSON Schema file for validating the JSDO Catalog.

I hope this helps.

This thread is closed