Error: while validating baseUri (memberId) uri parameter unused


#1

I work for a company that uses Swagger YAML to describe their APIs. I want to make the case that they should start using RAML instead. I tried using a sample .yaml file and the YAML to RAML conversion tool (raml.org - projects), but I get parsing errors. Instead, I found an online utility to do the conversion (apitransformer.com). Now, I want to use the raml2html converter to demonstrate the documentation capabilities of RAML, but I get validation errors related to “URI parameter unused”. Below I have inserted a representative code snippet to describe the problem:

From the RAML file:

/{memberId}:
  /benefitaccumulators:
    uriParameters:
      **memberId:**
        description: FamilyMemberId identifying a member
        type: string
        required: true
        displayName: memberId
    get:
      displayName: V2MemberBenefitAccumulatorsGet
      description: Retreive a member's benefit accumulators
      responses:
        200:
          description: No accumulators available for this member
        401:
          description: Access token missing, invalid, expired
      headers:
        Authorization:
          description: Bearer access token from password oauth
          type: string
          required: true
          displayName: Authorization

The error occurs at the line shown in bold above (tagged by this interface as memberId: - but without the stars)

The Error:
Error: while validating baseUri (memberId) uri parameter unused

Does anyone here know what the problem may be?


#2

Not sure if that is supposed to work since you don’t define the uriParamete on the resource with the template URI itself. The following works for me:

/{memberId}:
  uriParameters:
    memberId:
      description: FamilyMemberId identifying a member
      type: string
      required: true
      displayName: memberId
  /benefitaccumulators:
    get:
      displayName: V2MemberBenefitAccumulatorsGet
      description: Retreive a member's benefit accumulators
      responses:
        200:
          description: No accumulators available for this member
        401:
          description: Access token missing, invalid, expired
      headers:
        Authorization:
          description: Bearer access token from password oauth
          type: string
          required: true
          displayName: Authorization