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

get view definition #3

Open
qwesda opened this issue Aug 20, 2014 · 4 comments
Open

get view definition #3

qwesda opened this issue Aug 20, 2014 · 4 comments
Assignees
Labels

Comments

@qwesda
Copy link

qwesda commented Aug 20, 2014

GET "/invoices/_definition"

{
  "columns" : {
    "gdid"            : {"type" : "int", "isPrimaryKey" : true, "sortable" : true, "filterable" : true},
    "status"          : {"type" : "enum", "filterable" : true},
    "contact"         : {"type" : "json", "filterable" : true},

    "total"           : {"type" : "money", "sortable" : true, "filterable" : true },
    "date_due"        : {"type" : "date",  "sortable" : true, "filterable" : true },
    "date_payment"    : {"type" : "date",  "sortable" : true, "filterable" : true },

    "account_number"  : {"type" : "text", "filterable" : true},
    "bank_code"       : {"type" : "text", "filterable" : true},
    "IBAN"            : {"type" : "text", "filterable" : true},
    "BIC"             : {"type" : "text", "filterable" : true},
    "name"            : {"type" : "text", "filterable" : true},
    "label"           : {"type" : "text", "filterable" : true},
  }
}
@ibotty ibotty self-assigned this Aug 20, 2014
@qwesda qwesda added the feature label Aug 21, 2014
@ibotty
Copy link
Member

ibotty commented Oct 10, 2014

implemented with a different format. as the list of columns might be different for every action, it uses the following format. still missing is filterable, sortable, etc.

{
    "path": "/invoices/:invoices_id",
    "list": {
        "allowed": [
            "name", 
            "date_due", 
            "label", 
            "bic", 
            "iban", 
            "account_number", 
            "bank_code", 
            "total", 
            "date", 
            "date_due", 
            "date_payment", 
            "status", 
            "contact"
        ]
    }, 
    "primary_key": [
        "gdid"
    ], 
    "read": {
        "allowed": [
            "name", 
            "date_due", 
            "label", 
            "bic", 
            "iban", 
            "account_number", 
            "bank_code", 
            "total", 
            "date", 
            "date_due", 
            "date_payment", 
            "status", 
            "contact", 
            "positions"
        ]
    }
}

@ibotty
Copy link
Member

ibotty commented Oct 10, 2014

oh, it is under /invoices/_document. that is likely to change to support documentation for multi-column pks...

what about /_definition/ and just list all the resource definitons there?

@qwesda
Copy link
Author

qwesda commented Oct 11, 2014

/_definition is fine by me

Daniel Schwarz [email protected]
http://pgp.mit.edu/pks/lookup?op=get&search=0x1586760D7DBEDE3F

On 10 Oct 2014, at 17:10, Tobias Florek [email protected] wrote:

oh, it is under /invoices/_document. that is likely to change to support documentation for multi-column pks...

what about /_definition/ and just list all the resource definitons there?


Reply to this email directly or view it on GitHub.

@ibotty
Copy link
Member

ibotty commented Oct 14, 2014

summarizing the phone call, we have below _meta/definition a e.g. the following json.

{
  "shops": {
    "path": "/shops/:shops_id",
    "primary key": ["shops_id"],
    "read": {
      "shops_id": { "type": "unspecified" },
      ...
    },
    "list": {
      "shops_id": { "type": "unspecified", "sortable": true, "filerable": true },
      ...
    },
    "subresources": {
      "release_formats" : { format as seen above }
    }
  }
}   

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