To enter this kind of data manually I'd look at YAML, which can be
converted to JSON as needed.

I'd be cautious using clones to sync. data / resources across a
project.  Edward uses clones for the specific case of managing views of
code within Leo, which they do well, although there are alternatives.
For sharing data across a project that's distinct from Leo I'd look at
some sort of scripting / templating solution like jinja2 or whatever's
appropriate to what you're doing.

Cheers -Terry

On Tue, 13 Mar 2018 06:41:06 -0700 (PDT)
drmikecrowe <drmikecr...@gmail.com> wrote:

> I have a lot of configuration that must be defined as a Javascript
> object (or JSON).  I'm trying to decide on the best way to enter it
> into Leo.
> 
> Example:
> 
> {
>  accepts: [
>  {arg: 'id', required: true, type: 'String', description: 'User ID'},
>  {arg: 'req', type: 'object', required: true, http: {source: 'req'}}
>  ],
>  returns: {arg: 'results', type: 'object', root: true},
>  http:    {verb: 'post', path: '/:id/unsubscribe'}
> }
> 
> Is there a good way of managing this in Leo?  From a documentation
> point of view, I tend to think about it as follows:
> 
>    - POST /id:/unsubscribe
>       - accepts:
>          - id: String (maybe put the definition in the body?)
>          - req: Object
>       - returns:
>          - results: Object
>       
> Another example is the data definition for a model, such as:
> 
> "properties": {
>   "firstName": {
>     "type": "String", 
>     "required": "true"
>   },
>   "id": {
>     "type": "Number", 
>     "id": true, 
>     "description": "User ID"},
> 
> 
> I'm wondering if there's a way to build this JSON object via Leo, and 
> somehow use clones to keep the data synchronized across different
> services within the project
> 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to