gravitee-docs icon indicating copy to clipboard operation
gravitee-docs copied to clipboard

Expression language documentation

Open mouligno opened this issue 3 years ago • 1 comments

As we support some conditions on Expression Language, we should get them in the documentation and provide some examples.

For example : {#request.uri.contains('swagger') || #request.method=='OPTIONS'}

--

We should also list all objects accessible through EL, for example api

--

{#request.path.matches('.*/vm/([A-Za-z0-9]){1}') && #request.method != 'DELETE'} The previous expression throws an exception during evaluation due to inner { in expression. It's currently not possible to use { or } in expression language condition.

This one should work

{#request.path.matches('.*/vm/([A-Za-z0-9]+)?') && #request.method != 'DELETE'}

--

Example ideas

  • xpath example to access token (zdsk 3283)
  • jsonpath

mouligno avatar Nov 30 '21 08:11 mouligno

Current EL info is here: https://docs.gravitee.io/apim/3.x/apim_publisherguide_expression_language.html Note that it is currently buried in APIM documentation, but applies to AM too -- a place needs to be created for it at the top level of the information architecture, along with other reference doc such as API references (see information architecture of proposed Jekyll site in doxy-project branch for details)

plsstephenson avatar Jan 28 '22 17:01 plsstephenson