RAML Data Type Issue


#1

I am attempting to take advantage of RAML and its functionality. I cannot seem to figure out why I am receiving the errors I am though.

I have included the code snippets below, why am I receiving the errors listed in the appropriate sections?

SAMPLE DATA TYPE RAML - ns_contact.raml

#%RAML 1.0 DataType
type: object
displayName: NetSuite Contact
description: NetSuite Contact Object
properties:
  id:
    type: string
    description: Id of the NetSuite Customer
  sfdc_contact_id:
    type: string
    description: Id of the Salesforce Contact

SAMPLE LIBRARY RAML - ns_types.raml
error: Can not resolve types/ns_contact.raml
error: Inheriting from unknown type

#%RAML 1.0 Library
types:
  NSContact: !include types/ns_contact.raml

SAMPLE API.RAML
error: ramlParser: loadPath: loadApi: content: /[object Object]: no such path

#%RAML 1.0
title: sfdc-netsuite-api
version: 1
baseUri: http://api.samplehost.com/{version} #Either Proxy or Mulesoft Runetime Engine Endpoint
mediaType: application/json
description: Salesforce and NetSuite API
# securitySchemes: 
  #oauth_2_0: !include securitySchemes/oauth_2_0.raml #for later implementation
uses:
  sfdcTypes: !include libraries/sfdc_types.raml
  nsTypes: !include libraries/ns_types.raml

PROJECT STRUCTURE
types folder
- ns_contact.raml
libraries folder
- ns_types.raml
api.raml


RAML Experience - Help for Tutorial Improvements
#2

In the node “uses”, instead of use !include use only the root to the library,
this will be the result:
uses:
sfdcTypes: libraries/sfdc_types.raml
nsTypes: libraries/ns_types.raml

Hope will be usefull