UNPKG

openapi-path-templating

Version:

OpenAPI Path Templating parser, validator, resolver and matcher.

10 lines 450 B
import { identifiers, utilities } from 'apg-lite'; const templateExpressionParamName = (state, chars, phraseIndex, phraseLength, data) => { if (state === identifiers.SEM_PRE) { data.push(['template-expression-param-name', utilities.charsToString(chars, phraseIndex, phraseLength)]); } else if (state === identifiers.SEM_POST) { /* not used in this example */ } return identifiers.SEM_OK; }; export default templateExpressionParamName;