Valid resourceTypes RAML 1.0


#1

I was playing with resourceTypes and while I think this should work I was hoping for some clarification if this is valid. What I’m not sure about is can I use a parameter in the place of a referenced file.

resourceTypes:
  collection:
    get:
      responses:
        200:
          body:
            application/ld+json:
              type: <<resourcePathName | !uppercamelcase>>.Collection

uses:
  Course: !include libraries/types/course/course.raml

/course:
  type: collection
  get:
    description: Show the list of all subjects
    responses:
      200:
        body:
          application/ld+json:

#2

That might not be possible. I will double check for you and come back asap.

And BTW, it seems that you are overriding your definition of your resourceType in your resource. It should be enough to define the following:

resourceTypes:
  collection:
    get:
      responses:
        200:
          body:
            application/ld+json:

uses:
  Course: !include libraries/types/course/course.raml

/course:
  type: collection
  get:
    description: Show the list of all subjects