LiveRamp / reslang

A language for describing resource-oriented APIs & turning them into Swagger or resource diagrams. Oriented around the concepts we want to expose in the APIs.
Apache License 2.0
23 stars 7 forks source link

Ability to refer to resource schema #36

Closed antoineLeclercq closed 4 years ago

antoineLeclercq commented 4 years ago

Example: if I want to produce an event for the Directory resource because a file was added to a directory and I want to include all the files as part of the directory in the event.

I'd like to be able to do something like the following (with a potential keyword in front of the resource name):

produces event UpdatedDirectory {
  directory: Directory
  files: File[]
}

Right now I can only do:

produces event UpdatedDirectory {
  directoryId: linked Directory
  fileIds: linked File[]
}

The properties that would be included when referring to the Schema would be the properties returned as part of the HTTP response for a GET on the resource.

liveandrew commented 4 years ago

addressed in commit 3b9e9c7fc01f680dbf20c50ad711d0cea3e26e6c

use the "value-of" keyword instead of "linked" to get a full copy of the resource rather than just an id