Is this uses: key legal in this DataType document fragment?


#1

I’m using the API workbench for DataType fragment files and I’m not getting a validation error with this:

#%RAML 1.0 DataType
uses:
  Basic: ../library/basicTypes.raml
type: object
example: !include ../examples/newProviderSanction.json
properties:
  Clinic:
    type: !include clinicCollection.raml
    required: false
    description: |
      If present, this sanction is only applicable for the provider at this location.
  SanctionAgency:
    type: string
    required: true
    description: The name of the sanctioning agency
    example: OIGXZ
  SanctionCode:
    type: string
    required: true
    description: The part of the code violated resulting in the sanction
    example: Section 1128b8
  Effective: Basic.EffectivePeriod

In particular, is the uses keyword valid for this file fragment? The reason I’m asking is that a colleague is using a different tool and it’s failing validation for them. It’s obvious one of the tools is interpreting the specification incorrectly. It makes sense for us to be using the specification appropriately, so some guidance would be nice. I can then raise a bug for whomever is doing it wrong. I can reorganize the files to resolve it, but I think the specification document is a little light on details about file fragments which is where this confusion is stemming from.


#2

uses is valid in all fragments. what tool is your colleague using?


#3

Apparently it’s a Chrome plug-in called Restlet.
The error is described as:
Unexpected key ‘uses’. Options are : “additionalProperties” or “allowedTargets” or “default” or “description” or “discriminator” or “discriminatorValue” or “displayName” or “example” or “examples” or “facets” or “maxProperties” or “minProperties” or “properties” or “required” or “usage” or “xml” or /((.+))/ or Any of :“type”,"schema"
When attempting to parse the data type fragment file in the initial post.