Resource name is invalid: illegal character


#1

The API Designer (version something on 2015-01-01) reports

   Resource name is invalid: illegal character

when there is a hyphen in a uriParameter, e.g.

/bug{a-b}:
  uriParameters:
    a-b:
      enum: [ a-b ]

Quick fix: use underscores instead of hyphens.

Issues:

  • Hyphen is a legal YAML word character.
  • Hyphens are allowed in resource names.
  • Hyphen causes no problems in a uriParameter name.
  • The hyphen is in the template expression, not in the resource name.
  • The problem is that RFC 6570 does not allow hyphens in variable names.

Suggestions:

  • Change the error message to something like
    Invalid uriParameter name: illegal character '-'
  • Check the validity of uriParameter and baseUriParameter names.

#2

Hi @mjk. Happy New Year! I’ll repost your issue to our github repo for API-Designer. (see https://github.com/mulesoft/api-designer).