Asterisk as the first character for any parameter in RAML


#1

I have a datatype hostname which is defined as a string with a regex pattern of alphanumeric. In the raml, for a parameter, I have defined it as an array of hostname. But the regex is not being validated at the gateway for this API using the RAML. Another issue with this setup is that asterisk is working everywhere else except the first character. Did anyone face this issue and any thoughts to resolve this.

DataType Definition:
#%RAML 1.0 DataType
type: string
description: HostName
pattern: ^([A-Za-z0-9-*])+$

Type Declaration in main raml:
HostName: !include DataTypes/HostName.raml

Parameter defintion in the query parameter:
hostName?:
type: HostName[]


#2

MH, I haven’t seen a similar issue and I am also confused about the “gateway” you mentioned. What do you mean by that?


#3

I meant in the RAML deployed at the Gateway.


#4

May I ask you to be a little bit more precise with what Gateway you use.