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

Add `input` tag for resource attributes. #246

Closed nathan-t-lr closed 2 years ago

nathan-t-lr commented 2 years ago

tldr;

we need a tag that does the opposite of output, letting api have an input resource attribute that doesn't show up on output.

Description

We need a keyword to allow input resource attributes (C-U operations from CRUD) that don't show up in the response bodies. This is the default functionality for query params, but it should be extended for resource attributes.

Use case:

This would not force apis to have 1-1 mappings between resource input attributes and resource output attributes. Consider an attribute that dynamically maps to different output fields, requestedBy -> createdBy if the resource is new or requestedBy->lastUpdatedBy if the resource is not new. In both cases requestedBy should not show up in the resource payloads, but this is not possible today with reslang.