#%RAML 1.0
title: test-api
mediaType: application/json
baseUri: ...
types:
code:
type: string
pattern: ^[A-Z\-]+$
minLength: 3
maxLength: 50
/contracts:
get:
queryParameters:
lab_code: code
institutution_code: code
active: boolean

Validation appears to work correctly if I switch to using inline type declarations:
/contracts:
get:
queryParameters:
lab_code:
type: string
pattern: ^[A-Z\-]+$
minLength: 3
maxLength: 50