Hi,

you don't need to use joi in that case if you don't want it.

The `response` method is documented here:

https://docs.arangodb.com/3.1/Manual/Foxx/Router/Endpoints.html#response

> the actual schema will not be used to validate the response body and only 
serves to document the response in more detail in the API documentation

The template string syntax is a recent addition to the JavaScript language 
(introduced in ECMAScript 2015, also called ES6);

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

Cheers,

Alan

On Friday, 2 June 2017 16:33:17 UTC+2, Arangogo wrote:
>
>
>
> Alright, so we need to wrap up our query in a function as in :
>
>
> const aql = require('@arangodb').aql;
>
> router.get('/entries', function (req, res) {
>   const keys = db._query(aql`
>     FOR entry IN ${foxxColl}
>     RETURN entry._key
>   `);
>   res.send(keys);
> })*.response(joi.array().items(
>   joi.string().required()*
> ).required(), 'List of entry keys.')
> .summary('List entry keys')
> .description('Assembles a list of keys of entries in the collection.');
>
> Why do we need to joi filter the output ?
>
>
> Also could you explain this syntax
>
> *`Hello ${req.pathParams.name <http://req.pathParams.name>}` *
>
> from 
>
> *const joi = require('joi');
>
> router.get('/hello/:name', function (req, res) {
>   res.send(`Hello ${req.pathParams.name <http://req.pathParams.name>}`);
> })*
>
>
> $ in this too :
>
>  
>
> *${foxxColl}*
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to