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 resource schema that represents a Resource #115
Comments
Got a partial start here: https://gist.github.com/bf21229c7a1d6ae02884 Using the types / options schema data in that gist for another project, will update as I go. |
Remember auth... It should be part of a ressource definition to define roles for the different actions (cruds)? |
@raix In regards to your comment about the client: I'm currently working on making the RESTful ( request module ) and socketful ( socket.io ) engines isomorphic. see:
This means seamless client or server communication to an existing https://github.com/flatiron/restful or https://github.com/flatiron/socketful server. i.e, define a resource, get a client and a server Any help on either of these branches would be appreciated. They are both already mostly working ( with tests ). |
@raix - Also, for now, there is director-reflector, which will create JS client API for any Cheers! |
Ok, trying to grasp, so the restful Engine could run ón the client? (maybe the dB connection could default to restful engien if (window)/ ón client) Like to help, but just have to figure out the direction / the goal Sendt fra min iPad Den 02/09/2012 kl. 07.02 skrev Marak notifications@github.com:
|
Also interested by this and willing to help instead of writing my own logic.
|
invalid |
Currently, there is no easy way to enumerate all the possible configuration options of a Resource. We should have a schema that defines what a resource can be.
I recommend building the Resource resource using the resourceful API ( versus pure JSON-Schema ). You can always pull the JSON-Schema back out of resourceful using the
Resource.schema
field.The schema for a resource would define the following structure:
The last point is particularly important. For instance,
String
type has aformat
option that may beemail
.Number
hasmaximum
andminimum
options which expect numerical values. Currently, there is no programatic way to look this information up.Once we are able to easily reference this information as a schema / resource, resourceful can become "self-hosted" in the sense that we can use resourceful reflection tools ( restful / formful / socketful / commandful ) to create new Resource definitions dynamically.
The text was updated successfully, but these errors were encountered: