mulesoft / osprey

Generate Node.JS API middleware from a RAML definition
Other
431 stars 66 forks source link

Pass annotation values to handler? #124

Open memelet opened 7 years ago

memelet commented 7 years ago

Is there anyway to pass annotation values to a handler? eg,

annotationTypes:
  permissions:
    type: string

/users:
  get:
    (permissions): 'foo:bar'
    queryParameters:
      sort:
        enum: [username, name]

The application middleware needs the required permissions value to validate against the JWT.

memelet commented 7 years ago

Hmm, from what I can tell the annotation types are parsed and added to 'raml' along with the resource definitions, but the actual annotation values are dropped on the floor. No?